-if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then
+if [ "$1" = "configure" -a -x /usr/lib/emacsen-common/emacs-package-install ]
+then
/usr/lib/emacsen-common/emacs-package-install #PACKAGE#
fi
-install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+if [ "$1" = "configure" ]; then
+ install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+fi
-install-info --quiet #FILE#
+if [ "$1" = "configure" ]; then
+ install-info --quiet #FILE#
+fi
-if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+if [ "$1" = "configure" -a -x /usr/bin/update-menus ]; then update-menus ; fi
-if [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if [ "$1" = "configure" -a -x /usr/sbin/update-mime ]; then update-mime; fi
-update-modules
-depmod -a
+if [ "$1" = "configure" ]; then
+ update-modules
+ depmod -a
+fi
-if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
- suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
-else
- chown #OWNER#.#GROUP# /#FILE#
- chmod #PERMS# /#FILE#
+if [ "$1" = "configure" ]; then
+ if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+ suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
+ elif [ -e /#FILE# ]; then
+ chown #OWNER#.#GROUP# /#FILE#
+ chmod #PERMS# /#FILE#
+ fi
fi
-update-alternatives --install /usr/bin/x-window-manager \
- x-window-manager #WM# #PRIORITY#
+if [ "$1" = "configure" ]; then
+ update-alternatives --install /usr/bin/x-window-manager \
+ x-window-manager #WM# #PRIORITY#
+fi
-if test -x /usr/sbin/update-xaw-wrappers; then
- /usr/sbin/update-xaw-wrappers
+if [ "$1" = "configure" ]; then
+ if test -x /usr/sbin/update-xaw-wrappers; then
+ /usr/sbin/update-xaw-wrappers
+ fi
+ for opts in #OPTS#; do
+ update-alternatives --quiet --install $opts 25
+ done
fi
-fontdirs="#FONTDIRS#"
-updatecmds="#UPDATECMDS#"
-
-for dir in $fontdirs; do
- for currentcmd in $updatecmds; do
- $currentcmd /usr/lib/X11/fonts/$dir
+if [ "$1" = "configure" ]; then
+ fontdirs="#FONTDIRS#"
+ updatecmds="#UPDATECMDS#"
+
+ for dir in $fontdirs; do
+ for currentcmd in $updatecmds; do
+ $currentcmd /usr/lib/X11/fonts/$dir
+ done
done
-done
+fi
--- /dev/null
+if [ -x /usr/bin/update-menus ]; then update-menus ; fi
--- /dev/null
+if [ -x /usr/sbin/update-mime ]; then update-mime; fi
--- /dev/null
+update-modules
+depmod -a
+debhelper (2.0.100) unstable; urgency=low
+
+ * Modified all postinst script fragments to only run when called with
+ "configure". I looked at the other possibilities, and I don't think any
+ of the supported stuff should be called if the postist is called for
+ error unwinds. Closes: #66673
+ * Implemented dh_clean -X, to allow specification of files to not delete,
+ Closes: #66670
+
+ -- Joey Hess <joeyh@debian.org> Wed, 5 Jul 2000 17:02:40 -0700
+
debhelper (2.0.99) unstable; urgency=low
* dh_installmodules will now install modiles even if etc/modutils already
doit("rm","-f","debian/files");
}
+ # See if some files that would normally be deleted are excluded.
+ if (! defined($dh{EXCLUDE_FIND}) || $dh{EXCLUDE_FIND} eq '') {
+ $find_options="";
+ }
+ else {
+ $find_options="-a ! ( $dh{EXCLUDE_FIND} )";
+ }
+
# Remove other temp files.
# (The \s+ is important, \s won't work because find would get null
# parameters). Note that you _don't_ quote wildcards used by find
-o -name *.orig -o -name *.rej -o -name *.bak
-o -name .*.orig -o -name .*.rej -o -name .SUMS
-o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
- ) -exec rm -f {} ;"));
+ ) $find_options -exec rm -f {} ;"));
}
doit('rm', '-rf', 'debian/tmp')
dh_clean \- clean up package build directories
.SH SYNOPSIS
.B dh_clean
-.I "[debhelper options] [-k] [-d] [file ...]"
+.I "[debhelper options] [-k] [-d] [file ...] [-Xitem]"
.SH "DESCRIPTION"
dh_clean is a debhelper program that is responsible for cleaning up after a
package is built. It removes the package build directories, and removes some
Only clean the package build directories, do not clean up any other files at
all.
.TP
+.B \-Xitem, \--exclude=item
+Exclude files that contain "item" anywhere in their filename from being
+deleted, even if they would normally be deleted. You may use this option
+multiple times to build up a list of things to exclude.
+.TP
.B file ...
Delete these files too.
.SH ENVIRONMENT