-if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+if command -v update-menus >/dev/null 2>&1 ; then update-menus ; fi
inst=/etc/menu-methods/#PACKAGE#
-if [ -x /usr/bin/update-menus -a -f $inst -a -x /usr/sbin/install-menu ] ; then
+if command -v update-menus >/dev/null 2>&1 && [ -f $inst ] ; then
chmod a+x $inst
update-menus
fi
-if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
+if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
else
chown #OWNER#.#GROUP# /#FILE#
-if [ -x /usr/sbin/register-window-manager ] ; then
+if command -v register-window-manager >/dev/null 2>&1; then
register-window-manager --add #WM#
fi
inst=/etc/menu-methods/#PACKAGE#
if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi
-if [ -x /usr/bin/update-menus ] ; then update-menus; fi
+if command -v update-menus >/dev/null 2>&1 ; then update-menus; fi
-if [ -e /etc/suid.conf -a -x /usr/sbin/suidunregister ]; then
+if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
suidunregister -s #PACKAGE# /#FILE#
fi
-if [ "$1" == "purge" -a -x /usr/sbin/register-window-manager ] ; then
+if [ "$1" == "purge" ] && command -v register-window-manager >/dev/null 2>&1
+then
register-window-manager --remove #WM#
fi
+debhelper (1.2.21) unstable; urgency=low
+
+ * dh_installdocs: Added doc-base support, if debian/<package>.doc-base
+ exists, it will be installed as a doc-base control file. If you use this,
+ you probably want to add "dh_testversion 1.2.21" to the rules file to make
+ sure your package is built with a new enough debhelper.
+ * dh_installdocs: now supports -n to make it not modify postinst/prerm.
+ * dh_suidregister: turned off leading 0/1 in permissions settings, until
+ suidregister actually supports it.
+ * autoscripts/*: instead of "text -x", use "command -v" to see if various
+ binaries exist. This gets rid of lots of hard-coded paths.
+
+ -- Joey Hess <joeyh@master.debian.org> Wed, 30 Dec 1998 22:50:04 -0500
+
debhelper (1.2.20) unstable; urgency=low
* dh_compress: handle the hard link stuff properly, it was broken. Also
A collection of programs that can be used in a debian/rules file to
automate common tasks related to building binary debian packages. Programs
are included to install various files into your package, compress files, fix
- file permissions, integrate your package with the debian menu system, etc.
+ file permissions, integrate your package with the debian menu system,
+ suidmanager, doc-base, etc.
fi
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary localdist
+.PHONY: build clean binary-indep binary-arch binary dist
#
# Reads debian/docs, installs all files listed there into /usr/doc/$PACKAGE
# Also installs the debian/copyright and debian/README.debian and debian/TODO
+# and handles debian/doc-base.
BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
use Dh_Lib;
if ($copyright) {
doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright");
}
+
+ # Handle doc-base files.
+ $file=pkgfile($PACKAGE,"doc-base");
+ if ($file) {
+ if (! -d "$TMP/usr/share/doc-base/") {
+ doit("install","-d","$TMP/usr/share/doc-base/");
+ }
+ doit("install","-p","-m644",$file,
+ "$TMP/usr/share/doc-base/$PACKAGE");
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-doc-base");
+ autoscript($PACKAGE,"postrm","postrm-doc-base")
+ }
+ }
}
dh_installdocs \- install documentation into package build directories
.SH SYNOPSIS
.B dh_installdocs
-.I "[debhelper options] [-A] [file ...]"
+.I "[debhelper options] [-A] [-n] [file ...]"
.SH "DESCRIPTION"
dh_installdocs is a debhelper program that is responsible for installing
documentation into usr/doc/package in package build directories.
.P
A file named debian/package.docs (debian/docs may be used for the first
binary package in debian/control) can list other files to be installed.
+.P
+A file named debian/package.doc-base (debian/doc-base may be used for the
+first binary package in debian/control), if it exists, will make
+dh_installdocs use that file as a doc-base control file, and will
+automatically generate the postinst and prerm commands needed to
+interface with the doc-base package. See
+.BR dh_installdeb (1)
+for an explanation of how this works. Note that the package name will be
+used as the doc-base document id.
.SH OPTIONS
.TP
.B debhelper options
Install all files specified by command line parameters in ALL packages
acted on.
.TP
+.B \-n, \--noscripts
+DO not modify postinst/prerm scripts.
+.TP
.B file ...
Install these files as documentation into the first package acted on. (Or in
all packages if -A is specified).
for a list of environment variables that affect all debhelper commands.
.SH "SEE ALSO"
.BR debhelper (1)
+.TP
+.BR install-docs (8)
.SH BUGS
It's impossible to specify filenames with spaces or other whitespace in them
in debian/docs file. This is more a historical design flaw than a bug.
$group=getgrgid($gid);
# Note that I have to print mode in ocal, stripping file type.
$sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
- $mode & 07777);
+ $mode & 00777);
autoscript($PACKAGE,"postinst","postinst-suid",$sedstr);
autoscript($PACKAGE,"postrm","postrm-suid","$sedstr");