From 93a4b4298d7ec022216f403674583dd04b7f4f5e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:24:34 +0000 Subject: r8: Initial Import --- dh_installmanpages.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dh_installmanpages.1') diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 5fbad2b1..bb08181b 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_INSTALLMANPAGES 1 .SH NAME dh_installmanpages \- install man pages into package build directories .SH SYNOPSIS -- cgit v1.2.3 From 0c4875b3fecb5b376257e248b129537dd148e0c4 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:37:02 +0000 Subject: r21: Initial Import --- README | 23 +++++++++++++++++++++++ debian/changelog | 9 +++++++++ dh_builddeb | 2 +- dh_builddeb.1 | 5 ++++- dh_clean | 4 ++-- dh_clean.1 | 5 ++++- dh_compress | 4 ++-- dh_compress.1 | 5 ++++- dh_du | 8 ++++---- dh_du.1 | 5 ++++- dh_fixperms | 12 ++++++------ dh_fixperms.1 | 5 ++++- dh_installchangelogs | 8 ++++---- dh_installchangelogs.1 | 5 ++++- dh_installcron | 6 +++--- dh_installcron.1 | 5 ++++- dh_installdebfiles | 34 +++++++++++++++++----------------- dh_installdebfiles.1 | 5 ++++- dh_installdocs | 16 ++++++++-------- dh_installdocs.1 | 5 ++++- dh_installexamples | 6 +++--- dh_installexamples.1 | 5 ++++- dh_installmanpages | 12 ++++++------ dh_installmanpages.1 | 5 ++++- dh_installmenu | 16 ++++++++-------- dh_installmenu.1 | 5 ++++- dh_lib | 25 +++++++++++++++++++------ dh_makeshlibs | 18 +++++++++--------- dh_makeshlibs.1 | 5 ++++- dh_md5sums | 24 ++++++++++++------------ dh_md5sums.1 | 5 ++++- dh_strip | 4 ++-- dh_strip.1 | 5 ++++- dh_suidregister | 6 +++--- dh_suidregister.1 | 5 ++++- dh_undocumented | 6 +++--- dh_undocumented.1 | 5 ++++- 37 files changed, 212 insertions(+), 116 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/README b/README index d84add45..2f2e7c2c 100644 --- a/README +++ b/README @@ -102,4 +102,27 @@ effecting all packages. See examples/rules.multi for an example of how to use this. + +Package build directories -- debian/tmp, etc: +-------------------------------------------- + +By default, all debhelper programs assume that the temporary directory used +for assembling the tree of files in a package is debian/tmp for the first +package listed in debian/control, and debian/ for each +additional package. + +Sometimes, you might want to use some other temporary directory. This is +supported by the -P flag. The direcotry to use is specified after -P, for +example, "dh_installdocs -Pdebian/tmp", will use debian/tmp as the temporary +directory. Note that if you use -P, the debhelper programs can only be +acting on a single package at a time. So if you have a package that builds +many binary packages, you will need to use the -p flag to specify which +binary package the debhelper program will act on. For example: + + dh_installdocs -pfoolib1 -Pdebian/tmp-foolib1 + dh_installdocs -pfoolib1-dev -Pdebian/tmp-foolib1-dev + dh_installdocs -pfoolib-bin -Pdebian/tmp-foolib-bin + +This uses debian/tmp- as the package build directory. + -- Joey Hess diff --git a/debian/changelog b/debian/changelog index a33224d9..f7d47b17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (0.15) unstable; urgency=low + + * README: documented what temporary directories are used by default for + installing package files into. + * dh_*: added -P flag, to let a different package build directory be + specified. + + -- Joey Hess Thu, 6 Nov 1997 15:51:22 -0500 + debhelper (0.14) unstable; urgency=low * dh_fixperms: leave permissions on files in /usr/doc/packages/examples diff --git a/dh_builddeb b/dh_builddeb index aea8a1b1..9ddd21dc 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -7,5 +7,5 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - doit "dpkg --build debian/$TMP .." + doit "dpkg --build $TMP .." done diff --git a/dh_builddeb.1 b/dh_builddeb.1 index bfe72e72..8a51a8f4 100644 --- a/dh_builddeb.1 +++ b/dh_builddeb.1 @@ -3,7 +3,7 @@ dh_builddeb \- build debian packages .SH SYNOPSIS .B dh_builddeb -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_builddeb simply calls .BR dpkg (8) @@ -21,6 +21,9 @@ Build all architecture independent packages. .TP .B \-ppackage Build the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_clean b/dh_clean index 76522dda..874604ed 100755 --- a/dh_clean +++ b/dh_clean @@ -1,6 +1,6 @@ #!/bin/sh -e # -# Clean up debian/$TMP and other tepmorary files generated by the +# Clean up $TMP and other tepmorary files generated by the # build process. PATH=debian:$PATH:/usr/lib/debhelper @@ -9,7 +9,7 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` EXT=`pkgext $PACKAGE` - doit "rm -rf debian/$TMP" + doit "rm -rf $TMP" doit "rm -f debian/${EXT}substvars" done doit "rm -f debian/files* debian/*.debhelper $*" diff --git a/dh_clean.1 b/dh_clean.1 index e387c4eb..651b5b08 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -3,7 +3,7 @@ dh_clean \- clean up package build directories .SH SYNOPSIS .B dh_clean -.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" .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 @@ -23,6 +23,9 @@ Clean up the package build directory for all architecture independent packages. .B \-ppackage Clean up the package build directory for the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B file ... Delete these files too. .SH NOTES diff --git a/dh_compress b/dh_compress index 347f0f5f..86ab8373 100755 --- a/dh_compress +++ b/dh_compress @@ -13,7 +13,7 @@ for PACKAGE in $DH_DOPACKAGES; do # Run the file name gatering commands from within the directory # structure that will be effected. olddir=`pwd` - cd debian/$TMP + cd $TMP if [ -f debian/${EXT}compress ]; then # The config file is a sh script that outputs the files to be compressed @@ -40,7 +40,7 @@ for PACKAGE in $DH_DOPACKAGES; do cd $olddir # Fix up symlinks that were pointing to the uncompressed files. - for file in `find debian/$TMP -type l`; do + for file in `find $TMP -type l`; do DIRECTORY=`expr $file : "\(.*\)/[^/]*"` NAME=`expr $file : ".*/\([^/]*\)"` LINKVAL=`ls -l $DIRECTORY/$NAME | awk '{ print $11;}'` diff --git a/dh_compress.1 b/dh_compress.1 index 06087b8e..d7e8dc5c 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -3,7 +3,7 @@ dh_compress \- compress files and fix symlinks in package build directories .SH SYNOPSIS .B dh_compress -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any symlinks @@ -41,6 +41,9 @@ Compress files for all architecture independent packages. .TP .B \-ppackage Compress files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_du b/dh_du index a7ec6f48..5fcb1418 100755 --- a/dh_du +++ b/dh_du @@ -9,11 +9,11 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - if [ ! -d "debian/$TMP/DEBIAN" ]; then - doit "install -d debian/$TMP/DEBIAN" + if [ ! -d "$TMP/DEBIAN" ]; then + doit "install -d $TMP/DEBIAN" fi - verbose_echo "du -k debian/$TMP | sed \"s: debian/$TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" debian/$TMP$\" > debian/$TMP/DEBIAN/du" - du -k debian/$TMP | sed "s: debian/$TMP/: :" | grep -v " DEBIAN$" | grep -v " debian/$TMP$" >debian/$TMP/DEBIAN/du + verbose_echo "du -k $TMP | sed \"s: $TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" $TMP$\" > $TMP/DEBIAN/du" + du -k $TMP | sed "s: $TMP/: :" | grep -v " DEBIAN$" | grep -v " $TMP$" >$TMP/DEBIAN/du doit "chown root.root debian/tmp/DEBIAN/du" done diff --git a/dh_du.1 b/dh_du.1 index 98a9c80a..42509a50 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -3,7 +3,7 @@ dh_du \- generate DEBIAN/du file .SH SYNOPSIS .B dh_md5sums -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_du is a debhelper program that is responsible for generating a DEBIAN/du file, which lists the disk usage of directories in the package. @@ -24,6 +24,9 @@ Generate du files for all architecture independent packages. .TP .B \-ppackage Generate du file for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_fixperms b/dh_fixperms index 1c4fef7c..0534549c 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -10,24 +10,24 @@ for PACKAGE in $DH_DOPACKAGES; do EXT=`pkgext $PACKAGE` # General things.. - if [ -d debian/$TMP ]; then - doit "chown -R root.root debian/$TMP" - doit "chmod -R go=rX debian/$TMP" + if [ -d $TMP ]; then + doit "chown -R root.root $TMP" + doit "chmod -R go=rX $TMP" fi # Fix up premissions in usr/doc, setting everything to not exectable # by default, but leave examples directories alone. - files=`find debian/$TMP/usr/doc -type f 2>/dev/null | grep -v /examples/ | tr "\n" " "` || true + files=`find $TMP/usr/doc -type f 2>/dev/null | grep -v /examples/ | tr "\n" " "` || true if [ "$files" ]; then doit "chmod 644 $files" fi - files=`find debian/$TMP/usr/doc -type d 2>/dev/null | tr "\n" " "` || true + files=`find $TMP/usr/doc -type d 2>/dev/null | tr "\n" " "` || true if [ "$files" ]; then doit "chmod 755 $files" fi # Executable man pages are a bad thing. - files=`find debian/$TMP/usr/man/ debian/$TMP/usr/X11*/man/ -type f 2>/dev/null | tr "\n" " "` || true + files=`find $TMP/usr/man/ $TMP/usr/X11*/man/ -type f 2>/dev/null | tr "\n" " "` || true if [ "$files" ]; then doit "chmod 644 $files" fi diff --git a/dh_fixperms.1 b/dh_fixperms.1 index cfba6481..8ae36def 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -3,7 +3,7 @@ dh_fixperms \- fix permissions of files in package build directories .SH SYNOPSIS .B dh_fixperms -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_fixperms is a debhelper program that is responsible for setting the permissions of files in package build directories to a sane state. @@ -25,6 +25,9 @@ Fix permissions for all architecture independent packages. .TP .B \-ppackage Fix permissions for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_installchangelogs b/dh_installchangelogs index 17ff7312..7405daae 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -25,12 +25,12 @@ fi for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - if [ ! -d debian/$TMP/usr/doc/$PACKAGE ]; then - doit "install -d debian/$TMP/usr/doc/$PACKAGE" + if [ ! -d $TMP/usr/doc/$PACKAGE ]; then + doit "install -d $TMP/usr/doc/$PACKAGE" fi - doit "install -p -m644 debian/changelog debian/$TMP/usr/doc/$PACKAGE/$CHANGELOG_NAME" + doit "install -p -m644 debian/changelog $TMP/usr/doc/$PACKAGE/$CHANGELOG_NAME" if [ "$UPSTREAM" ]; then - doit "install -p -m644 $UPSTREAM debian/$TMP/usr/doc/$PACKAGE/changelog" + doit "install -p -m644 $UPSTREAM $TMP/usr/doc/$PACKAGE/changelog" fi done diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1 index 2371af17..8c42a011 100644 --- a/dh_installchangelogs.1 +++ b/dh_installchangelogs.1 @@ -3,7 +3,7 @@ dh_installchangelogs \- install changelogs into package build directories .SH SYNOPSIS .B dh_installchangelogs -.I "[-v] [-a] [-i] [-ppackage] upstream" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] upstream" .SH "DESCRIPTION" dh_installchangelogs is a debhelper program that is responsible for installing changelogs into package build directories. @@ -29,6 +29,9 @@ Install changelogs for all architecture independent packages. .TP .B \-ppackage Install changelogs for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_installcron b/dh_installcron index f5c4f8b8..6ea5daa3 100755 --- a/dh_installcron +++ b/dh_installcron @@ -11,10 +11,10 @@ for PACKAGE in $DH_DOPACKAGES; do for type in daily weekly monthly; do if [ -e debian/${EXT}cron.$type ]; then - if [ ! -d debian/$TMP/etc/cron.$type ]; then - doit "install -o root -g root -d debian/$TMP/etc/cron.$type" + if [ ! -d $TMP/etc/cron.$type ]; then + doit "install -o root -g root -d $TMP/etc/cron.$type" fi - doit "install debian/${EXT}cron.$type debian/$TMP/etc/cron.$type/$PACKAGE" + doit "install debian/${EXT}cron.$type $TMP/etc/cron.$type/$PACKAGE" fi done done diff --git a/dh_installcron.1 b/dh_installcron.1 index 2819958b..ff76760b 100644 --- a/dh_installcron.1 +++ b/dh_installcron.1 @@ -3,7 +3,7 @@ dh_installcron \- install cron scripts into etc/cron.* .SH SYNOPSIS .B dh_installcron -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installcron is a debhelper program that is responsible for installing cron scripts into etc/cron.* in package build directories. The files @@ -24,6 +24,9 @@ Install cron files for all architecture independent packages. .TP .B \-ppackage Install cron files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_installdebfiles b/dh_installdebfiles index 403375f4..ad08f8d3 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -10,8 +10,8 @@ for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` EXT=`pkgext $PACKAGE` - if [ ! -d debian/$TMP/DEBIAN ]; then - doit "install -o root -g root -d debian/$TMP/DEBIAN" + if [ ! -d $TMP/DEBIAN ]; then + doit "install -o root -g root -d $TMP/DEBIAN" fi # Install debian install scripts. @@ -20,23 +20,23 @@ for PACKAGE in $DH_DOPACKAGES; do if [ -f debian/$EXT$file ]; then # Add this into the script, where it has #DEBHELPER# if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "perl -pe \"s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg\" < debian/$EXT$file > debian/$TMP/DEBIAN/$file" - perl -pe "s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg" < debian/$EXT$file > debian/$TMP/DEBIAN/$file - doit "chown root.root debian/$TMP/DEBIAN/$file" - doit "chmod 755 debian/$TMP/DEBIAN/$file" + verbose_echo "perl -pe \"s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg\" < debian/$EXT$file > $TMP/DEBIAN/$file" + perl -pe "s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg" < debian/$EXT$file > $TMP/DEBIAN/$file + doit "chown root.root $TMP/DEBIAN/$file" + doit "chmod 755 $TMP/DEBIAN/$file" else - doit "install -o root -g root -p debian/$EXT$file debian/$TMP/DEBIAN/$file" + doit "install -o root -g root -p debian/$EXT$file $TMP/DEBIAN/$file" fi else # Auto-generate script header and add .debhelper # content to it. if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "echo '#!/bin/sh -e' > debian/$TMP/DEBIAN/$file" - echo '#!/bin/sh -e' > debian/$TMP/DEBIAN/$file - verbose_echo "cat debian/$EXT$file.debhelper >> debian/$TMP/DEBIAN/$file" - cat debian/$EXT$file.debhelper >> debian/$TMP/DEBIAN/$file - doit "chown root.root debian/$TMP/DEBIAN/$file" - doit "chmod 755 debian/$TMP/DEBIAN/$file" + verbose_echo "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" + echo '#!/bin/sh -e' > $TMP/DEBIAN/$file + verbose_echo "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" + cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file + doit "chown root.root $TMP/DEBIAN/$file" + doit "chmod 755 $TMP/DEBIAN/$file" fi fi done @@ -44,13 +44,13 @@ for PACKAGE in $DH_DOPACKAGES; do # Install non-executable files for file in shlibs conffiles; do if [ -f debian/$EXT$file ]; then - doit "install -o root -g root -m 644 -p debian/$EXT$file debian/$TMP/DEBIAN/$file" + doit "install -o root -g root -m 644 -p debian/$EXT$file $TMP/DEBIAN/$file" fi done # Run dpkg-shlibdeps to generate dependancies. filelist="" - for file in `find debian/$TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do + for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do case "`file $file`" in *ELF*) filelist="$file $filelist" @@ -62,6 +62,6 @@ for PACKAGE in $DH_DOPACKAGES; do fi # Generate and install control file. - doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -Pdebian/$TMP" - doit "chown root.root debian/$TMP/DEBIAN/control" + doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP" + doit "chown root.root $TMP/DEBIAN/control" done diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 924e04b4..429481f4 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -3,7 +3,7 @@ dh_installdebfiles \- install files into the DEBIAN directory .SH SYNOPSIS .B dh_installdebfils -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installdebfiles is a debhelper program that is responsible for installing files into the DEBIAN directory in package build directories with the @@ -49,6 +49,9 @@ Install files for all architecture independent packages. .TP .B \-ppackage Install files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_installdocs b/dh_installdocs index 3859d34b..bcc26342 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -10,8 +10,8 @@ for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` EXT=`pkgext $PACKAGE` - if [ ! -d debian/$TMP/usr/doc/$PACKAGE ]; then - doit "install -d debian/$TMP/usr/doc/$PACKAGE" + if [ ! -d $TMP/usr/doc/$PACKAGE ]; then + doit "install -d $TMP/usr/doc/$PACKAGE" fi docs="" @@ -25,27 +25,27 @@ for PACKAGE in $DH_DOPACKAGES; do fi if [ "$docs" ]; then - doit "cp -a $docs debian/$TMP/usr/doc/$PACKAGE/" + doit "cp -a $docs $TMP/usr/doc/$PACKAGE/" fi # Install these files only into the main package by default. if [ "$PACKAGE" = "$MAINPACKAGE" ]; then if [ -f debian/README.debian ]; then - doit "install -m 644 -p debian/README.debian debian/$TMP/usr/doc/$PACKAGE/" + doit "install -m 644 -p debian/README.debian $TMP/usr/doc/$PACKAGE/" fi if [ -f debian/README.Debian ]; then - doit "install -m 644 -p debian/README.Debian debian/$TMP/usr/doc/$PACKAGE/" + doit "install -m 644 -p debian/README.Debian $TMP/usr/doc/$PACKAGE/" fi if [ -f debian/TODO ]; then if [ "$NATIVE" ]; then - doit "install -m 655 -p debian/TODO debian/$TMP/usr/doc/$PACKAGE/TODO" + doit "install -m 655 -p debian/TODO $TMP/usr/doc/$PACKAGE/TODO" else - doit "install -m 644 -p debian/TODO debian/$TMP/usr/doc/$PACKAGE/TODO.Debian" + doit "install -m 644 -p debian/TODO $TMP/usr/doc/$PACKAGE/TODO.Debian" fi fi fi if [ -f debian/copyright ]; then - doit "install -m 644 -p debian/copyright debian/$TMP/usr/doc/$PACKAGE/" + doit "install -m 644 -p debian/copyright $TMP/usr/doc/$PACKAGE/" fi done diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 4b5f068e..fc001130 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -3,7 +3,7 @@ dh_installdocs \- install documentation into package build directories .SH SYNOPSIS .B dh_installdocs -.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" .SH "DESCRIPTION" dh_installdocs is a debhelper program that is responsible for installing documentation into usr/doc/package in package build directories. @@ -35,6 +35,9 @@ Install files for all architecture independent packages. .B \-ppackage Install files for the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B file ... Install these files as documentation into the first binary package listed in debian/control, if we are acting on that package. diff --git a/dh_installexamples b/dh_installexamples index 61ceae20..bc16991a 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -21,10 +21,10 @@ for PACKAGE in $DH_DOPACKAGES; do fi if [ "$examples" ]; then - if [ ! -d debian/$TMP/usr/doc/$PACKAGE/examples ]; then - doit "install -d debian/$TMP/usr/doc/$PACKAGE/examples" + if [ ! -d $TMP/usr/doc/$PACKAGE/examples ]; then + doit "install -d $TMP/usr/doc/$PACKAGE/examples" fi - doit "cp -a $examples debian/$TMP/usr/doc/$PACKAGE/examples/" + doit "cp -a $examples $TMP/usr/doc/$PACKAGE/examples/" fi done diff --git a/dh_installexamples.1 b/dh_installexamples.1 index e7ad6c62..5c8ce8c0 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -3,7 +3,7 @@ dh_installexamples \- install example files into package build directories .SH SYNOPSIS .B dh_installexamples -.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" .SH "DESCRIPTION" dh_installexamples is a debhelper program that is responsible for installing examples into usr/doc/package/examples in package build directories. @@ -29,6 +29,9 @@ Install files for all architecture independent packages. .B \-ppackage Install files for the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B file ... Install these files as documentation into the first binary package listed in debian/control, if we are acting on that package. diff --git a/dh_installmanpages b/dh_installmanpages index 304c3b12..4a0ffb47 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -13,7 +13,7 @@ for PACKAGE in $DH_DOPACKAGES; do # Find all filenames that look like man pages. # .ex files are examples installed by deb-make, we don't want those, or # .in files, which are from configure. - for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in" | grep -v ^debian/$TMP`; do + for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in" | grep -v ^$TMP`; do # Make sure file thinks they are man pages. if file $file|grep -q roff; then if echo $file|grep -q /; then @@ -32,12 +32,12 @@ for PACKAGE in $DH_DOPACKAGES; do done if [ "$install" ]; then SECTION=man`expr $NAME : '.*\.\([123456789]\)'` - if [ ! -e debian/$TMP/usr/man/$SECTION/$NAME -a \ - ! -e debian/$TMP/usr/X11*/man/$SECTION/$NAME ]; then - if [ ! -d debian/$TMP/usr/man/$SECTION ]; then - doit "install -d debian/$TMP/usr/man/$SECTION" + if [ ! -e $TMP/usr/man/$SECTION/$NAME -a \ + ! -e $TMP/usr/X11*/man/$SECTION/$NAME ]; then + if [ ! -d $TMP/usr/man/$SECTION ]; then + doit "install -d $TMP/usr/man/$SECTION" fi - doit "install -p -m644 $file debian/$TMP/usr/man/$SECTION/$NAME" + doit "install -p -m644 $file $TMP/usr/man/$SECTION/$NAME" fi fi fi diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index bb08181b..06794044 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -3,7 +3,7 @@ dh_installmanpages \- install man pages into package build directories .SH SYNOPSIS .B dh_installmanpages -.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" .SH "DESCRIPTION" dh_installmanpages is a debhelper program that is responsible for automatically installing man pages into usr/man/ and usr/X11R6/man/ in @@ -32,6 +32,9 @@ Install man pages into all architecture independent packages. .B \-ppackage Install man pages into the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B file ... Do not install these files as man pages, even if they look like valid man pages. diff --git a/dh_installmenu b/dh_installmenu index c837e04f..5071a2f3 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -2,9 +2,9 @@ # # Integration with debian menu system: # -# If debian/menu file exists, save it to debian/$TMP/usr/lib/menu/$PACKAGE +# If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE # If debian/menu-method file exists, save it to -# debian/$TMP/etc/menu-methods/$PACKAGE +# $TMP/etc/menu-methods/$PACKAGE # # Also, add to postinst and postrm. @@ -16,10 +16,10 @@ for PACKAGE in $DH_DOPACKAGES; do EXT=`pkgext $PACKAGE` if [ -e debian/${EXT}menu ]; then - if [ ! -d debian/$TMP/usr/lib/menu ]; then - doit "install -d debian/$TMP/usr/lib/menu" + if [ ! -d $TMP/usr/lib/menu ]; then + doit "install -d $TMP/usr/lib/menu" fi - doit "install -p -m644 debian/${EXT}menu debian/$TMP/usr/lib/menu/$PACKAGE" + doit "install -p -m644 debian/${EXT}menu $TMP/usr/lib/menu/$PACKAGE" # Add the scripts if a menu-method file doesn't exist. # The scripts for menu-method handle everything these do, too. @@ -30,10 +30,10 @@ for PACKAGE in $DH_DOPACKAGES; do fi if [ -e debian/${EXT}menu-method ]; then - if [ ! -d debian/$TMP/etc/menu-methods ]; then - doit "install -d debian/$TMP/etc/menu-methods" + if [ ! -d $TMP/etc/menu-methods ]; then + doit "install -d $TMP/etc/menu-methods" fi - doit "install -p debian/${EXT}menu-method debian/$TMP/etc/menu-methods/$PACKAGE" + doit "install -p debian/${EXT}menu-method $TMP/etc/menu-methods/$PACKAGE" if [ ! "$DH_NOSCRIPTS" ]; then autoscript "postinst" "postinst-menu-method" "s/#PACKAGE#/$PACKAGE/" diff --git a/dh_installmenu.1 b/dh_installmenu.1 index e26c84e5..b5337f30 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -3,7 +3,7 @@ dh_installmenu \- install debian menu files into package build directories .SH SYNOPSIS .B dh_installmenu -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installmenu is a debhelper program that is responsible for installing fils used by the debian menu package into package build directories. @@ -40,6 +40,9 @@ Install menu files into the package named "package". .TP .B \-n Do not automatically generate code. +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_lib b/dh_lib index 1cc7e308..c2dd9777 100644 --- a/dh_lib +++ b/dh_lib @@ -1,7 +1,7 @@ # Library functions for debhelper programs. # Run a command, and display the command to stdout if verbose mode is on. -# All commands that modifiy files in debian/$TMP should be ran via this +# All commands that modifiy files in $TMP should be ran via this # function. # Unfortunatly, this function doesn't work if your command uses redirection, # you will have to call verbose_echo by hand then. @@ -24,13 +24,15 @@ error() { } # Pass it a name of a binary package, it returns the name of the tmp dir to -# use, for that package, relative to debian/ +# use, for that package. # This is for back-compatability with the debian/tmp tradition. tmpdir() { - if [ "$1" = "$MAINPACKAGE" ]; then - echo tmp + if [ "$DH_TMPDIR" ]; then + echo "$DH_TMPDIR" + elif [ "$1" = "$MAINPACKAGE" ]; then + echo debian/tmp else - echo "$PACKAGE" + echo "debian/$PACKAGE" fi } @@ -77,7 +79,7 @@ autoscript() { # Argument processing and global variable initialization is below. # Parse command line. -set -- `getopt xvianp: $*` +set -- `getopt xvianp:P: $*` for i; do case "$i" @@ -107,6 +109,11 @@ for i; do DH_EXCLUDE=1 shift ;; + -P) + DH_TMPDIR="$2" + shift + shift + ;; --) shift break @@ -172,3 +179,9 @@ if [ ! "$DH_DOPACKAGES" -o "$DH_DOPACKAGES" = " " ]; then fi DH_DOPACKAGES=`grep ^Package: debian/control | cut -d " " -f 2` fi + +# Check to see if -P was specified. If so, we can only act on a single +# package. +if [ "$DH_TMPDIR" ] && echo "$DH_DOPACKAGES" | grep -q " "; then + error "-P was specified, but multiple packages would be acted on." +fi diff --git a/dh_makeshlibs b/dh_makeshlibs index a09e26f6..f1ab8899 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -8,23 +8,23 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then - error "debian/$TMP/DEBIAN/shlibs already exists." + if [ -e "$TMP/DEBIAN/shlibs" ]; then + error "$TMP/DEBIAN/shlibs already exists." fi - for file in `find debian/$TMP -type f -name "*.so*" | tr "\n" " "` ; do + for file in `find $TMP -type f -name "*.so*" | tr "\n" " "` ; do LIBRARY=`expr $file : ".*/\(.*\)\.so\..*"` || true VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true MAJOR=`expr $VERSION : "\([0-9]*\)\."` || true LIBSTUB=`expr $file : "\(.*\/.*\.so\)\..*"` || true - if [ ! -d "debian/$TMP/DEBIAN" ] ; then - doit "install -d debian/$TMP/DEBIAN" + if [ ! -d "$TMP/DEBIAN" ] ; then + doit "install -d $TMP/DEBIAN" fi - verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>debian/$TMP/DEBIAN/shlibs" - echo "$LIBRARY $MAJOR $PACKAGE" >>debian/$TMP/DEBIAN/shlibs + verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>$TMP/DEBIAN/shlibs" + echo "$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs done - if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then - doit "chown root.root debian/$TMP/DEBIAN/shlibs" + if [ -e "$TMP/DEBIAN/shlibs" ]; then + doit "chown root.root $TMP/DEBIAN/shlibs" fi done diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index 51ba8fee..e4296e47 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -3,7 +3,7 @@ dh_makeshlibs \- automatically create shlibs file .SH SYNOPSIS .B dh_makeshlibs -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-Ptmpdir] [-ppackage]" .SH "DESCRIPTION" dh_makeshlibs is a debhelper program that automatically scans for shared libraries, and generates a shlibs file for the libraries it finds. @@ -23,6 +23,9 @@ Generate shlibs files for all architecture independent packages. .TP .B \-ppackage Generate shlibs file for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_md5sums b/dh_md5sums index 5400bad9..f71ab529 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -9,21 +9,21 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - if [ ! -d "debian/$TMP/DEBIAN" ]; then - doit "install -d debian/$TMP/DEBIAN" + if [ ! -d "$TMP/DEBIAN" ]; then + doit "install -d $TMP/DEBIAN" fi # Doit isn't smart enough to hande this next command so echo by hand. (sigh) - verbose_echo 'find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP/:: | sort > debian/$TMP/DEBIAN/allfiles' - find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP:: | sort > debian/$TMP/DEBIAN/allfiles + verbose_echo 'find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP/:: | sort > $TMP/DEBIAN/allfiles' + find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles # Check if we should exclude conffiles. - if [ ! "$DH_EXCLUDE" -a -r debian/$TMP/DEBIAN/conffiles ]; then - verbose_echo "sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new" - sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new - doit "mv debian/$TMP/DEBIAN/allfiles.new debian/$TMP/DEBIAN/allfiles" + if [ ! "$DH_EXCLUDE" -a -r $TMP/DEBIAN/conffiles ]; then + verbose_echo "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new" + sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new + doit "mv $TMP/DEBIAN/allfiles.new $TMP/DEBIAN/allfiles" fi - verbose_echo "cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." - cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.. - doit "chown root.root debian/$TMP/DEBIAN/md5sums" - doit "rm -f debian/$TMP/DEBIAN/allfiles" + verbose_echo "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." + cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.. + doit "chown root.root $TMP/DEBIAN/md5sums" + doit "rm -f $TMP/DEBIAN/allfiles" done diff --git a/dh_md5sums.1 b/dh_md5sums.1 index a54c1c15..28f7fe45 100644 --- a/dh_md5sums.1 +++ b/dh_md5sums.1 @@ -3,7 +3,7 @@ dh_md5sums \- generate DEBIAN/md5sums file .SH SYNOPSIS .B dh_md5sums -.I "[-x] [-v] [-a] [-i] [-ppackage]" +.I "[-x] [-v] [-a] [-i] [-Ptmpdir] [-ppackage]" .SH "DESCRIPTION" dh_md5sums is a debhelper program that is responsible for generating a DEBIAN/md5sums file, which lists the md5sums of each file in the package. @@ -29,6 +29,9 @@ Generate md5sums file for the package named "package". .B \-x Include conffiles in the md5sums list. Note that this is redundant, and included elsewhere in debian packages. +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_strip b/dh_strip index 77d670a6..57725d70 100755 --- a/dh_strip +++ b/dh_strip @@ -9,7 +9,7 @@ for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` # Handle executables and shared libraries. - for file in `find debian/$TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do + for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do case "`file $file`" in *ELF*shared*) doit "strip --strip-unneeded $file" @@ -21,7 +21,7 @@ for PACKAGE in $DH_DOPACKAGES; do done # Handle static libraries. - for file in `find debian/$TMP -type f -name "lib*.a" 2>/dev/null` ; do + for file in `find $TMP -type f -name "lib*.a" 2>/dev/null` ; do # Don't strip debug libraries. if ! expr "$file" : ".*_g\.a" >/dev/null ; then doit "strip --strip-debug $file" diff --git a/dh_strip.1 b/dh_strip.1 index 2eba9914..fa3c7694 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -3,7 +3,7 @@ dh_strip \- strip executables, shared libraries, and some static libraries. .SH SYNOPSIS .B dh_strip -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-v] [-a] [-i] [-Ptmpdir] [-ppackage]" .SH "DESCRIPTION" dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for @@ -25,6 +25,9 @@ pointless :-). .TP .B \-ppackage Strip files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. .SH NOTES The .B \-a diff --git a/dh_suidregister b/dh_suidregister index 4ca72a1c..e03379f6 100755 --- a/dh_suidregister +++ b/dh_suidregister @@ -26,11 +26,11 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! "$files" -a ! -e debian/${EXT}suid ]; then # No files specified (and no empty debian/suid file), so # guess what files to process. - files=`find debian/$TMP -type f -perm +6000` + files=`find $TMP -type f -perm +6000` # We will strip the debian working directory off of the # filenames. - tostrip="debian/$TMP/" + tostrip="$TMP/" else # We will strip leading /'s, so the user can feed this # program either absolute filenames, or relative filenames, @@ -49,7 +49,7 @@ for PACKAGE in $DH_DOPACKAGES; do # Create the sed string that will be used to # fill in the blanks in the autoscript files. # Fill with the owner, group, and perms of the file. - sedstr=`find debian/$TMP/$file -printf "s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/%u/;s/#GROUP#/%g/;s/#PERMS#/%m/"` + sedstr=`find $TMP/$file -printf "s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/%u/;s/#GROUP#/%g/;s/#PERMS#/%m/"` autoscript "postinst" "postinst-suid" "$sedstr" autoscript "postrm" "postrm-suid" "$sedstr" diff --git a/dh_suidregister.1 b/dh_suidregister.1 index e15e6d5f..97dcb24b 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -3,7 +3,7 @@ dh_suidregister \- set up package to register files with suidregister .SH SYNOPSIS .B dh_suidregister -.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" .SH "DESCRIPTION" dh_suidregister is a debhelper program that is responsible for modifying the postinst and postrm scripts of a package so the package will register files @@ -39,6 +39,9 @@ Register files for all architecture independent packages. .B \-ppackage Register files for the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B file ... Register these files in the first binary package listed in debian/control, if we are acting on that package. diff --git a/dh_undocumented b/dh_undocumented index ebde8904..fe1dbf2d 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -41,11 +41,11 @@ for PACKAGE in $DH_DOPACKAGES; do reldir=.. fi - if [ ! -d debian/$TMP/$dir ]; then - doit "install -d debian/$TMP/$dir" + if [ ! -d $TMP/$dir ]; then + doit "install -d $TMP/$dir" fi - doit ln -s $reldir/man7/undocumented.7.gz debian/$TMP/$dir/$file.gz + doit ln -s $reldir/man7/undocumented.7.gz $TMP/$dir/$file.gz done fi done diff --git a/dh_undocumented.1 b/dh_undocumented.1 index ab45baad..d6ec21bf 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -3,7 +3,7 @@ dh_undocumented \- make symlinks to undocumented.7 man page .SH SYNOPSIS .B dh_undocumented -.I "[-v] [-a] [-i] [-ppackage] [manpage ...]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [manpage ...]" .SH "DESCRIPTION" dh_undocumented is a debhelper program that is responsible for making symlinks to the @@ -42,6 +42,9 @@ Install undocumented man page symlinks for all architecture independent packages .B \-ppackage Install undocumented man page symlinks for the package named "package". .TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP .B manpage ... Install undocumented man page symlinks for each of these man pages into the first binary package listed in debian/control, if we are acting on -- cgit v1.2.3 From 8d1bbcb775d700523862844bc41cfb8ef6a8672a Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:38:52 +0000 Subject: r33: Initial Import --- README | 20 ++++++++++---------- debian/changelog | 7 +++++++ dh_clean.1 | 2 +- dh_du.1 | 2 +- dh_fixperms.1 | 2 +- dh_installdocs.1 | 2 +- dh_installexamples.1 | 4 ++-- dh_installmanpages.1 | 4 ++-- dh_makeshlibs.1 | 4 ++-- dh_suidregister.1 | 2 +- dh_testdir.1 | 2 +- dh_undocumented.1 | 2 +- 12 files changed, 30 insertions(+), 23 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/README b/README index 53b6c3d9..2bb9c7a5 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ to automate common tasks. For further documentation, see the man pages for dh_* commands. To help you get started, I've included an example of a debian/rules file -that uses debhelper commands extensivly. See +that uses debhelper commands extensively. See /usr/doc/debhelper/examples/rules . These files are also useful as they give one good order you can run the different debhelper scripts in (though other variations are possible). @@ -12,8 +12,8 @@ variations are possible). Converting from debstd to debhelper: ----------------------------------- -Debhelper is designed to be mostly backwards compatable to debstd. I say -mostly becuase I haven't made debhelper handle everything that debstd does +Debhelper is designed to be mostly backwards compatible to debstd. I say +mostly because I haven't made debhelper handle everything that debstd does yet, and in a few cases, it does things differently (and I hope, better). In general, you can switch over to using debhelper as follows. In your @@ -44,19 +44,19 @@ Notice that the parameters sent to debstd get split up among the dh_* programs. The upstream changelog is passed to dh_installchangelogs, and the docs are passed to dh_installdocs. -Debstd has many switches, that turn off differnt parts of it. So if you +Debstd has many switches, that turn off different parts of it. So if you were using debstd -m to tell it not to automatically install manpages, for example, you can just comment out the dh_installmanpages line. Finally, debstd automatically modified postinst, postrm, etc scripts. Some -of the dehelper apps do that too, but they do it differnently. Debstd just -appends its commands to the end of the script. Debhelper reqyires that you +of the dehelper apps do that too, but they do it differently. Debstd just +appends its commands to the end of the script. Debhelper requires that you insert a tag into your scripts, that will tell debhelper where to insert commands. So if you have postinst, postrm, etc scripts, add a line reading -"#DEBHELPER" to the end of them. +"#DEBHELPER#" to the end of them. Once you think it's all set up properly, do a test build of your package. If -it works ok, I reccommend that you compare the new package and the old +it works ok, I recommend that you compare the new package and the old debstd-generated package very closely. Pay special attention to the postint, postrm, etc scripts. @@ -88,7 +88,7 @@ because you need to generate the architecture dependent packages in the binary-arch debian/rules target, and the architecture independent packages in the binary-indep debian/rules target. -To faciliatate this, as well as give you more control over which packages +To facilitate this, as well as give you more control over which packages are acted on by debhelper programs, all debhelper programs accept the following parameters: @@ -112,7 +112,7 @@ package listed in debian/control, and debian/ for each additional package. Sometimes, you might want to use some other temporary directory. This is -supported by the -P flag. The direcotry to use is specified after -P, for +supported by the -P flag. The directory to use is specified after -P, for example, "dh_installdocs -Pdebian/tmp", will use debian/tmp as the temporary directory. Note that if you use -P, the debhelper programs can only be acting on a single package at a time. So if you have a package that builds diff --git a/debian/changelog b/debian/changelog index 053ed047..b652cde1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.27) unstable; urgency=low + + * README: fixed typoes (one serious). + * Ran ispell on all the documentation. + + -- Joey Hess Sun, 30 Nov 1997 18:48:20 -0500 + debhelper (0.26) unstable; urgency=low * dh_installdirs: Do not create usr/doc/$PACKAGE directory. Bug #15498 diff --git a/dh_clean.1 b/dh_clean.1 index 651b5b08..a9f0bdfd 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -35,7 +35,7 @@ The and .B \-p arguments are cumulative. If none are specified, then all packages listed in -the control file will have thier package build directories cleaned up. +the control file will have their package build directories cleaned up. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_du.1 b/dh_du.1 index d7d5061c..315d0b98 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -7,7 +7,7 @@ dh_du \- generate DEBIAN/du file .SH "DESCRIPTION" dh_du is a debhelper program that is responsible for generating a DEBIAN/du file, which lists the disk usage of directories in the package. -This file isn't used by anthing yet, but it could be helpful for a future +This file isn't used by anything yet, but it could be helpful for a future debian installer program. .P The du file is installed with proper permissions and ownerships. diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 8ae36def..c403836c 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -35,7 +35,7 @@ The and .B \-p arguments are cumulative. If none are specified, then all packages listed in -the control file will have thier permissions fixed. +the control file will have their permissions fixed. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 68f3808c..9724635e 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -50,7 +50,7 @@ and arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. .P -Note that dh_installdocs will happily copy entire directory hiearchies if +Note that dh_installdocs will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT diff --git a/dh_installexamples.1 b/dh_installexamples.1 index 5c8ce8c0..c940d256 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -13,7 +13,7 @@ binary package listed in debian/control, if dh_installexamples is acting on that package. .P A file named debian/examples (for the first binary package in debian/control), -or debian/package.exmaples (for each additional package in debian/control) can +or debian/package.examples (for each additional package in debian/control) can list other files to be installed. .SH OPTIONS .TP @@ -44,7 +44,7 @@ and arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. .P -Note that dh_examples will happily copy entire directory hiearchies if +Note that dh_examples will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 06794044..7687ed9c 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -13,7 +13,7 @@ dh_installmanpages scans the current directory and all subdirectories for filenames that look like man pages. It uses .BR file (1) to verify that the files are in the correct format. Then, based on the -files' extentions, it installs them into the correct man directory. +files' extensions, it installs them into the correct man directory. .P All filenames specified as parameters will be skipped by dh_installmanpages. This is useful if by default it installs some man pages that you do not want @@ -58,7 +58,7 @@ Enables verbose mode .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS -Man pages with the extention +Man pages with the extension .B .man are not automatically installed. .P diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index e4296e47..0b7df353 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -41,9 +41,9 @@ Enables verbose mode .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS -There is no guarentee that the program will get the shlibs file right. For +There is no guarantee that the program will get the shlibs file right. For example, it may not correctly guess the major number of your package. In -casews like these (and perhaps in general, just to be safe), it is better to +cases like these (and perhaps in general, just to be safe), it is better to create a debian/shlibs file by hand. This is a "do what I Mean" type program - you have been warned! .SH AUTHOR diff --git a/dh_suidregister.1 b/dh_suidregister.1 index 97dcb24b..c69f6128 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -24,7 +24,7 @@ will automatically register all files it finds. .P Note that this package modifies your postinst and postrm files. See .BR dh_installdebfiles (1) -for an explination of how this works. +for an explanation of how this works. .SH OPTIONS .TP .B \-v diff --git a/dh_testdir.1 b/dh_testdir.1 index da245542..c3212301 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -16,7 +16,7 @@ Verbose mode; show all commands that modify the package build directory. This currently has no effect. .TP .B file ... -Test for the existance of these files. +Test for the existence of these files. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_undocumented.1 b/dh_undocumented.1 index d6ec21bf..cea97516 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -13,7 +13,7 @@ man page for man pages that are not present in your package. The program takes a list of man pages that should be symlinked to .BR undocumented (7) It determines what directory the man pages should be placed in by examining -their extentions - pages ending in "x" go into /usr/X11R6/man/, while pages +their extensions - pages ending in "x" go into /usr/X11R6/man/, while pages that end in anything else go in /usr/man/. It also examines the extention to see what section the man page belongs in. After figuring this out, it generates the necessary symlinks to -- cgit v1.2.3 From 050d55509586c51def636f895075c62877c9fae7 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:42:15 +0000 Subject: r48: Initial Import --- debian/changelog | 14 +++++++ debian/rules | 6 +-- dh_builddeb.1 | 10 ++--- dh_compress | 8 ++-- dh_fixperms | 1 - dh_gencontrol.1 | 12 +++--- dh_installchangelogs.1 | 15 +++++--- dh_installcron.1 | 10 ++--- dh_installdeb.1 | 10 ++--- dh_installdirs | 6 +-- dh_installdirs.1 | 7 ++-- dh_installdocs.1 | 5 +-- dh_installexamples | 6 +-- dh_installexamples.1 | 5 +-- dh_installinit | 6 --- dh_installinit.1 | 11 ++---- dh_installmanpages | 4 +- dh_installmanpages.1 | 3 ++ dh_installmenu | 13 ++++--- dh_installmenu.1 | 9 ++--- dh_lib | 101 ++++++++++--------------------------------------- dh_md5sums.1 | 12 +++--- dh_movefiles.1 | 10 ++--- dh_shlibdeps.1 | 12 +++--- dh_strip.1 | 10 ++--- dh_suidregister | 8 ++-- dh_suidregister.1 | 5 +-- dh_testdir.1 | 2 +- dh_testroot.1 | 2 +- dh_undocumented | 6 +-- dh_undocumented.1 | 6 +-- 31 files changed, 141 insertions(+), 194 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/debian/changelog b/debian/changelog index 6eab06d4..ea45ec9d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +debhelper (0.53) unstable; urgency=low + + * dh_installmanpages: ignore all man pages installed into debian/tmp + type directories. (#16933) + * dh_*: set up alternative name for files like debian/dirs; you may now + use debian/.dirs too, for consistency. (#16934) + * dh_installdocs: if a debian/package.copyright file exists, use it in + preference to debian/copyright, so subpackages with varying copyrights + are supported. (#16935) + * Added dh_movefiles, which moves files out of debian/tmp into subpackages. + (#16932) + + -- Joey Hess Sat, 10 Jan 1998 11:30:12 -0500 + debhelper (0.52) unstable; urgency=low * dh_compress: compress file belongs in debian/. It was looking in ./ diff --git a/debian/rules b/debian/rules index 8bbcad55..892f7e69 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # Note that I have to refer to debhelper programs with ./, to make sure # I run the most current ones. That's also why there is a symlink to the -# current dh_lib in this debian/ directory. +# current dh_lib and the current dh_getopt.pl in this debian/ directory. # If any automatic script generation is done in building this package, # be sure to use the new templates from this package. @@ -37,9 +37,9 @@ binary-indep: build ./dh_clean -k ./dh_installdirs usr/bin usr/lib/debhelper - find . -perm +111 -maxdepth 1 -type f \ + find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \ -exec install -p {} debian/tmp/usr/bin \; - cp dh_lib debian/tmp/usr/lib/debhelper + cp -a dh_lib dh_getopt.pl debian/tmp/usr/lib/debhelper cp -a autoscripts debian/tmp/usr/lib/debhelper ./dh_installdocs TODO README diff --git a/dh_builddeb.1 b/dh_builddeb.1 index 8a51a8f4..9d52b3ab 100644 --- a/dh_builddeb.1 +++ b/dh_builddeb.1 @@ -10,19 +10,19 @@ dh_builddeb simply calls to build a .deb package or packages. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory, etc. .TP -.B \-a +.B \-a, \--arch Build all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Build all architecture independent packages. .TP -.B \-ppackage +.B -ppackage, \--package=package Build the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_compress b/dh_compress index 4626ed09..58eb30f4 100755 --- a/dh_compress +++ b/dh_compress @@ -8,17 +8,17 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + compress=`pkgfile $PACKAGE compress` - # Run the file name gatering commands from within the directory + # Run the file name gathering commands from within the directory # structure that will be effected. olddir=`pwd` doit "cd $TMP" - if [ -f $olddir/debian/${EXT}compress ]; then + if [ "$compress" ]; then # The config file is a sh script that outputs the files to be compressed # (typically using find). - files=`sh $olddir/debian/${EXT}compress 2>/dev/null` + files=`sh $olddir/$compress 2>/dev/null` else # By default fall back on what the policy manual says to compress. files=` diff --git a/dh_fixperms b/dh_fixperms index 32c9dbef..0d667fd3 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -7,7 +7,6 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` # General things.. if [ -d $TMP ]; then diff --git a/dh_gencontrol.1 b/dh_gencontrol.1 index 7b78248f..484add0e 100644 --- a/dh_gencontrol.1 +++ b/dh_gencontrol.1 @@ -16,22 +16,22 @@ You may prefer to simply run by hand. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-uparams +.B \-uparams, \--update-rcd-params=params Pass "params" to .BR dpkg-gencontrol (1) .SH NOTES diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1 index 8c42a011..4ec5ce91 100644 --- a/dh_installchangelogs.1 +++ b/dh_installchangelogs.1 @@ -3,7 +3,7 @@ dh_installchangelogs \- install changelogs into package build directories .SH SYNOPSIS .B dh_installchangelogs -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] upstream" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [upstream]" .SH "DESCRIPTION" dh_installchangelogs is a debhelper program that is responsible for installing changelogs into package build directories. @@ -18,20 +18,23 @@ not a native debian package, then this upstream changelog will be installed as usr/doc/package/changelog in the package build directory. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install changelogs for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install changelogs for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install changelogs for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. +.TP +.B upstream +Instal this file as the upstream changelog. .SH NOTES The .B \-a diff --git a/dh_installcron.1 b/dh_installcron.1 index 3407a62f..f090420b 100644 --- a/dh_installcron.1 +++ b/dh_installcron.1 @@ -14,19 +14,19 @@ debian/package.cron.daily, where "package" is replaced with the name of the binary package this cron script goes into. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install cron files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install cron files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install cron files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_installdeb.1 b/dh_installdeb.1 index acb1a7f0..bb658262 100644 --- a/dh_installdeb.1 +++ b/dh_installdeb.1 @@ -34,19 +34,19 @@ programs, such as , and are shell script fragments. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_installdirs b/dh_installdirs index 1ef311e7..e733e7ce 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -7,7 +7,7 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + file=`pkgfile $PACKAGE dirs` if [ ! -d $TMP ]; then doit "install -d $TMP" @@ -15,8 +15,8 @@ for PACKAGE in $DH_DOPACKAGES; do dirs="" - if [ -e debian/${EXT}dirs ]; then - dirs=`tr "\n" " " < debian/${EXT}dirs` + if [ "$file" ]; then + dirs=`tr "\n" " " < $file` fi if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \ diff --git a/dh_installdirs.1 b/dh_installdirs.1 index 0fba87de..56c641b3 100644 --- a/dh_installdirs.1 +++ b/dh_installdirs.1 @@ -13,10 +13,9 @@ build directory of the first package dh_installdirs is told to act on. By default, this is the first binary package in debian/control, but if you use -p, -i, or -a flags, it will be the first package specified by those flags. .P -A file named debian/dirs (for the first binary package in debian/control), -or debian/package.dirs (for each additional package in debian/control) can -list other directories to be created. Separate the directory names with -whitespace. +A file named debian/package.dirs (debian/dirs may be used for the first +binary package in debian/control) can list other directories to be created. +Separate the directory names with whitespace. .P Be sure to only use directory names relative to the package build directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead. diff --git a/dh_installdocs.1 b/dh_installdocs.1 index ab9ed476..6a0290a4 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -23,9 +23,8 @@ debian/control, if dh_installdocs is acting on that package. Note that debian/TODO will be installed named TODO.Debian, if the package is not a debian native package. .P -A file named debian/docs (for the first binary package in debian/control), -or debian/package.docs (for each additional package in debian/control) can -list other files to be installed. +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. .SH OPTIONS .TP .B \-v diff --git a/dh_installexamples b/dh_installexamples index 423c647a..623d882b 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -8,12 +8,12 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + file=`pkgfile $PACKAGE examples` examples="" - if [ -e debian/${EXT}examples ]; then - examples=`tr "\n" " " < debian/${EXT}examples` + if [ "$file" ]; then + examples=`tr "\n" " " < $file` fi if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \ diff --git a/dh_installexamples.1 b/dh_installexamples.1 index e46ed826..e038faf7 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -13,9 +13,8 @@ package dh_installdirs is told to act on. By default, this is the first binary package in debian/control, but if you use -p, -i, or -a flags, it will be the first package specified by those flags. .P -A file named debian/examples (for the first binary package in debian/control), -or debian/package.examples (for each additional package in debian/control) can -list other files to be installed. +A file named debian/package.examples (debian/examples may be used for the +first binary package in debian/control) can list other files to be installed. .SH OPTIONS .TP .B \-v diff --git a/dh_installinit b/dh_installinit index 207131cd..803ef81f 100755 --- a/dh_installinit +++ b/dh_installinit @@ -6,12 +6,6 @@ PATH=debian:$PATH:/usr/lib/debhelper . dh_lib -# This works around a bug in getopt(1), where it ignores some parameters. -# Sigh. -if [ "$*" ]; then - DH_U_PARAMS="$DH_U_PARAMS $*" -fi - for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` init=`pkgfile $PACKAGE init` diff --git a/dh_installinit.1 b/dh_installinit.1 index 13f87549..6a2ab321 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -12,13 +12,10 @@ It also automatically generates the postinst and postrm and prerm commands needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init scripts. .P -If a file named debian/init exists, then it is installed into -etc/init.d/package in the package build directory (with "package" replaced -by the package name, unless the -d flag is specified, see below) -.P -For packages other than the first binary package listed in -the control file, use debian/package.init instead (replace "package" with -the name of the package.) +If a file named debian/package.init exists, then it is installed into +etc/init.d/package in the package build directory, with "package" replaced +by the packagename. (You may use debian/init for the first binary package +listed in the control file.) .SH OPTIONS .TP .B \-v diff --git a/dh_installmanpages b/dh_installmanpages index 4a0ffb47..9bcd8910 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -13,7 +13,9 @@ for PACKAGE in $DH_DOPACKAGES; do # Find all filenames that look like man pages. # .ex files are examples installed by deb-make, we don't want those, or # .in files, which are from configure. - for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in" | grep -v ^$TMP`; do + # We also need to exclude all debian/tmp type dirs. + EXCLUDE=`grep ^Package: debian/control | cut -d " " -f 2 | tac | tr "\n" "|"` + for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in" | egrep -v "^debian/(${EXCLUDE}tmp)"`; do # Make sure file thinks they are man pages. if file $file|grep -q roff; then if echo $file|grep -q /; then diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 7687ed9c..b8b580e1 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -65,6 +65,9 @@ are not automatically installed. Files specified as parameters that contain spaces in their filenames will not be processed properly. .P +By default, all man pages are installed into all binary packages, which is +almost never what you really want (use -p to work around this). +.P This is a "Do what I Mean" type program - you have been warned! .SH AUTHOR Joey Hess diff --git a/dh_installmenu b/dh_installmenu index 5071a2f3..9fbbfb21 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -13,27 +13,28 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + menu=`pkgfile $PACKAGE menu` + menu_method=`pkgfile $PACKAGE menu-method` - if [ -e debian/${EXT}menu ]; then + if [ "$menu" ]; then if [ ! -d $TMP/usr/lib/menu ]; then doit "install -d $TMP/usr/lib/menu" fi - doit "install -p -m644 debian/${EXT}menu $TMP/usr/lib/menu/$PACKAGE" + doit "install -p -m644 $menu $TMP/usr/lib/menu/$PACKAGE" # Add the scripts if a menu-method file doesn't exist. # The scripts for menu-method handle everything these do, too. - if [ ! -e debian/${EXT}menu-method -a ! "$DH_NOSCRIPTS" ]; then + if [ ! "$menu_method" -a ! "$DH_NOSCRIPTS" ]; then autoscript "postinst" "postinst-menu" autoscript "postrm" "postrm-menu" fi fi - if [ -e debian/${EXT}menu-method ]; then + if [ "$menu_method" ]; then if [ ! -d $TMP/etc/menu-methods ]; then doit "install -d $TMP/etc/menu-methods" fi - doit "install -p debian/${EXT}menu-method $TMP/etc/menu-methods/$PACKAGE" + doit "install -p $menu_method $TMP/etc/menu-methods/$PACKAGE" if [ ! "$DH_NOSCRIPTS" ]; then autoscript "postinst" "postinst-menu-method" "s/#PACKAGE#/$PACKAGE/" diff --git a/dh_installmenu.1 b/dh_installmenu.1 index 11bc71b8..320e1005 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -13,17 +13,16 @@ interface with the debian menu package. See .BR dh_installdeb (1) for an explanation of how this works. .P -If a file named debian/menu exists, then it is installed into +If a file named debian/package.menu exists, then it is installed into usr/lib/menu/package in the package build directory. This is a debian menu file. .P -If a file named debian/menu-method exits, then it is installed into +If a file named debian/package.menu-method exits, then it is installed into etc/menu-methods/package in the package build directory. This is a debian menu method file. .P -For packages other than the first binary package listed in -the control file, use debian/package.menu and debian/package.menu-method -instead (replace "package" with the name of the package.) +For the first first binary package listed in the control file, you may use +debian/menu and debian/menu-method instead. .SH OPTIONS .TP .B \-v diff --git a/dh_lib b/dh_lib index 06a4666b..020f9e6d 100644 --- a/dh_lib +++ b/dh_lib @@ -1,4 +1,6 @@ # Library functions for debhelper programs. +# +# Joey Hess, GPL copyright 1997, 1998. # Run a command, and display the command to stdout if verbose mode is on. # All commands that modifiy files in $TMP should be ran via this @@ -156,92 +158,29 @@ get_arch_indep_packages() { # Argument processing and global variable initialization is below. -# Parse command line. -set -- `getopt xvidrnakVAp:P:u:m: $*` - -for i; do - case "$i" - in - -v) - DH_VERBOSE=1 - shift - ;; - -i) - get_arch_indep_packages - DH_DOPACKAGES="$DH_DOPACKAGES $INDEP_PACKAGES" - DH_DOINDEP=1 - shift - ;; - -a) - get_arch_indep_packages - DH_DOPACKAGES="$DH_DOPACKAGES $ARCH_PACKAGES" - DH_DOARCH=1 - shift - ;; - -p) - DH_DOPACKAGES="$DH_DOPACKAGES $2" - shift - shift - ;; - -n) - DH_NOSCRIPTS=1 - shift - ;; - -x) - DH_EXCLUDE=1 - shift - ;; - -d) - DH_D_FLAG=1 - shift - ;; - -r) - DH_R_FLAG=1 - shift - ;; - -k) - DH_K_FLAG=1 - shift - ;; - -P) - DH_TMPDIR="$2" - shift - shift - ;; - -u) - DH_U_PARAMS="$2" - shift - shift - ;; - -m) - DH_M_PARAMS="$2" - shift - shift - ;; - -V) - DH_V_FLAG=1 - shift - ;; - -A) - DH_PARAMS_ALL=1 - shift - ;; - --) - shift - break - ;; - esac +# Check to see if an argument on the command line starts with a dash. +# if so, we need to pass this off to the resource intensive perl. +for arg; do + if expr "$arg" : '-' >/dev/null ; then + parseopt=1 + break + fi done +if [ "$parseopt" ]; then + parseopt="" + # Parse command line. I wrote a perl program to do this becuase + # getopt(1) is so broken. Note: the quotes around $@ are very + # important! + eval `dh_getopt.pl "$@"` + if [ "$DH_PARSE_ERROR" ]; then + error "$DH_PARSE_ERROR" + fi +fi # Get the name of the main binary package (first one listed in # debian/control). MAINPACKAGE=`grep ^Package: debian/control | cut -d " " -f 2 | head -1` -# Remove leading spaces from DH_DOPACKAGES. -if expr "$DH_DOPACKAGES" : ' *.*' >/dev/null ; then - DH_DOPACKAGES_NEW=`expr "$DH_DOPACKAGES" : ' *\(.*\)'` -fi - # Check if packages to build have been specified, if not, fall back to # the default, doing them all. if [ ! "$DH_DOPACKAGES" ]; then @@ -266,7 +205,7 @@ for PACKAGE in $DH_DOPACKAGES ; do done # Check to see if: DH_FIRSTPACKAGE is not the MAINPACKAGE, and -# some command line arguemnts are passed. Display a warning, becuase +# some command line arguements are passed. Display a warning, becuase # debhelper's behaviour has changed in this case. if [ "$DH_FIRSTPACKAGE" != "$MAINPACKAGE" -a "$*" ]; then echo `basename $0`": Warning: my behavior has changed, and command line" >&2 diff --git a/dh_md5sums.1 b/dh_md5sums.1 index 28f7fe45..ab3c2bed 100644 --- a/dh_md5sums.1 +++ b/dh_md5sums.1 @@ -14,23 +14,23 @@ All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles The md5sums file is installed with proper permissions and ownerships. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Generate md5sums files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Generate md5sums files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Generate md5sums file for the package named "package". .TP -.B \-x +.B \-x, \--include-conffiles Include conffiles in the md5sums list. Note that this is redundant, and included elsewhere in debian packages. .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_movefiles.1 b/dh_movefiles.1 index 228f9401..c2b0e92a 100644 --- a/dh_movefiles.1 +++ b/dh_movefiles.1 @@ -14,19 +14,19 @@ Files named debian/package.files list the files to be moved, separated by whitespace. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Move files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Move files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Move files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1 index 77d90c25..421a2215 100644 --- a/dh_shlibdeps.1 +++ b/dh_shlibdeps.1 @@ -17,22 +17,22 @@ prefer to simply run by hand. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-uparams +.B \-uparams, \--dpkg-shlibdeps-params=params Pass "params" to .BR dpkg-shlibdeps (1) .SH NOTES diff --git a/dh_strip.1 b/dh_strip.1 index fa3c7694..9cdd85a0 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -13,20 +13,20 @@ It assumes that files that have names like lib*_g.a are static libraries used in debugging, and will not strip them. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Strip files in all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Strip files in all architecture independent packages (likely, this is pointless :-). .TP -.B \-ppackage +.B \-ppackage, \--package=package Strip files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_suidregister b/dh_suidregister index 3f7622af..bc8aa5f2 100755 --- a/dh_suidregister +++ b/dh_suidregister @@ -11,12 +11,12 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + suid=`pkgfile $PACKAGE suid` files="" - if [ -e debian/${EXT}suid ]; then - files=`tr "\n" " " < debian/${EXT}suid` + if [ "$suid" ]; then + files=`tr "\n" " " < $suid` fi if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \ @@ -24,7 +24,7 @@ for PACKAGE in $DH_DOPACKAGES; do files="$* $files" fi - if [ ! "$files" -a ! -e debian/${EXT}suid ]; then + if [ ! "$files" -a ! "$suid" ]; then # No files specified (and no empty debian/suid file), so # guess what files to process. files=`find $TMP -type f -perm +6000` diff --git a/dh_suidregister.1 b/dh_suidregister.1 index ef5b08dc..29fc504b 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -16,9 +16,8 @@ package dh_installdocs is told to act on. By default, this is the first binary package in debian/control, but if you use -p, -i, or -a flags, it will be the first package specified by those flags. .P -The files debian/suid (for the first binary package in debian/control) or -debian/package.suid (for each additional package in debian/control) can -list other files to be registered. +Files named debian/package.suid (or debian/suid for the first binary package +in debian/control) can list other files to be registered. .P If neither of these methods is used to specify files, dh_suidregister will scan the package build directory for files that have suid permissions, and diff --git a/dh_testdir.1 b/dh_testdir.1 index c3212301..17561acc 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -11,7 +11,7 @@ exists, as well as any other files you specify. If not, it exits with an error. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. This currently has no effect. .TP diff --git a/dh_testroot.1 b/dh_testroot.1 index 78caa7e9..605dae4c 100644 --- a/dh_testroot.1 +++ b/dh_testroot.1 @@ -11,7 +11,7 @@ error. Debian packages must be built as root, though you can use to work around this. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. This currently has no effect. .SH ENVIRONMENT diff --git a/dh_undocumented b/dh_undocumented index 31b2f987..edd873f7 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -11,12 +11,12 @@ PATH=debian:$PATH:/usr/lib/debhelper for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` + undocumented=`pkgfile $PACKAGE undocumented` undoc="" - if [ -e debian/${EXT}undocumented ]; then - undoc=`tr "\n" " " < debian/${EXT}undocumented` + if [ "$undocumented" ]; then + undoc=`tr "\n" " " < $undocumented` fi if [ \( "$PACKAGE" = "$DH_FIRSTPACKAGE" -o "$DH_PARAMS_ALL" \) \ diff --git a/dh_undocumented.1 b/dh_undocumented.1 index 9df8e311..677c90f8 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -27,9 +27,9 @@ parameters will be set up in the first package dh_undocumented is told to act on. By default, this is the first binary package in debian/control, but if you use -p, -i, or -a flags, it will be the first package specified by those flags. -Also, a file named debian/undocumented (for the first binary package in -debian/control), or debian/package.undocumented (for each additional package -in debian/control) can list other man page names to set up. +Also, a file named debian/package.undocumented (or debian/undocumented, for +the first binary package in debian/control) can list other man page names to +set up. .SH OPTIONS .TP .B \-v -- cgit v1.2.3 From b8fc5a1b99da4ffb113d42f373b7c84772d1413a Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:42:23 +0000 Subject: r49: Initial Import --- debian/changelog | 11 +++++++++++ dh_clean | 2 +- dh_clean.1 | 12 ++++++------ dh_compress.1 | 10 +++++----- dh_du.1 | 10 +++++----- dh_fixperms.1 | 10 +++++----- dh_installdirs.1 | 12 ++++++------ dh_installdocs.1 | 12 ++++++------ dh_installexamples.1 | 14 +++++++------- dh_installinit.1 | 25 +++++++++---------------- dh_installmanpages.1 | 10 +++++----- dh_installmenu.1 | 12 ++++++------ dh_makeshlibs | 6 +++--- dh_makeshlibs.1 | 24 ++++++++---------------- dh_suidregister.1 | 12 ++++++------ dh_undocumented.1 | 12 ++++++------ examples/rules | 7 +++++++ examples/rules.indep | 7 +++++++ examples/rules.multi | 12 ++++++++++++ 19 files changed, 121 insertions(+), 99 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/debian/changelog b/debian/changelog index ea45ec9d..3a5a9200 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (0.54) unstable; urgency=low + + * dh_lib: no longer call getopt(1) to parse options. I wrote my own + argument processor in perl. + * Added long versions of all arguments. TODO: document them. + * All parameters may now be passed values that include whitespace (ie, + dh_installinit -u"defaults 10") + * Now depends on perl (needs Getopt::Long). + + -- Joey Hess Sat, 10 Jan 1998 15:44:09 -0500 + debhelper (0.53) unstable; urgency=low * dh_installmanpages: ignore all man pages installed into debian/tmp diff --git a/dh_clean b/dh_clean index ba20e3ea..73fb88f0 100755 --- a/dh_clean +++ b/dh_clean @@ -10,7 +10,7 @@ for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` substvars=`pkgfile $PACKAGE substvars` if [ "$substvars" ]; then - doit "rm -f debian/$substvars" + doit "rm -f $substvars" fi doit "rm -rf $TMP" done diff --git a/dh_clean.1 b/dh_clean.1 index 5d9180a9..f4f14c5a 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -11,22 +11,22 @@ other files, such as debian/substvars, debian/files, DEADJOE, emacs backup files, etc. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Clean up the package build directory for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Clean up the package build directory for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Clean up the package build directory for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-k +.B \-k, \--keep Do not delete debian/files. When do you want to use this? Anytime you have a debian/rules that has 2 binary targets that build different .deb packages; for example, one target is binary-arch, and the other is binary-indep, or diff --git a/dh_compress.1 b/dh_compress.1 index ce8f539a..9e23a8f0 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -31,19 +31,19 @@ customization of what files are compressed: ! -name "copyright" .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Compress files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Compress files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Compress files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_du.1 b/dh_du.1 index 315d0b98..41bd1c43 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -13,19 +13,19 @@ debian installer program. The du file is installed with proper permissions and ownerships. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Generate du files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Generate du files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Generate du file for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 1fac26c3..316644d6 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -15,19 +15,19 @@ root, and it removes group and other write permission from all files. Finally, it removes execute permissions from any libraries that have it set. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Fix permissions for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Fix permissions for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Fix permissions for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_installdirs.1 b/dh_installdirs.1 index 56c641b3..0c6aaa54 100644 --- a/dh_installdirs.1 +++ b/dh_installdirs.1 @@ -21,22 +21,22 @@ Be sure to only use directory names relative to the package build directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Create directories for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Create directories for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Create directories for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Create any directories specified by command line parameters in ALL packages acted on. .TP diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 6a0290a4..6b8b33a6 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -27,22 +27,22 @@ 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. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install all files specified by command line parameters in ALL packages acted on. .TP diff --git a/dh_installexamples.1 b/dh_installexamples.1 index e038faf7..c2997d95 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -17,22 +17,22 @@ A file named debian/package.examples (debian/examples may be used for the first binary package in debian/control) can list other files to be installed. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install any files specified by command line parameters in ALL packages acted on. .TP @@ -48,7 +48,7 @@ and arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. .P -Note that dh_examples will happily copy entire directory hierarchies if +Note that dh_installexamples will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT diff --git a/dh_installinit.1 b/dh_installinit.1 index 6a2ab321..29bb867a 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -18,33 +18,33 @@ by the packagename. (You may use debian/init for the first binary package listed in the control file.) .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install init scripts into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install init scripts into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install init scripts into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-n +.B \-n, \--noscripts Do not modify postinst/postrm/prerm scripts. .TP -.B \-r +.B \-r, \--no-restart-on-upgrade Do not restart daemon on upgrade. .TP -.B \-d +.B \-d, \--remove-d Remove trailing "d" from the name of the package, and use the result for the filename the init script is installed as in etc/init.d/ . This may be useful for daemons with named ending in "d". .TP -.B \-uparams +.B \-uparams, \--update-rcd-params=params Pass "params" to .BR update-rc.d (8) If not specified, "default" will be passed to @@ -57,13 +57,6 @@ and .B \-p arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. -.P -Due to a bug in -.BR getopt (1) -, you cannot really text with spaces in it to the -u flag. However, this bug -has been worked around, and it should appear to work. What it's really doing -is looking at any parameters passed that are not known flags, and appending -that text onto the end of the text specified by the -u flag. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index b8b580e1..e44eaf22 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -20,19 +20,19 @@ This is useful if by default it installs some man pages that you do not want to be installed. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install man pages into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install man pages into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install man pages into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP .B file ... diff --git a/dh_installmenu.1 b/dh_installmenu.1 index 320e1005..cf54949c 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -25,22 +25,22 @@ For the first first binary package listed in the control file, you may use debian/menu and debian/menu-method instead. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install menu files into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install menu files into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install menu files into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-n +.B \-n, \--noscripts Do not modify postinst/postrm scripts. .SH NOTES The diff --git a/dh_makeshlibs b/dh_makeshlibs index f96c327f..d595c3b5 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -24,9 +24,9 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! -d "$TMP/DEBIAN" ] ; then doit "install -d $TMP/DEBIAN" fi - if [ "$DH_V_FLAG" ]; then - if [ "$*" ]; then - PACKAGE="$*" + if [ "$DH_V_FLAG_SET" ]; then + if [ "$DH_V_FLAG" ]; then + PACKAGE="$DH_V_FLAG" else # Call isnative becuase it sets $VERSION # as a side effect. diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index 056cc0f2..cb2703f4 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -3,7 +3,7 @@ dh_makeshlibs \- automatically create shlibs file .SH SYNOPSIS .B dh_makeshlibs -.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V [dependancies]]" +.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V[dependancies]]" .SH "DESCRIPTION" dh_makeshlibs is a debhelper program that automatically scans for shared libraries, and generates a shlibs file for the libraries it finds. @@ -12,26 +12,26 @@ For this program to work, you cannot have already installed a DEBIAN/shlibs file. If such a file exits, the program will exit with an error. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Generate shlibs files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Generate shlibs files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Generate shlibs file for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-mmajor +.B \-mmajor, \--major=major Instead of trying to guess the major number of the library from the filename of the library, use the major number specified after the -m parameter. .TP -.B \-V [dependancies] +.B \-V[dependancies], \--version-info, \--version-info=dependancies By default, the shlibs file generated by this program does not make packages depend on any particular version of the package containing the shared library. It may be necessary for you to add some version dependancy @@ -70,14 +70,6 @@ Enables verbose mode .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS -Due to limitations in -.BR getopt (1) -, I had to fudge a bit on how the -V parameter really works. When -V is -specified, it's really examining the rest of the command line for any text -that isn't a switch, and using that for the dependancy information. This -means that the -V switch and any dependancy parameters should come last on -the command line. -.P There is no guarantee that the program will get the shlibs file right. For example, it may not correctly guess the major number of your package. In cases like these (and perhaps in general, just to be safe), it is better to diff --git a/dh_suidregister.1 b/dh_suidregister.1 index 29fc504b..51e08fe5 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -28,22 +28,22 @@ Note that this package modifies your postinst and postrm files. See for an explanation of how this works. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Register files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Register files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Register files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Register any files specified by command line parameters in ALL packages acted on. I doubt anyone will find this useful, it's here for consitency with other debhelper programs. diff --git a/dh_undocumented.1 b/dh_undocumented.1 index 677c90f8..26498934 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -32,22 +32,22 @@ the first binary package in debian/control) can list other man page names to set up. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install undocumented man page symlinks for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install undocumented man page symlinks for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install undocumented man page symlinks for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install undocumented man page symlinks for any man pages specified by command line parameters in ALL packages acted on. I doubt anyone will find this useful, it's here for consitency with other debhelper programs. diff --git a/examples/rules b/examples/rules index 29c79dee..8e6683c1 100755 --- a/examples/rules +++ b/examples/rules @@ -7,16 +7,20 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. @@ -25,12 +29,15 @@ binary-indep: build # Build architecture-dependent files here. binary-arch: build +# dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.indep b/examples/rules.indep index fb46c623..601c5e3e 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -8,26 +8,33 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build +# dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.multi b/examples/rules.multi index 205ed4c8..a5be1efe 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -10,26 +10,34 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build +# dh_testversion dh_testdir -i dh_testroot -i dh_clean -i -k dh_installdirs -i + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + + dh_movefiles -i dh_installdocs -i dh_installexamples -i dh_installmenu -i @@ -49,12 +57,16 @@ binary-indep: build # Build architecture-dependent files here. binary-arch: build +# dh_testversion dh_testdir -a dh_testroot -a dh_clean -a -k dh_installdirs -a + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + + dh_movefiles -a dh_installdocs -a dh_installexamples -a dh_installmenu -a -- cgit v1.2.3 From 3486d848644af197ded8a7e8d8c533dc30a5e574 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:45:36 +0000 Subject: r54: Initial Import --- debian/changelog | 6 ++++++ dh_builddeb.1 | 9 ++++++++- dh_clean.1 | 9 ++++++++- dh_compress.1 | 9 ++++++++- dh_du.1 | 9 ++++++++- dh_fixperms.1 | 9 ++++++++- dh_gencontrol.1 | 9 ++++++++- dh_getopt.pl | 8 ++++++++ dh_installchangelogs.1 | 9 ++++++++- dh_installcron.1 | 9 ++++++++- dh_installdeb.1 | 9 ++++++++- dh_installdirs.1 | 9 ++++++++- dh_installdocs.1 | 9 ++++++++- dh_installexamples.1 | 9 ++++++++- dh_installmanpages.1 | 9 ++++++++- dh_installmenu.1 | 9 ++++++++- dh_lib | 8 ++++++-- dh_makeshlibs.1 | 9 ++++++++- dh_md5sums.1 | 9 ++++++++- dh_movefiles.1 | 9 ++++++++- dh_shlibdeps.1 | 9 ++++++++- dh_strip.1 | 9 ++++++++- dh_suidregister.1 | 9 ++++++++- dh_undocumented.1 | 9 ++++++++- 24 files changed, 188 insertions(+), 23 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/debian/changelog b/debian/changelog index 7ad9f034..f0faff1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.58) unstable; urgency=low + + * Fixed bug #17597 - DH_VERBOSE wasn'talways taking effect. + + -- Joey Hess Wed, 28 Jan 1998 17:18:17 -0500 + debhelper (0.57) unstable; urgency=low * Depend on perl 5.004 or greater (for Getopt::Long). diff --git a/dh_builddeb.1 b/dh_builddeb.1 index 9d52b3ab..ecbbfa6c 100644 --- a/dh_builddeb.1 +++ b/dh_builddeb.1 @@ -3,7 +3,7 @@ dh_builddeb \- build debian packages .SH SYNOPSIS .B dh_builddeb -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_builddeb simply calls .BR dpkg (8) @@ -19,6 +19,10 @@ Build all architecture dependent packages. .B \-i, \--indep Build all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B -ppackage, \--package=package Build the package named "package". .TP @@ -36,6 +40,9 @@ the control file will be built. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/dh_clean.1 b/dh_clean.1 index f4f14c5a..cb437e9c 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -3,7 +3,7 @@ dh_clean \- clean up package build directories .SH SYNOPSIS .B dh_clean -.I "[-v] [-a] [-i] [-k] [-ppackage] [-Ptmpdir] [file ...]" +.I "[-v] [-a] [-i] [-k] [--no-act] [-ppackage] [-Ptmpdir] [file ...]" .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 @@ -20,6 +20,10 @@ Clean up the package build directory for all architecture dependent packages. .B \-i, \--indep Clean up the package build directory for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Clean up the package build directory for the package named "package". .TP @@ -49,6 +53,9 @@ the control file will have their package build directories cleaned up. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_compress.1 b/dh_compress.1 index 9e23a8f0..dbb33e6d 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -3,7 +3,7 @@ dh_compress \- compress files and fix symlinks in package build directories .SH SYNOPSIS .B dh_compress -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any symlinks @@ -40,6 +40,10 @@ Compress files for all architecture dependent packages. .B \-i, \--indep Compress files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Compress files for the package named "package". .TP @@ -62,6 +66,9 @@ apply to. (This works for the first binary package too.) .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_du.1 b/dh_du.1 index 41bd1c43..9c04106e 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -3,7 +3,7 @@ dh_du \- generate DEBIAN/du file .SH SYNOPSIS .B dh_du -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_du is a debhelper program that is responsible for generating a DEBIAN/du file, which lists the disk usage of directories in the package. @@ -22,6 +22,10 @@ Generate du files for all architecture dependent packages. .B \-i, \--indep Generate du files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Generate du file for the package named "package". .TP @@ -39,6 +43,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 316644d6..913a8c76 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -3,7 +3,7 @@ dh_fixperms \- fix permissions of files in package build directories .SH SYNOPSIS .B dh_fixperms -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_fixperms is a debhelper program that is responsible for setting the permissions of files in package build directories to a sane state. @@ -24,6 +24,10 @@ Fix permissions for all architecture dependent packages. .B \-i, \--indep Fix permissions for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Fix permissions for the package named "package". .TP @@ -41,6 +45,9 @@ the control file will have their permissions fixed. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH "CONFORMS TO" diff --git a/dh_gencontrol.1 b/dh_gencontrol.1 index 484add0e..70486a97 100644 --- a/dh_gencontrol.1 +++ b/dh_gencontrol.1 @@ -3,7 +3,7 @@ dh_gencontrol \- generate and install control file .SH SYNOPSIS .B dh_gencontrol -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-uparams]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-uparams]" .SH "DESCRIPTION" dh_gencontrol is a debhelper program that is responsible for generating and installing control files, and installing them into the DEBIAN directory with @@ -25,6 +25,10 @@ Install files for all architecture dependent packages. .B \-i, \--indep Install files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install files for the package named "package". .TP @@ -46,6 +50,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .BR dpkg-shlibdeps (1) diff --git a/dh_getopt.pl b/dh_getopt.pl index a9969a1e..e877a551 100755 --- a/dh_getopt.pl +++ b/dh_getopt.pl @@ -107,6 +107,8 @@ GetOptions( "A" => \$all, "all" => \$all, + + "no-act" => \$no_act, ); # Check to see if -V was specified. If so, but no parameters were passed, @@ -121,10 +123,16 @@ if ($ENV{DH_VERBOSE} ne undef) { $verbose=1; } +# Check to see if DH_NO_ACT was set, if so, make sure no act mode is on. +if ($ENV{DH_NO_ACT} ne undef) { + $no_act=1; +} + # Now output everything, in a format suitable for a shell to eval it. # Note the last line sets $@ in the shell to whatever arguements remain. print qq{ DH_VERBOSE='$verbose' +DH_NO_ACT='$no_act' DH_DOPACKAGES='@packages' DH_DOINDEP='$indep' DH_DOARCH='$arch' diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1 index 4ec5ce91..7b9f2300 100644 --- a/dh_installchangelogs.1 +++ b/dh_installchangelogs.1 @@ -3,7 +3,7 @@ dh_installchangelogs \- install changelogs into package build directories .SH SYNOPSIS .B dh_installchangelogs -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [upstream]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [upstream]" .SH "DESCRIPTION" dh_installchangelogs is a debhelper program that is responsible for installing changelogs into package build directories. @@ -27,6 +27,10 @@ Install changelogs for all architecture dependent packages. .B \-i, \--indep Install changelogs for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install changelogs for the package named "package". .TP @@ -50,6 +54,9 @@ package. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH "CONFORMS TO" diff --git a/dh_installcron.1 b/dh_installcron.1 index f090420b..31f8d810 100644 --- a/dh_installcron.1 +++ b/dh_installcron.1 @@ -3,7 +3,7 @@ dh_installcron \- install cron scripts into etc/cron.* .SH SYNOPSIS .B dh_installcron -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installcron is a debhelper program that is responsible for installing cron scripts into etc/cron.* in package build directories. The files @@ -23,6 +23,10 @@ Install cron files for all architecture dependent packages. .B \-i, \--indep Install cron files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install cron files for the package named "package". .TP @@ -40,6 +44,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH "CONFORMS TO" diff --git a/dh_installdeb.1 b/dh_installdeb.1 index bb658262..fc7b8dee 100644 --- a/dh_installdeb.1 +++ b/dh_installdeb.1 @@ -3,7 +3,7 @@ dh_installdeb \- install files into the DEBIAN directory .SH SYNOPSIS .B dh_installdeb -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installdeb is a debhelper program that is responsible for installing files into the DEBIAN directory in package build directories with the @@ -43,6 +43,10 @@ Install files for all architecture dependent packages. .B \-i, \--indep Install files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install files for the package named "package". .TP @@ -60,6 +64,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH "CONFORMS TO" diff --git a/dh_installdirs.1 b/dh_installdirs.1 index 0c6aaa54..8ae440c6 100644 --- a/dh_installdirs.1 +++ b/dh_installdirs.1 @@ -3,7 +3,7 @@ dh_installdirs \- create subdirectories in package build directories .SH SYNOPSIS .B dh_installdirs -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [dir ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [dir ...]" .SH "DESCRIPTION" dh_installdirs is a debhelper program that is responsible for creating subdirectories in package build directories. @@ -30,6 +30,10 @@ Create directories for all architecture dependent packages. .B \-i, \--indep Create directories for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Create directories for the package named "package". .TP @@ -55,6 +59,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 6b8b33a6..e1f2e590 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -3,7 +3,7 @@ dh_installdocs \- install documentation into package build directories .SH SYNOPSIS .B dh_installdocs -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" .SH "DESCRIPTION" dh_installdocs is a debhelper program that is responsible for installing documentation into usr/doc/package in package build directories. @@ -36,6 +36,10 @@ Install files for all architecture dependent packages. .B \-i, \--indep Install files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install files for the package named "package". .TP @@ -65,6 +69,9 @@ directory, it will install the complete contents of the directory. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_installexamples.1 b/dh_installexamples.1 index c2997d95..be0b4cc3 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -3,7 +3,7 @@ dh_installexamples \- install example files into package build directories .SH SYNOPSIS .B dh_installexamples -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" .SH "DESCRIPTION" dh_installexamples is a debhelper program that is responsible for installing examples into usr/doc/package/examples in package build directories. @@ -26,6 +26,10 @@ Install files for all architecture dependent packages. .B \-i, \--indep Install files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install files for the package named "package". .TP @@ -55,6 +59,9 @@ directory, it will install the complete contents of the directory. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index e44eaf22..5a84d76b 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -3,7 +3,7 @@ dh_installmanpages \- install man pages into package build directories .SH SYNOPSIS .B dh_installmanpages -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [file ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [file ...]" .SH "DESCRIPTION" dh_installmanpages is a debhelper program that is responsible for automatically installing man pages into usr/man/ and usr/X11R6/man/ in @@ -29,6 +29,10 @@ Install man pages into all architecture dependent packages. .B \-i, \--indep Install man pages into all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install man pages into the package named "package". .TP @@ -55,6 +59,9 @@ pages belong in. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_installmenu.1 b/dh_installmenu.1 index cf54949c..7147b49f 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -3,7 +3,7 @@ dh_installmenu \- install debian menu files into package build directories .SH SYNOPSIS .B dh_installmenu -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-n]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-n]" .SH "DESCRIPTION" dh_installmenu is a debhelper program that is responsible for installing files used by the debian menu package into package build directories. @@ -34,6 +34,10 @@ Install menu files into all architecture dependent packages. .B \-i, \--indep Install menu files into all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install menu files into the package named "package". .TP @@ -54,6 +58,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README , diff --git a/dh_lib b/dh_lib index 020f9e6d..7c7c2e18 100644 --- a/dh_lib +++ b/dh_lib @@ -9,7 +9,9 @@ # involving redirection. Use complex_doit instead. doit() { verbose_echo "$@" - eval '$@' + if [ ! "$DH_NO_ACT" ]; then + eval '$@' + fi } @@ -17,7 +19,9 @@ doit() { # are evaled with double quotes. This version can handle compound commands. complex_doit() { verbose_echo "$@" - eval "$@" + if [ ! "$DH_NO_ACT" ]; then + eval "$@" + fi } # Echo something if the verbose flag is on. diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index cb2703f4..c39eb04c 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -3,7 +3,7 @@ dh_makeshlibs \- automatically create shlibs file .SH SYNOPSIS .B dh_makeshlibs -.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V[dependancies]]" +.I "[-v] [-a] [-i] [--no-act] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V[dependancies]]" .SH "DESCRIPTION" dh_makeshlibs is a debhelper program that automatically scans for shared libraries, and generates a shlibs file for the libraries it finds. @@ -21,6 +21,10 @@ Generate shlibs files for all architecture dependent packages. .B \-i, \--indep Generate shlibs files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Generate shlibs file for the package named "package". .TP @@ -67,6 +71,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS diff --git a/dh_md5sums.1 b/dh_md5sums.1 index ab3c2bed..f432fed2 100644 --- a/dh_md5sums.1 +++ b/dh_md5sums.1 @@ -3,7 +3,7 @@ dh_md5sums \- generate DEBIAN/md5sums file .SH SYNOPSIS .B dh_md5sums -.I "[-x] [-v] [-a] [-i] [-Ptmpdir] [-ppackage]" +.I "[-x] [-v] [-a] [-i] [--no-act] [-Ptmpdir] [-ppackage]" .SH "DESCRIPTION" dh_md5sums is a debhelper program that is responsible for generating a DEBIAN/md5sums file, which lists the md5sums of each file in the package. @@ -23,6 +23,10 @@ Generate md5sums files for all architecture dependent packages. .B \-i, \--indep Generate md5sums files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Generate md5sums file for the package named "package". .TP @@ -44,6 +48,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/dh_movefiles.1 b/dh_movefiles.1 index c2b0e92a..5ff47bb1 100644 --- a/dh_movefiles.1 +++ b/dh_movefiles.1 @@ -3,7 +3,7 @@ dh_movefiles \- moves files out of debian/tmp into subpackages .SH SYNOPSIS .B dh_movefiles -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp and into other package build directories. This may be useful @@ -23,6 +23,10 @@ Move files for all architecture dependent packages. .B \-i, \--indep Move files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Move files for the package named "package". .TP @@ -40,6 +44,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1 index 421a2215..b976f8c9 100644 --- a/dh_shlibdeps.1 +++ b/dh_shlibdeps.1 @@ -3,7 +3,7 @@ dh_shlibdeps \- calculate shared library dependancies .SH SYNOPSIS .B dh_shlibdeps -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-uparams]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-uparams]" .SH "DESCRIPTION" dh_shlibdeps is a debhelper program that is responsible for calculating shared library dependancies for all executables found in the package build @@ -26,6 +26,10 @@ Install files for all architecture dependent packages. .B \-i, \--indep Install files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install files for the package named "package". .TP @@ -47,6 +51,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .BR dpkg-shlibdeps (1) diff --git a/dh_strip.1 b/dh_strip.1 index 9cdd85a0..9ae97c60 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -3,7 +3,7 @@ dh_strip \- strip executables, shared libraries, and some static libraries. .SH SYNOPSIS .B dh_strip -.I "[-v] [-a] [-i] [-Ptmpdir] [-ppackage]" +.I "[-v] [-a] [-i] [--no-act] [-Ptmpdir] [-ppackage]" .SH "DESCRIPTION" dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for @@ -23,6 +23,10 @@ Strip files in all architecture dependent packages. Strip files in all architecture independent packages (likely, this is pointless :-). .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Strip files for the package named "package". .TP @@ -40,6 +44,9 @@ the control file will have their files stripped. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH "CONFORMS TO" diff --git a/dh_suidregister.1 b/dh_suidregister.1 index 51e08fe5..182386b4 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -3,7 +3,7 @@ dh_suidregister \- set up package to register files with suidregister .SH SYNOPSIS .B dh_suidregister -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" .SH "DESCRIPTION" dh_suidregister is a debhelper program that is responsible for modifying the postinst and postrm scripts of a package so the package will register files @@ -37,6 +37,10 @@ Register files for all architecture dependent packages. .B \-i, \--indep Register files for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Register files for the package named "package". .TP @@ -63,6 +67,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README , diff --git a/dh_undocumented.1 b/dh_undocumented.1 index 26498934..69d2150a 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -3,7 +3,7 @@ dh_undocumented \- make symlinks to undocumented.7.gz man page .SH SYNOPSIS .B dh_undocumented -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-A] [manpage ...]" +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [manpage ...]" .SH "DESCRIPTION" dh_undocumented is a debhelper program that is responsible for making symlinks to the @@ -41,6 +41,10 @@ Install undocumented man page symlinks for all architecture dependent packages. .B \-i, \--indep Install undocumented man page symlinks for all architecture independent packages. .TP +.B \--no-act +Do not really do anything. If used with -v, the result is that this command +will output a list of what it would have done. +.TP .B \-ppackage, \--package=package Install undocumented man page symlinks for the package named "package". .TP @@ -68,6 +72,9 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode +.TP +.I DH_NO_ACT +Enables no-act mode (see above). .SH "SEE ALSO" .BR /usr/doc/debhelper/README , -- cgit v1.2.3 From 0bbd944c8f59e3cab7c4636a54b9df8fbfc8104f Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:48:52 +0000 Subject: r72: Initial Import --- debian/changelog | 12 ++++++++++++ dh_installmanpages | 22 ++++++++++++++++++---- dh_installmanpages.1 | 6 +++++- 3 files changed, 35 insertions(+), 5 deletions(-) (limited to 'dh_installmanpages.1') diff --git a/debian/changelog b/debian/changelog index db3a28fa..11a5e95d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +debhelper (0.74) unstable; urgency=low + + * dh_installmanpages: convert .so links to symlinks at last (#19829). + * dh_installmanpages.1: documented that no, dh_installmanpages never + installs symlink man pages from the source package (#19831). + * dh_installmanpages: minor speedups + * PROGRAMMING: numerous spelling fixes, thanks to Christian T. Steigies. + Life is too short for me to spell check my technical documentation, but + I always welcome corrections! + + -- Joey Hess Tue, 17 Mar 1998 22:09:07 -0800 + debhelper (0.73) unstable; urgency=low * Fixed typo in dh_suidregister.1 diff --git a/dh_installmanpages b/dh_installmanpages index fe611389..d5e9198a 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -2,7 +2,9 @@ # # Automatically find and install man pages. However, do not install any man # pages listed on the command line. -# This is a little bit DWIMish, but still very handy. +# Also change man pages with .so commands in them into symlinks. +# +# This is a little bit (hah!) DWIMish, but still very handy. PATH=debian:$PATH:/usr/lib/debhelper . dh_lib @@ -15,12 +17,12 @@ for PACKAGE in $DH_DOPACKAGES; do # .in files, which are from configure. # We also need to exclude all debian/tmp type dirs. EXCLUDE=`grep ^Package: debian/control | \ - cut -d " " -f 2 | tac | tr "\n" "|"` - for file in `find * -name "*.[1-9]*" ! -name "*.ex" \ + cut -d " " -f 2 | tr "\n" "|"` + for file in `find * -type f -name "*.[1-9]*" ! -name "*.ex" \ ! -name "*.in" | egrep -v "^debian/(${EXCLUDE}tmp)/"` do # Make sure file thinks they are man pages. - if file $file|grep -q roff; then + if file -L $file|grep -q roff; then if echo $file|grep -q /; then NAME=`expr $file : '.*/\(.*\)'` else @@ -54,4 +56,16 @@ for PACKAGE in $DH_DOPACKAGES; do fi fi done + + # Now the .so conversion. + for file in `find $TMP/usr/man $TMP/usr/X11*/man -type f -size -256c 2>/dev/null` + do + solink=expr "`head -1 $file`" : '\.so \(.*\)' + if [ "$solink" ]; then + doit "rm -f $file" + # The .so links include the subdir the page is in, + # thus the ../ + doit "ln -s ../$solink $file" + fi + done done diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 5a84d76b..7053dbc6 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -10,7 +10,8 @@ automatically installing man pages into usr/man/ and usr/X11R6/man/ in package build directories. .P dh_installmanpages scans the current directory and all subdirectories for -filenames that look like man pages. It uses +filenames that look like man pages. (Note that only real files are looked +at; symlinks are ignored.) It uses .BR file (1) to verify that the files are in the correct format. Then, based on the files' extensions, it installs them into the correct man directory. @@ -18,6 +19,9 @@ files' extensions, it installs them into the correct man directory. All filenames specified as parameters will be skipped by dh_installmanpages. This is useful if by default it installs some man pages that you do not want to be installed. +.P +After the man page installation step, dh_installmanpages will check to see if +any of the man pages are ".so" links. If so, it changes them to symlinks. .SH OPTIONS .TP .B \-v, \--verbose -- cgit v1.2.3 From e348bcc96f206a25afc2ad1d4f004c74b7f8ab37 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:56:24 +0000 Subject: r104: Initial Import --- Dh_Getopt.pm | 148 ++++++++++++++++++++++++++ Dh_Lib.pm | 248 +++++++++++++++++++++++++++++++++++++++++++ autoscripts/postinst-emacsen | 1 + autoscripts/prerm-emacsen | 1 + debhelper.1 | 104 ++++++++++++++++++ debian/changelog | 14 +++ debian/control | 6 +- debian/cron.d | 0 debian/cron.daily | 0 debian/docs | 1 + debian/menu | 0 dh_builddeb.1 | 45 ++------ dh_clean.1 | 45 ++------ dh_compress | 2 +- dh_compress.1 | 45 ++------ dh_debstd.1 | 13 ++- dh_du.1 | 4 +- dh_fixperms | 6 +- dh_fixperms.1 | 45 ++------ dh_gencontrol.1 | 51 +++------ dh_getopt.pl | 22 +++- dh_installchangelogs.1 | 45 ++------ dh_installcron.1 | 47 ++------ dh_installdeb.1 | 45 ++------ dh_installdebfiles.1 | 8 +- dh_installdirs.1 | 49 +++------ dh_installdocs | 2 +- dh_installdocs.1 | 45 ++------ dh_installemacsen | 34 ++++++ dh_installemacsen.1 | 42 ++++++++ dh_installexamples.1 | 45 ++------ dh_installinit.1 | 45 ++------ dh_installmanpages.1 | 45 ++------ dh_installmenu.1 | 46 ++------ dh_makeshlibs.1 | 47 ++------ dh_md5sums.1 | 45 ++------ dh_movefiles.1 | 45 ++------ dh_shlibdeps.1 | 50 +++------ dh_strip.1 | 46 ++------ dh_suidregister.1 | 48 +++------ dh_testdir.1 | 19 ++-- dh_testroot.1 | 19 ++-- dh_testversion | 24 +++++ dh_testversion.1 | 29 ++--- dh_undocumented.1 | 45 ++------ doc/README | 64 +---------- doc/TODO | 63 ++++++++--- 47 files changed, 976 insertions(+), 867 deletions(-) create mode 100644 Dh_Getopt.pm create mode 100644 Dh_Lib.pm create mode 100644 autoscripts/postinst-emacsen create mode 100644 autoscripts/prerm-emacsen create mode 100644 debhelper.1 create mode 100644 debian/cron.d create mode 100644 debian/cron.daily create mode 100644 debian/docs create mode 100644 debian/menu create mode 100755 dh_installemacsen create mode 100644 dh_installemacsen.1 create mode 100755 dh_testversion (limited to 'dh_installmanpages.1') diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm new file mode 100644 index 00000000..eb6aef98 --- /dev/null +++ b/Dh_Getopt.pm @@ -0,0 +1,148 @@ +#!/usr/bin/perl -w +# +# Debhelper option processing library. +# +# Joey Hess GPL copyright 1998. + +package Dh_Getopt; +use strict; + +use Exporter; +my @ISA=qw(Exporter); +my @EXPORT=qw(&parseopts); + +use Dh_Lib; +use Getopt::Long; + +my (%options, %exclude_package); + +# Passed an option name and an option value, adds packages to the list +# of packages. We need this so the list will be built up in the right +# order. +sub AddPackage { my($option,$value)=@_; + if ($option eq 'i' or $option eq 'indep') { + push @{$options{DOPACKAGES}}, GetPackages('indep'); + $options{DOINDEP}=1; + } + elsif ($option eq 'a' or $option eq 'arch') { + push @{$options{DOPACKAGES}}, GetPackages('arch'); + $options{DOARCH}=1; + } + elsif ($option eq 'p' or $option eq 'package') { + push @{$options{DOPACKAGES}}, $value; + } + else { + error("bad option $option - should never happen!\n"); + } +} + +# Add a package to a list of packages that should not be acted on. +sub ExcludePackage { my($option,$value)=@_; + $exclude_package{$value}=1; +} + +# Add another item to the exclude list. +sub AddExclude { my($option,$value)=@_; + push @{$options{EXCLUDE}},$value; +} + +sub import { + # Enable bundling of short command line options. + Getopt::Long::config("bundling"); +} + +# Parse options and return a hash of the values. +sub parseopts { + undef %options; + + my $ret=GetOptions( + "v" => \$options{VERBOSE}, + "verbose" => \$options{VERBOSE}, + + "i" => \&AddPackage, + "indep" => \&AddPackage, + + "a" => \&AddPackage, + "arch" => \&AddPackage, + + "p=s" => \&AddPackage, + "package=s" => \&AddPackage, + + "N=s" => \&ExcludePackage, + "no-package=s" => \&ExcludePackage, + + "n" => \$options{NOSCRIPTS}, +# "noscripts" => \$options(NOSCRIPTS}, + + "x" => \$options{INCLUDE_CONFFILES}, # is -x for some unknown historical reason.. + "include-conffiles" => \$options{INCLUDE_CONFFILES}, + + "X=s" => \&AddExclude, + "exclude=s" => \&AddExclude, + + "d" => \$options{D_FLAG}, + "remove-d" => \$options{D_FLAG}, + + "r" => \$options{R_FLAG}, + "no-restart-on-upgrade" => \$options{R_FLAG}, + + "k" => \$options{K_FLAG}, + "keep" => \$options{K_FLAG}, + + "P=s" => \$options{TMPDIR}, + "tmpdir=s" => \$options{TMPDIR}, + + "u=s", => \$options{U_PARAMS}, + "update-rcd-params=s", => \$options{U_PARAMS}, + "dpkg-shlibdeps-params=s", => \$options{U_PARAMS}, + + "m=s", => \$options{M_PARAMS}, + "major=s" => \$options{M_PARAMS}, + + "V:s", => \$options{V_FLAG}, + "version-info:s" => \$options{V_FLAG}, + + "A" => \$options{PARAMS_ALL}, + "all" => \$options{PARAMS_ALL}, + + "no-act" => \$options{NO_ACT}, + + "init-script=s" => \$options{INIT_SCRIPT}, + ); + + if (!$ret) { + error("unknown option; aborting"); + } + + # Check to see if -V was specified. If so, but no parameters were + # passed, the variable will be defined but empty. + if (defined($options{V_FLAG})) { + $options{V_FLAG_SET}=1; + } + + # Check to see if DH_VERBOSE environment variable was set, if so, + # make sure verbose is on. + if ($ENV{DH_VERBOSE} ne undef) { + $options{VERBOSE}=1; + } + + # Check to see if DH_NO_ACT environment variable was set, if so, + # make sure no act mode is on. + if ($ENV{DH_NO_ACT} ne undef) { + $options{NO_ACT}=1; + } + + # Remove excluded packages from the list of packages to act on. + my @package_list; + my $package; + foreach $package (@{$options{DOPACKAGES}}) { + if (! $exclude_package{$package}) { + push @package_list, $package; + } + } + @{$options{DOPACKAGES}}=@package_list; + + return %options; +} + +1 diff --git a/Dh_Lib.pm b/Dh_Lib.pm new file mode 100644 index 00000000..c9b964c1 --- /dev/null +++ b/Dh_Lib.pm @@ -0,0 +1,248 @@ +#!/usr/bin/perl -w +# +# Library functions for debhelper programs, perl version. +# +# Joey Hess, GPL copyright 1997, 1998. + +package Dh_Lib; + +use Exporter; +use vars qw(%dh); +@ISA=qw(Exporter); +@EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir + &pkgfile &pkgext &isnative &autoscript &filearray &GetPackages + %dh); + +sub init { + # Check to see if an argument on the command line starts with a dash. + # if so, we need to pass this off to the resource intensive Getopt::Long, + # which I'd prefer to avoid loading at all if possible. + my $parseopt=undef; + foreach $arg (@ARGV) { + if ($arg=~m/^-/) { + $parseopt=1; + last; + } + } + if ($parseopt) { + eval "use Dh_Getopt"; + error($!) if $@; + %dh=Dh_Getopt::parseopts(); + } + + # Get the name of the main binary package (first one listed in + # debian/control). + my @allpackages=GetPackages(); + $dh{MAINPACKAGE}=$allpackages[0]; + + # Check if packages to build have been specified, if not, fall back to + # the default, doing them all. + if (! @{$dh{DOPACKAGES}}) { + if ($dh{DH_DOINDEP} || $dh{DH_DOARCH}) { + error("I have no package to build."); + } + push @{$dh{DOPACKAGES}},@allpackages; + } + + # Check to see if -P was specified. If so, we can only act on a single + # package. + if ($dh{TMPDIR} || $#{$dh{DOPACKAGES}} > 0) { + error("-P was specified, but multiple packages would be acted on."); + } + + # Figure out which package is the first one we were instructed to build. + # This package gets special treatement: files and directories specified on + # the command line may affect it. + $dh{FIRSTPACKAGE}=${$dh{DOPACKAGES}}[0]; +} + +# Run a command, and display the command to stdout if verbose mode is on. +# All commands that modifiy files in $TMP should be ran via this +# function. +# +# Note that this cannot handle complex commands, especially anything +# involving redirection. Use complex_doit instead. +sub doit { + verbose_print(join(" ",,@_)); + + if (! $dh{NO_ACT}) { + system(@_) == 0 + || error("command returned error code"); + + } +} + +# This is an identical command to doit, except the parameters passed to it +# can include complex shell stull like redirection and compound commands. +sub complex_doit { + error("complex_doit() not yet supported"); +} + +# Print something if the verbose flag is on. +sub verbose_print { my $message=shift; + if ($dh{VERBOSE}) { + print "\t$message\n"; + } +} + +# Output an error message and exit. +sub error { my $message=shift; + warning($message); + exit 1; +} + +# Output a warning. +sub warning { my $message=shift; + my $fn=$0; + $fn=~s:.*/(.*?):$1:; + print STDERR "$fn: $message\n"; +} + +# Pass it a name of a binary package, it returns the name of the tmp dir to +# use, for that package. +# This is for back-compatability with the debian/tmp tradition. +sub tmpdir { my $package=shift; + if ($dh{TMPDIR}) { + return $dh{TMPDIR}; + } + elsif ($package eq $dh{MAINPACKAGE}) { + return "debian/tmp"; + } + else { + return "debian/$package"; + } +} + +# Pass this the name of a binary package, and the name of the file wanted +# for the package, and it will return the actual filename to use. For +# example if the package is foo, and the file is somefile, it will look for +# debian/somefile, and if found return that, otherwise, if the package is +# the main package, it will look for debian/foo, and if found, return that. +# Failing that, it will return nothing. +sub pkgfile { my $package=shift; my $filename=shift; + if (-e "debian/$package.$filename") { + return "debian/$package.$filename"; + } + elsif ($package eq $dh{MAINPACKAGE} && -e "debian/$filename") { + return "debian/$filename"; + } + return ""; +} + +# Pass it a name of a binary package, it returns the name to prefix to files +# in debian for this package. +sub pkgext { my $package=shift; + if ($package ne $MAINPACKAGE) { + return "$package."; + } + return ""; +} + +# Returns 1 if the package is a native debian package, null otherwise. +# As a side effect, sets $dh{VERSION} to the version of this package. +{ + # Caches return code so it only needs to run dpkg-parsechangelog once. + my $isnative_cache; + + sub isnative { my $package=shift; + if ($isnative_cache eq undef) { + # Make sure we look at the correct changelog. + my $isnative_changelog=pkgfile($package,"changelog"); + if (! $isnative_changelog) { + $isnative_changelog="debian/changelog"; + } + + # Get the package version. + my $version=`dpkg-parsechangelog -l$isnative_changelog`; + ($dh{VERSION})=$version=~s/[^|\n]Version: \(.*\)\n//m; + + # Is this a native Debian package? + if ($dh{VERSION}=~m/.*-/) { + $isnative_cache=1; + } + else { + $isnative_cache=0; + } + } + + return $isnative_cache; + } +} + +# Automatically add a shell script snippet to a debian script. +# Only works if the script has #DEBHELPER# in it. +# +# Parameters: +# 1: script to add to +# 2: filename of snippet +# 3: sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/ +sub autoscript { + error "autoscript() not yet implemented (lazy, lazy!)"; +# autoscript_script=$1 +# autoscript_filename=$2 +# autoscript_sed=$3 +# autoscript_debscript=debian/`pkgext $PACKAGE`$autoscript_script.debhelper +# +# if [ -e "$DH_AUTOSCRIPTDIR/$autoscript_filename" ]; then +# autoscript_filename="$DH_AUTOSCRIPTDIR/$autoscript_filename" +# else +# if [ -e "/usr/lib/debhelper/autoscripts/$autoscript_filename" ]; then +# autoscript_filename="/usr/lib/debhelper/autoscripts/$autoscript_filename" +# else +# error "/usr/lib/debhelper/autoscripts/$autoscript_filename does not exist" +# fi +# fi +# +# complex_doit "echo \"# Automatically added by `basename $0`\" >> $autoscript_debscript" +# complex_doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript" +# complex_doit "echo '# End automatically added section' >> $autoscript_debscript" +} + +# Reads in the specified file, one word at a time, and returns an array of +# the result. +sub filearray { $file=shift; + my @ret; + open (DH_FARRAY_IN,"<$file") || error("cannot read $file: $1"); + while () { + push @ret,split(/\s/,$_); + } + close DH_ARRAY; + + return @ret; +} + +# Returns a list of packages in the control file. +# Must pass "arch" or "indep" to specify arch-dependant or -independant +# packages. If nothing is specified, returns all packages. +sub GetPackages { $type=shift; + my $package; + my $arch; + my @list; + open (CONTROL,") { + chomp; + s/\s+$//; + if (/^Package:\s+(.*)/) { + $package=$1; + } + if (/^Architecture:\s+(.*)/) { + $arch=$1; + } + if (!$_ or eof) { # end of stanza. + if ($package && + (($type eq 'indep' && $arch eq 'all') || + ($type eq 'arch' && $arch ne 'all') || + ! $type)) { + push @list, $package; + undef $package; + undef $arch; + } + } + } + close CONTROL; + + return @list; +} + +1 diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen new file mode 100644 index 00000000..45f1deec --- /dev/null +++ b/autoscripts/postinst-emacsen @@ -0,0 +1 @@ +/usr/lib/emacsen-common/emacs-package-install #PACKAGE# diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen new file mode 100644 index 00000000..d11dafab --- /dev/null +++ b/autoscripts/prerm-emacsen @@ -0,0 +1 @@ +/usr/lib/emacsen-common/emacs-package-remove #PACKAGE# diff --git a/debhelper.1 b/debhelper.1 new file mode 100644 index 00000000..f3296666 --- /dev/null +++ b/debhelper.1 @@ -0,0 +1,104 @@ +.TH DEBHELPER 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +debhelper \- overview of the debhelper commands +.SH SYNOPSIS +.B dh_* +.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Npackage] [-Ptmpdir]" +.SH "DESCRIPTION" +Debhelper is a collection of programs that can be used in debian/rules files +to automate common tasks related to building debian binary packages. All the +debhelper commands accept a set of options, and this man page is here to +document those options and to document debhelper as a whole. For additional +options, and documentation for each individual command, see the commands' own +man pages. +.SH "SHARED DEBHLPER OPTIONS" +.TP +.B \-v, \--verbose +Verbose mode: show all commands that modify the package build directory. +.TP +.B \--no-act +Do not really do anything. If used with -v, the result is that the command +will output a list of what it would have done. +.TP +.B \-a, \--arch +Act on all architecture dependent packages. +.TP +.B \-i, \--indep +Act on all architecture independent packages. +.TP +.B \-ppackage, \--package=package +Act on the package named "package". +.TP +.B \-Npackage, \--no-package=package +Do not act on the specified package even if an -a, -i, or -p option lists +the package as one that should be acted on. +.TP +.B \-Ptmpdir, \--tmpdir=tmpdir +Use "tmpdir" for package build directory. +.SH NOTES +.TP +.B Multiple binary package support +.RS +If your source package generates more than one binary package, debhelper +programs will default to acting on all binary packages when run. If your +source package happens to generate one architecture dependent package, and +another architecture independent package, this is not the correct behavior, +because you need to generate the architecture dependent packages in the +binary-arch debian/rules target, and the architecture independent packages +in the binary-indep debian/rules target. + +To facilitate this, as well as give you more control over which packages +are acted on by debhelper programs, all debhelper programs accept the +.B -a +, +.B -i +, and +.B -p +parameters. These parameters are cumulative. If none are given, +debhelper programs default to acting on all packages listed in the control +file. +.P +See +.BR /usr/doc/debhelper/examples/rules.multi +for an example of how to use this. +.RE +.TP +.B Package build directories +.RS +By default, all debhelper programs assume that the temporary directory used +for assembling the tree of files in a package is debian/tmp for the first +package listed in debian/control, and debian/ for each +additional package. +.P +Sometimes, you might want to use some other temporary directory. This is +supported by the +.B -P +flag. For example, "dh_installdocs -Pdebian/tmp", will use debian/tmp as the +temporary directory. Note that if you use -P, the debhelper programs can only +be acting on a single package at a time. So if you have a package that builds +many binary packages, you will need to use the -p flag to specify which +binary package the debhelper program will act on. +.RE +.TP +.B Other notes +In general, if any debhelper program needs a directory to exist under +debian/, it will create it. I haven't bothered to document this in all the +man pages, but for example, dh_installdeb knows to make debian/tmp/DEBIAN/ +before trying to put files there, dh_installmenu knows you need a +debian/tmp/usr/lib/menu/ before installing the menu files, etc. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode. +.TP +.I DH_NO_ACT +Enables no-act mode. +.SH "SEE ALSO" +.TP +.BR /usr/doc/debhelper/README +An introduction to debhelper. +.TP +.BR /usr/doc/debhelper/examples/ +A set of example debian/rules files that use debhelper. +.SH AUTHOR +Joey Hess diff --git a/debian/changelog b/debian/changelog index db56690c..10b81798 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +debhelper (1.0.1) unstable; urgency=low + + * Backported bug fixes from the 1.1 tree: + * dh_installdocs: used -m 655 for a TODO file. (minor, dh_fixperms cleans + up after it) + * dh_fixperms: had a problem with removing x bits on examples files + * dh_compress: since version 0.88 or so, dh_compress has bombed out if + a debian/compress file returned an error code. This was actually + unintentional - in fact, the debian/compress example in the man page + will fail this way if usr/info or usr/X11R6 is not present. Corrected + the program to not fail. (#26214) + + -- Joey Hess Sun, 30 Aug 1998 22:21:26 -0700 + debhelper (1.0) stable unstable; urgency=low * 1.0 at last! diff --git a/debian/control b/debian/control index c4dccd95..0a97ae80 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,6 @@ Architecture: all Depends: perl (>= 5.004), fileutils (>= 3.16-4), file Description: helper programs for debian/rules A collection of programs that can be used in a debian/rules file to - automate common tasks. Programs are included to install various files into - your package, compress files, fix file permissions, integrate your package - with the debian menu system, etc. + 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. diff --git a/debian/cron.d b/debian/cron.d new file mode 100644 index 00000000..e69de29b diff --git a/debian/cron.daily b/debian/cron.daily new file mode 100644 index 00000000..e69de29b diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ + diff --git a/debian/menu b/debian/menu new file mode 100644 index 00000000..e69de29b diff --git a/dh_builddeb.1 b/dh_builddeb.1 index ecbbfa6c..cf492b4c 100644 --- a/dh_builddeb.1 +++ b/dh_builddeb.1 @@ -1,49 +1,24 @@ -.TH DH_BUILDDEB 1 +.TH DH_BUILDDEB 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_builddeb \- build debian packages .SH SYNOPSIS .B dh_builddeb -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" +.I "[debhelper options]" .SH "DESCRIPTION" dh_builddeb simply calls .BR dpkg (8) to build a .deb package or packages. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory, etc. -.TP -.B \-a, \--arch -Build all architecture dependent packages. -.TP -.B \-i, \--indep -Build all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B -ppackage, \--package=package -Build the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be built. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_clean.1 b/dh_clean.1 index cb437e9c..333fa174 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -1,9 +1,9 @@ -.TH DH_CLEAN 1 +.TH DH_CLEAN 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_clean \- clean up package build directories .SH SYNOPSIS .B dh_clean -.I "[-v] [-a] [-i] [-k] [--no-act] [-ppackage] [-Ptmpdir] [file ...]" +.I "[debhelper options] [-k] [file ...]" .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 @@ -11,24 +11,10 @@ other files, such as debian/substvars, debian/files, DEADJOE, emacs backup files, etc. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Clean up the package build directory for all architecture dependent packages. -.TP -.B \-i, \--indep -Clean up the package build directory for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Clean up the package build directory for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-k, \--keep Do not delete debian/files. When do you want to use this? Anytime you have a @@ -41,23 +27,12 @@ was built. .TP .B file ... Delete these files too. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will have their package build directories cleaned up. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Filenames with spaces in them will not currently be deleted when specified as parameters. diff --git a/dh_compress b/dh_compress index 7d6e4979..1b58f70a 100755 --- a/dh_compress +++ b/dh_compress @@ -13,7 +13,7 @@ filelist () { if [ "$compress" ]; then # The config file is a sh script that outputs the files to be compressed # (typically using find). - sh $olddir/$compress 2>/dev/null || true + sh $olddir/$compress 2>/dev/null else # By default fall back on what the policy manual says to compress. find usr/info usr/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null || true diff --git a/dh_compress.1 b/dh_compress.1 index c78291ee..ec0def52 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -1,9 +1,9 @@ -.TH DH_COMPRESS 1 +.TH DH_COMPRESS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_compress \- compress files and fix symlinks in package build directories .SH SYNOPSIS .B dh_compress -.I "[-v] [-a] [-i] [-Xitem] [--no-act] [-ppackage] [-Ptmpdir]" +.I "[debhelper options] [-Xitem]" .SH "DESCRIPTION" dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any symlinks @@ -31,24 +31,10 @@ customization of what files are compressed: ! -name "copyright" .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Compress files for all architecture dependent packages. -.TP -.B \-i, \--indep -Compress files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Compress files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-Xitem, \--exclude=item Exclude files that contain "item" anywhere in their filename from being @@ -57,27 +43,16 @@ You may use this option multiple times to build up a list of things to exclude. You can accomplish the same thing by using a debian/compress file, but this is easier. .SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will have their files compressed. -.P The debian/compress file applies to the first binary package listed in your control file. For the other packages, you can make files named debian/package.compress, where "package" is the name of the package they apply to. (This works for the first binary package too.) .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Filenames with spaces in them may not properly be compressed. .SH "CONFORMS TO" diff --git a/dh_debstd.1 b/dh_debstd.1 index e3568eb6..e47e64aa 100644 --- a/dh_debstd.1 +++ b/dh_debstd.1 @@ -5,7 +5,7 @@ dh_debstd \- mimic debstd with debhelper commands .B dh_debstd .I "[-v] [--no-act] [-m] [-c] [-u] [-s] [[changelog] file ...]" .SH "DESCRIPTION" -dh_debstd is a debhelper command that mimics the behavior of debstd, by +dh_debstd is a program that mimics the behavior of debstd, by calling other debhelper commands. Its behavior is not a complete nor an exact copy of what debstd does, but it should be close enough to be usable. .P @@ -59,14 +59,17 @@ generated if dh_debstd notices scripts without "#DEBHELPER#" in them. Enables verbose mode .TP .I DH_NO_ACT -Enables no-act mode (see above). +Enables no-act mode .SH "SEE ALSO" +.TP .BR /usr/doc/debhelper/from-debstd -, +.TP .BR debstd (1) +.TP +.BR debhelper (1) .SH BUGS It doesn't completly mimic debstd. Some things debstd handles are not supported -by debhelper. With the exception of buildinfo.Debian files, everything that -is not supported will generate a warning message. +by debhelper. Everything that is not supported will generate a warning +message if you try to use it. .SH AUTHOR Joey Hess diff --git a/dh_du.1 b/dh_du.1 index 9497a61d..670e371d 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -1,4 +1,4 @@ -.TH DH_DU 1 +.TH DH_DU 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_du \- generate DEBIAN/du file .SH SYNOPSIS @@ -11,6 +11,6 @@ This program is now depricated, and does nothing, after a decision by the debian developers that du control files should not exit. It will simply output a warning message now. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_fixperms b/dh_fixperms index 0e845335..544ee9be 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -18,7 +18,7 @@ for PACKAGE in $DH_DOPACKAGES; do doit "chmod -R u+rw $TMP" fi - FIND_OPTIONS="" + FIND_OPTIONS= else # Do it the hard way. complex_doit "find $TMP ! \( $DH_EXCLUDE_FIND \) -print0 \ @@ -33,8 +33,8 @@ for PACKAGE in $DH_DOPACKAGES; do # Fix up premissions in usr/doc, setting everything to not exectable # by default, but leave examples directories alone. - complex_doit "find $TMP/usr/doc -type f $FIND_OPTIONS ! -regex .\*/examples/.\* -print0 \ - 2>/dev/null | xargs -0r chmod 644" + complex_doit "find $TMP/usr/doc -type f $FIND_OPTIONS -print0 \ + 2>/dev/null | xargs -0r chmod 644" complex_doit "find $TMP/usr/doc -type d $FIND_OPTIONS -print0 \ 2>/dev/null | xargs -0r chmod 755" diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 19f89d11..fd304c70 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -1,9 +1,9 @@ -.TH DH_FIXPERMS 1 +.TH DH_FIXPERMS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_fixperms \- fix permissions of files in package build directories .SH SYNOPSIS .B dh_fixperms -.I "[-v] [-a] [-i] [-Xitem] [--no-act] [-ppackage] [-Ptmpdir]" +.I "[debhelper options] [-Xitem]" .SH "DESCRIPTION" dh_fixperms is a debhelper program that is responsible for setting the permissions of files in package build directories to a sane state. @@ -15,46 +15,21 @@ root, and it removes group and other write permission from all files. Finally, it removes execute permissions from any libraries that have it set. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Fix permissions for all architecture dependent packages. -.TP -.B \-i, \--indep -Fix permissions for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Fix permissions for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-Xitem, \--exclude=item Exclude files that contain "item" anywhere in their filename from having their permissions changed. You may use this option multiple times to build up a list of things to exclude. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will have their permissions fixed. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.1 .SH AUTHOR diff --git a/dh_gencontrol.1 b/dh_gencontrol.1 index b0cc783c..2bfade49 100644 --- a/dh_gencontrol.1 +++ b/dh_gencontrol.1 @@ -1,57 +1,34 @@ -.TH DH_INSTALLDEBFILES 1 +.TH DH_GENCONTROL 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_gencontrol \- generate and install control file .SH SYNOPSIS .B dh_gencontrol -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-uparams]" +.I "[debhelper options] [-uparams]" .SH "DESCRIPTION" -dh_gencontrol is a debhelper program that is responsible for generating and -installing control files, and installing them into the DEBIAN directory with -the proper permissions. +dh_gencontrol is a debhelper program that is responsible for generating +control files, and installing them into the DEBIAN directory with the proper +permissions. .P This program is merely a wrapper around .BR dpkg-gencontrol (1) .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-uparams, \--update-rcd-params=params Pass "params" to .BR dpkg-gencontrol (1) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" .TP -.I DH_VERBOSE -Enables verbose mode +.BR debhelper (1) .TP -.I DH_NO_ACT -Enables no-act mode (see above). -.SH "SEE ALSO" -.BR /usr/doc/debhelper/README .BR dpkg-shlibdeps (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 diff --git a/dh_getopt.pl b/dh_getopt.pl index b7a856c4..f1aa7cec 100755 --- a/dh_getopt.pl +++ b/dh_getopt.pl @@ -58,6 +58,11 @@ sub AddPackage { my($option,$value)=@_; } } +# Add a package to a list of packages that should not be acted on. +sub ExcludePackage { my($option,$value)=@_; + $exclude_package{$value}=1; +} + # Add another item to the exclude list. sub AddExclude { my($option,$value)=@_; push @exclude,$value; @@ -80,7 +85,10 @@ $ret=GetOptions( "arch" => \&AddPackage, "p=s" => \&AddPackage, - "package=s" => \&AddPackage, + "package=s" => \&AddPackage, + + "N=s" => \&ExcludePackage, + "no-package=s" => \&ExcludePackage, "n" => \$noscripts, "noscripts" => \$noscripts, @@ -105,7 +113,7 @@ $ret=GetOptions( "u=s", => \$u_params, "update-rcd-params=s", => \$u_params, - "dpkg-shlibdeps-params=s", => \$u_params, + "dpkg-shlibdeps-params=s", => \$u_params, "m=s", => \$major, "major=s" => \$major, @@ -149,12 +157,20 @@ foreach (@exclude) { } $exclude_find=~s/ -or $//; +# Remove excluded packages from the list of packages to act on. +undef @package_list; +foreach $package (@packages) { + if (! $exclude_package{$package}) { + push @package_list, $package; + } +} + # Now output everything, in a format suitable for a shell to eval it. # Note the last line sets $@ in the shell to whatever arguements remain. print qq{ DH_VERBOSE='$verbose' DH_NO_ACT='$no_act' -DH_DOPACKAGES='@packages' +DH_DOPACKAGES='@package_list' DH_DOINDEP='$indep' DH_DOARCH='$arch' DH_NOSCRIPTS='$noscripts' diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1 index 84fb6b46..70822338 100644 --- a/dh_installchangelogs.1 +++ b/dh_installchangelogs.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLCHANGELOGS 1 +.TH DH_INSTALLCHANGELOGS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installchangelogs \- install changelogs into package build directories .SH SYNOPSIS .B dh_installchangelogs -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [upstream]" +.I "[debhelper options] [upstream]" .SH "DESCRIPTION" dh_installchangelogs is a debhelper program that is responsible for installing changelogs into package build directories. @@ -20,47 +20,22 @@ not a native debian package, then this upstream changelog will be installed as usr/doc/package/changelog in the package build directory. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install changelogs for all architecture dependent packages. -.TP -.B \-i, \--indep -Install changelogs for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install changelogs for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B upstream Instal this file as the upstream changelog. .SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will have the changelogs installed into them. -.P It is an error to specify an upstream changelog file for a debian native package. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 .SH AUTHOR diff --git a/dh_installcron.1 b/dh_installcron.1 index 20bdc82f..adda0711 100644 --- a/dh_installcron.1 +++ b/dh_installcron.1 @@ -1,12 +1,12 @@ -.TH DH_INSTALLCRON 1 +.TH DH_INSTALLCRON 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installcron \- install cron scripts into etc/cron.* .SH SYNOPSIS .B dh_installcron -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" +.I "[debhelper options]" .SH "DESCRIPTION" dh_installcron is a debhelper program that is responsible for installing -cron scripts into etc/cron.* in package build directories. The files +cron scripts into etc/cron.* in package build directories. The files debian/cron.daily, debian/cron.weekly, debian/cron.monthly, and debian/cron.d are installed. If your package generates multiple binary packages (or if you just prefer to do it), you can also use filenames like @@ -14,41 +14,16 @@ debian/package.cron.daily, where "package" is replaced with the name of the binary package this cron script goes into. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install cron files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install cron files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install cron files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 .SH AUTHOR diff --git a/dh_installdeb.1 b/dh_installdeb.1 index fc7b8dee..03fa1068 100644 --- a/dh_installdeb.1 +++ b/dh_installdeb.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLDEBFILES 1 +.TH DH_INSTALLDEB 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installdeb \- install files into the DEBIAN directory .SH SYNOPSIS .B dh_installdeb -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" +.I "[debhelper options]" .SH "DESCRIPTION" dh_installdeb is a debhelper program that is responsible for installing files into the DEBIAN directory in package build directories with the @@ -34,41 +34,16 @@ programs, such as , and are shell script fragments. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 .SH AUTHOR diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index cf1580d0..ae4782d2 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDEBFILES 1 +.TH DH_INSTALLDEBFILES 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installdebfiles \- install files into the DEBIAN directory .SH SYNOPSIS @@ -21,9 +21,13 @@ This program will be removed at some time in the furture. Any options passed to this program will be sent to each of the 3 programs listed above. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.TP +.BR debhelper (1) +.TP .BR dh_installdeb (1) +.TP .BR dh_shlibdeps (1) +.TP .BR dh_gencontrol (1) .SH AUTHOR Joey Hess diff --git a/dh_installdirs.1 b/dh_installdirs.1 index 8ae440c6..77c992d9 100644 --- a/dh_installdirs.1 +++ b/dh_installdirs.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLDIRS 1 +.TH DH_INSTALLDIRS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installdirs \- create subdirectories in package build directories .SH SYNOPSIS .B dh_installdirs -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [dir ...]" +.I "[debhelper options] [-A] [dir ...]" .SH "DESCRIPTION" dh_installdirs is a debhelper program that is responsible for creating subdirectories in package build directories. @@ -21,50 +21,25 @@ Be sure to only use directory names relative to the package build directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Create directories for all architecture dependent packages. -.TP -.B \-i, \--indep -Create directories for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Create directories for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-A, \--all Create any directories specified by command line parameters in ALL packages -acted on. +acted on, not just the first. .TP .B dir ... Create these directories in the package build directory of the first package acted on. (Or in all packages if -A is specified.) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS -Directories with spaces in them will not currently be installed. +Directories with spaces in them will not currently be installed properly. .SH AUTHOR Joey Hess diff --git a/dh_installdocs b/dh_installdocs index 7a11b7f7..fcdedc50 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -41,7 +41,7 @@ for PACKAGE in $DH_DOPACKAGES; do todo=`pkgfile $PACKAGE TODO` if [ "$todo" ]; then if isnative; then - doit "install -m 644 -p $todo $TMP/usr/doc/$PACKAGE/TODO" + doit "install -m 655 -p $todo $TMP/usr/doc/$PACKAGE/TODO" else doit "install -m 644 -p $todo $TMP/usr/doc/$PACKAGE/TODO.Debian" fi diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 98737606..ffae1623 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_INSTALLDOCS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installdocs \- install documentation into package build directories .SH SYNOPSIS .B dh_installdocs -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[debhelper options] [-A] [file ...]" .SH "DESCRIPTION" dh_installdocs is a debhelper program that is responsible for installing documentation into usr/doc/package in package build directories. @@ -31,24 +31,10 @@ 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. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-A, \--all Install all files specified by command line parameters in ALL packages @@ -58,26 +44,15 @@ acted on. Install these files as documentation into the first package acted on. (Or in all packages if -A is specified). .SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. -.P Note that dh_installdocs will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Filenames with spaces in them will not currently be installed. .SH "CONFORMS TO" diff --git a/dh_installemacsen b/dh_installemacsen new file mode 100755 index 00000000..e87cecef --- /dev/null +++ b/dh_installemacsen @@ -0,0 +1,34 @@ +#!/bin/sh -e +# +# Registration with emacsen-common. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + emacsen_install=`pkgfile $PACKAGE emacsen-install` + emacsen_remove=`pkgfile $PACKAGE emacsen-remove` + + if [ "$emacsen_install" ]; then + if [ ! -d "$TMP/usr/lib/emacsen-common/packages/install" ]; then + doit "install -d $TMP/usr/lib/emacsen-common/packages/install" + fi + doit "install $emacsen_install $TMP/usr/lib/emacsen-common/packages/install/$PACKAGE" + fi + + if [ "$emacsen_remove" ]; then + if [ ! -d "$TMP/usr/lib/emacsen-common/packages/remove" ]; then + doit "install -d $TMP/usr/lib/emacsen-common/packages/remove" + fi + doit "install $emacsen_remove $TMP/usr/lib/emacsen-common/packages/remove/$PACKAGE" + fi + + if [ "$emacsen_install" -o "$emacsen_remove" ]; then + if [ ! "$DH_NOSCRIPTS" ]; then + autoscript "postinst" "postinst-emacsen" + autoscript "prerm" "prerm-emacsen" + fi + fi +done diff --git a/dh_installemacsen.1 b/dh_installemacsen.1 new file mode 100644 index 00000000..15ec575a --- /dev/null +++ b/dh_installemacsen.1 @@ -0,0 +1,42 @@ +.TH DH_INSTALLEMACSEN 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installemacsen \- register an emacs add on package +.SH SYNOPSIS +.B dh_installemacsen +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installemacsen is a debhelper program that is responsible for installing +files used by the debian emacsen-common package into package build directories. +.P +It also automatically generates the postinst and prerm commands needed to +register a package as an emacs add on package. See +.BR dh_installdeb (1) +for an explanation of how this works. +.P +If a file named debian/package.emacsen-install exists, then it is installed into +usr/lib/emacsen-common/packages/install/package in the package build +directory. Similarly, debian/package.emacsen-remove is installed into +usr/lib/emacsen-common/packages/remove/package +.P +For the first first binary package listed in the control file, you may use +debian/emacsen-install and debian/emacsen-remove instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/prerm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.TP +.BR /usr/doc/emacsen-common/debian-emacs-policy.gz +.SH AUTHOR +Joey Hess diff --git a/dh_installexamples.1 b/dh_installexamples.1 index be0b4cc3..776aef79 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLEXAMPLES 1 +.TH DH_INSTALLEXAMPLES 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installexamples \- install example files into package build directories .SH SYNOPSIS .B dh_installexamples -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[debhelper options] [-A] [file ...]" .SH "DESCRIPTION" dh_installexamples is a debhelper program that is responsible for installing examples into usr/doc/package/examples in package build directories. @@ -17,24 +17,10 @@ A file named debian/package.examples (debian/examples may be used for the first binary package in debian/control) can list other files to be installed. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-A, \--all Install any files specified by command line parameters in ALL packages @@ -44,26 +30,15 @@ acted on. Install these files as examples into the first package acted on. (Or into all packages if -A is specified.) .SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. -.P Note that dh_installexamples will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Filenames with spaces in them will not currently be installed. .SH "CONFORMS TO" diff --git a/dh_installinit.1 b/dh_installinit.1 index 99222bc4..f76ec917 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLINIT 1 +.TH DH_INSTALLINIT 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installinit \- install init scripts into package build directories .SH SYNOPSIS .B dh_installinit -.I "[-v] [-a] [-i] [--no-act] [--init-script=scriptname] [-ppackage] [-Ptmpdir] [-n] [-r] [-d] [-uparams]" +.I "[debhelper options] [--init-script=scriptname] [-n] [-r] [-d] [-uparams]" .SH "DESCRIPTION" dh_installinit is a debhelper program that is responsible for installing init scripts into package build directories. @@ -19,24 +19,10 @@ by the packagename. (You may use debian/init for the first binary package listed in the control file.) .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install init scripts into all architecture dependent packages. -.TP -.B \-i, \--indep -Install init scripts into all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install init scripts into the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-n, \--noscripts Do not modify postinst/postrm/prerm scripts. @@ -60,22 +46,11 @@ If not specified, "default" will be passed to Use "scriptname" as for the filename the init script is installed as in etc/init.d/ . This is useful if you need to have an init script with a name different from the package's name. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index 7053dbc6..edc37c21 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLMANPAGES 1 +.TH DH_INSTALLMANPAGES 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installmanpages \- install man pages into package build directories .SH SYNOPSIS .B dh_installmanpages -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [file ...]" +.I "[debhelper options] [file ...]" .SH "DESCRIPTION" dh_installmanpages is a debhelper program that is responsible for automatically installing man pages into usr/man/ and usr/X11R6/man/ in @@ -24,50 +24,25 @@ After the man page installation step, dh_installmanpages will check to see if any of the man pages are ".so" links. If so, it changes them to symlinks. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install man pages into all architecture dependent packages. -.TP -.B \-i, \--indep -Install man pages into all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install man pages into the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B file ... Do not install these files as man pages, even if they look like valid man pages. .SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. -.P dh_installmanpages will install the man pages it finds into .B all packages you tell it to act on, since it can't tell what package the man pages belong in. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Man pages with the extension .B .man diff --git a/dh_installmenu.1 b/dh_installmenu.1 index 7147b49f..d9d8296a 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLMENU 1 +.TH DH_INSTALLMENU 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_installmenu \- install debian menu files into package build directories .SH SYNOPSIS .B dh_installmenu -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-n]" +.I "[debhelper options] [-n]" .SH "DESCRIPTION" dh_installmenu is a debhelper program that is responsible for installing files used by the debian menu package into package build directories. @@ -25,45 +25,21 @@ For the first first binary package listed in the control file, you may use debian/menu and debian/menu-method instead. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install menu files into all architecture dependent packages. -.TP -.B \-i, \--indep -Install menu files into all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install menu files into the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-n, \--noscripts Do not modify postinst/postrm scripts. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" .TP -.I DH_VERBOSE -Enables verbose mode +.BR debhelper (1) .TP -.I DH_NO_ACT -Enables no-act mode (see above). -.SH "SEE ALSO" -.BR /usr/doc/debhelper/README -, .BR menufile (5) .SH AUTHOR Joey Hess diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index bad72c4e..282d54fe 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -1,9 +1,9 @@ -.TH DH_MAKESHLIBS 1 +.TH DH_MAKESHLIBS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_makeshlibs \- automatically create shlibs file .SH SYNOPSIS .B dh_makeshlibs -.I "[-v] [-a] [-i] [--no-act] [-mmajor] [-Ptmpdir] [-ppackage] [-V[dependancies]]" +.I "[debhelper options] [-mmajor] [-V[dependancies]]" .SH "DESCRIPTION" dh_makeshlibs is a debhelper program that automatically scans for shared libraries, and generates a shlibs file for the libraries it finds. @@ -12,24 +12,10 @@ For this program to work, you cannot have already installed a DEBIAN/shlibs file. If such a file exits, the program will exit with an error. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Generate shlibs files for all architecture dependent packages. -.TP -.B \-i, \--indep -Generate shlibs files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Generate shlibs file for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-mmajor, \--major=major Instead of trying to guess the major number of the library from the filename @@ -56,26 +42,15 @@ Assuming the current version of the package is 1.0-3, generates a shlibs file that looks something like: libfoobar 1 libfoobar1 (>= 1.0-3) .TP -.B dh_makeshlibs \-V "libfoobar1 (>= 1.0)" +.B dh_makeshlibs \-V "'libfoobar1 (>= 1.0)'" Generates a shlibs file that looks something like: libfoobar 1 libfoobar1 (>= 1.0) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS There is no guarantee that the program will get the shlibs file right. For example, it may not correctly guess the major number of your package. In diff --git a/dh_md5sums.1 b/dh_md5sums.1 index f432fed2..22b4fe28 100644 --- a/dh_md5sums.1 +++ b/dh_md5sums.1 @@ -1,9 +1,9 @@ -.TH DH_MD5SUMS 1 +.TH DH_MD5SUMS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_md5sums \- generate DEBIAN/md5sums file .SH SYNOPSIS .B dh_md5sums -.I "[-x] [-v] [-a] [-i] [--no-act] [-Ptmpdir] [-ppackage]" +.I "[debhelper options] [-x]" .SH "DESCRIPTION" dh_md5sums is a debhelper program that is responsible for generating a DEBIAN/md5sums file, which lists the md5sums of each file in the package. @@ -14,44 +14,19 @@ All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles The md5sums file is installed with proper permissions and ownerships. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Generate md5sums files for all architecture dependent packages. -.TP -.B \-i, \--indep -Generate md5sums files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Generate md5sums file for the package named "package". +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-x, \--include-conffiles Include conffiles in the md5sums list. Note that this is redundant, and included elsewhere in debian packages. -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_movefiles.1 b/dh_movefiles.1 index 1c27f968..260d5069 100644 --- a/dh_movefiles.1 +++ b/dh_movefiles.1 @@ -1,9 +1,9 @@ -.TH DH_MOVEFILES 1 +.TH DH_MOVEFILES 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_movefiles \- moves files out of debian/tmp into subpackages .SH SYNOPSIS .B dh_movefiles -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [file ..]" +.I "[debhelper options] [file ..]" .SH "DESCRIPTION" dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp and into other package build directories. This may be useful @@ -22,46 +22,21 @@ symlinks. This is done becuase it tends to be a good thing to have symlinks last in debian packages, particularly in shared library packages. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Move files for all architecture dependent packages. -.TP -.B \-i, \--indep -Move files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Move files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B file .. Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory will be moved. You can even use wildcards if you like. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1 index b976f8c9..f9f6f3e4 100644 --- a/dh_shlibdeps.1 +++ b/dh_shlibdeps.1 @@ -1,9 +1,9 @@ -.TH DH_INSTALLDEBFILES 1 +.TH DH_SHLIBDEPS 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_shlibdeps \- calculate shared library dependancies .SH SYNOPSIS .B dh_shlibdeps -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-uparams]" +.I "[debhelper options] [-uparams]" .SH "DESCRIPTION" dh_shlibdeps is a debhelper program that is responsible for calculating shared library dependancies for all executables found in the package build @@ -11,51 +11,25 @@ directory. .P This program is merely a wrapper around .BR dpkg-shlibdeps (1) -that calls it once for each package listed in the control file. You may -prefer to simply run -.BR dpkg-shlibdeps (1) -by hand. +that calls it once for each package listed in the control file. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Install files for all architecture dependent packages. -.TP -.B \-i, \--indep -Install files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-uparams, \--dpkg-shlibdeps-params=params Pass "params" to .BR dpkg-shlibdeps (1) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" .TP -.I DH_VERBOSE -Enables verbose mode +.BR debhelper (1) .TP -.I DH_NO_ACT -Enables no-act mode (see above). -.SH "SEE ALSO" -.BR /usr/doc/debhelper/README .BR dpkg-shlibdeps (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 diff --git a/dh_strip.1 b/dh_strip.1 index 9ae97c60..960dc72e 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -1,9 +1,9 @@ -.TH DH_STRIP 1 +.TH DH_STRIP 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_strip \- strip executables, shared libraries, and some static libraries. .SH SYNOPSIS .B dh_strip -.I "[-v] [-a] [-i] [--no-act] [-Ptmpdir] [-ppackage]" +.I "[debhelper options]" .SH "DESCRIPTION" dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for @@ -13,42 +13,16 @@ It assumes that files that have names like lib*_g.a are static libraries used in debugging, and will not strip them. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Strip files in all architecture dependent packages. -.TP -.B \-i, \--indep -Strip files in all architecture independent packages (likely, this is -pointless :-). -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Strip files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will have their files stripped. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 .SH AUTHOR diff --git a/dh_suidregister.1 b/dh_suidregister.1 index 57694956..edce61d0 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -1,9 +1,9 @@ -.TH DH_SUIDREGISTER 1 +.TH DH_SUIDREGISTER 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_suidregister \- set up package to register files with suidregister .SH SYNOPSIS .B dh_suidregister -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [file ...]" +.I "[debhelper options] [-A] [file ...]" .SH "DESCRIPTION" dh_suidregister is a debhelper program that is responsible for modifying the postinst and postrm scripts of a package so the package will register files @@ -23,29 +23,15 @@ If neither of these methods is used to specify files, dh_suidregister will scan the package build directory for files that have suid permissions, and will automatically register all files it finds. .P -Note that this package modifies your postinst and postrm files. See +Note that this program modifies your postinst and postrm files. See .BR dh_installdeb (1) for an explanation of how this works. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Register files for all architecture dependent packages. -.TP -.B \-i, \--indep -Register files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Register files for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-A, \--all Register any files specified by command line parameters in ALL packages @@ -55,24 +41,14 @@ with other debhelper programs. .B file ... Register these files in the first package acted on. (Or in all packages if -A is specified.) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" .TP -.I DH_VERBOSE -Enables verbose mode +.BR debhelper (1) .TP -.I DH_NO_ACT -Enables no-act mode (see above). -.SH "SEE ALSO" -.BR /usr/doc/debhelper/README -, .BR suidregister (8) .SH AUTHOR Joey Hess diff --git a/dh_testdir.1 b/dh_testdir.1 index 17561acc..309a7d94 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -1,9 +1,9 @@ -.TH DH_TESTDIR 1 +.TH DH_TESTDIR 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_testdir \- test directory before building debian package .SH SYNOPSIS .B dh_testdir -.I "[-v] [file ...]" +.I "[debhelper options] [file ...]" .SH "DESCRIPTION" dh_testdir tries to make sure that you are in the correct directory when building a debian package. It makes sure that the file debian/control @@ -11,18 +11,19 @@ exists, as well as any other files you specify. If not, it exits with an error. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -This currently has no effect. +.B [debhelper options] +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B file ... Test for the existence of these files. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH BUGS Files with spaces in their names will not be processed correctly. .SH AUTHOR diff --git a/dh_testroot.1 b/dh_testroot.1 index 605dae4c..6fcdf4f2 100644 --- a/dh_testroot.1 +++ b/dh_testroot.1 @@ -1,9 +1,9 @@ -.TH DH_TESTROOT 1 +.TH DH_TESTROOT 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_testroot \- ensure that a package is built as root .SH SYNOPSIS .B dh_testroot -.I "[-v]" +.I "[debhelper options]" .SH "DESCRIPTION" dh_testroot simply checks to see if you are root. If not, it exits with an error. Debian packages must be built as root, though you can use @@ -11,14 +11,15 @@ error. Debian packages must be built as root, though you can use to work around this. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -This currently has no effect. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode. +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_testversion b/dh_testversion new file mode 100755 index 00000000..57c0e588 --- /dev/null +++ b/dh_testversion @@ -0,0 +1,24 @@ +#!/usr/bin/perl -w +# +# Debhelper version check. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +use Dh_Version; # contains the version number of debhelper. +init(); + +my($compare, $ver); + +if ($#ARGV > 0) { + $compare=shift; + $ver=shift; +} +elsif ($#ARGV eq 0) { + $compare=">="; + $ver=shift; +} + +if (defined $compare and defined $ver) { + system('dpkg','--compare-versions',$Dh_Version::version,$compare,$ver) == 0 || + error("debhelper version $Dh_Version::version is installed, but a version $compare $ver is needed to build this package."); +} diff --git a/dh_testversion.1 b/dh_testversion.1 index 5fb7332b..19ded263 100644 --- a/dh_testversion.1 +++ b/dh_testversion.1 @@ -1,8 +1,8 @@ -.TH DH_TESTROOT 1 +.TH DH_TESTVERSION 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_testversion \- ensure that the correct version of debhelper is installed .SH SYNOPSIS -.B dh_testversion [operator] [version] +.B dh_testversion [debhelper options] [operator] [version] .SH "DESCRIPTION" dh_testversion compares the version of debhelper against the version you specify, and if the condition is not met, exits with an error message. @@ -18,6 +18,11 @@ dh_autofixbugs cannot be found, so there is no need for you to use dh_testversion. .SH OPTIONS .TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP .B operator Optional comparison operator used in comparing the versions. If not specified, ">=" is used. For descriptions of the comparison operators, see @@ -28,19 +33,19 @@ Version number to compare against the current version of debhelper. If not specified, dh_testversion does nothing. .SH EXAMPLES .TP -.I dh_testversion 0.50 -Make sure debhelper version 0.50 or higher is installed. +.I dh_testversion 1.0 +Make sure debhelper version 1.0 or higher is installed. .TP -.I dh_testversion ge 0.50 -Another way to make sure debhelper version 0.50 or higher is installed. +.I dh_testversion ge 1.0 +Another way to make sure debhelper version 1.0 or higher is installed. .TP -.I dh_testversion le 0.50 -Make sure a version of debhelper less than version 0.50 is installed. +.I dh_testversion lt 1.0 +Make sure a version of debhelper less than version 1.0 is installed. .SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode. +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" -.BR /usr/doc/debhelper/README +.BR debhelper (1) .SH AUTHOR Joey Hess diff --git a/dh_undocumented.1 b/dh_undocumented.1 index 69d2150a..25654ed5 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -1,9 +1,9 @@ -.TH DH_UNDOCUMENTED 1 +.TH DH_UNDOCUMENTED 1 "" "Debhelper Commands" "Debhelper Commands" .SH NAME dh_undocumented \- make symlinks to undocumented.7.gz man page .SH SYNOPSIS .B dh_undocumented -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir] [-A] [manpage ...]" +.I "[debhelper options [-A] [manpage ...]" .SH "DESCRIPTION" dh_undocumented is a debhelper program that is responsible for making symlinks to the @@ -32,24 +32,11 @@ the first binary package in debian/control) can list other man page names to set up. .SH OPTIONS .TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. .TP -.B \-a, \--arch -Install undocumented man page symlinks for all architecture dependent packages. -.TP -.B \-i, \--indep -Install undocumented man page symlinks for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Install undocumented man page symlinks for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. .TP .B \-A, \--all Install undocumented man page symlinks for any man pages specified by @@ -60,24 +47,14 @@ this useful, it's here for consitency with other debhelper programs. Install undocumented man page symlinks for each of these man pages into the first package acted on. (Or in all packages acted on if -A is specified.) -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. .SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" .TP -.I DH_VERBOSE -Enables verbose mode +.BR debhelper (1) .TP -.I DH_NO_ACT -Enables no-act mode (see above). -.SH "SEE ALSO" -.BR /usr/doc/debhelper/README -, .BR undocumented (7) .SH "CONFORMS TO" Debian policy, version 2.3.0.0 diff --git a/doc/README b/doc/README index 986eb02c..845f94ef 100644 --- a/doc/README +++ b/doc/README @@ -1,6 +1,7 @@ Debhelper is a collection of programs that can be used in debian/rules files -to automate common tasks. For further documentation, see the man pages for -dh_* commands. +to automate common tasks related to building debian binary packages. For +further documentation, see the man pages for dh_* commands. For an overview +of debhelper, see the debhelper man page. To help you get started, I've included examples of debian/rules files that use debhelper commands extensively. See /usr/doc/debhelper/examples/ . @@ -34,67 +35,10 @@ by the -n parameter. Note that it will be shell code, so you cannot directly use it in a perl script. If you would like to embed it into a perl script, here is one way to -do that: +do that (note the tricky use of backquotes): print << `EOF` #DEBHELPER# EOF - -Notes on multiple binary packages: ---------------------------------- - -If your source package generates more than one binary package, debhelper -programs will default to acting on all binary packages when run. If your -source package happens to generate one architecture dependent package, and -another architecture independent package, this is not the correct behavior, -because you need to generate the architecture dependent packages in the -binary-arch debian/rules target, and the architecture independent packages -in the binary-indep debian/rules target. - -To facilitate this, as well as give you more control over which packages -are acted on by debhelper programs, all debhelper programs accept the -following parameters: - --a Act on architecture dependent packages --i Act on architecture independent packages --ppackage Act on the package named "package" (may be repeated multiple - times) - -These parameters are cumulative. If none are given, the tools default to -affecting all packages. - -See examples/rules.multi for an example of how to use this. - -Package build directories -- debian/tmp, etc: --------------------------------------------- - -By default, all debhelper programs assume that the temporary directory used -for assembling the tree of files in a package is debian/tmp for the first -package listed in debian/control, and debian/ for each -additional package. - -Sometimes, you might want to use some other temporary directory. This is -supported by the -P flag. The directory to use is specified after -P, for -example, "dh_installdocs -Pdebian/tmp", will use debian/tmp as the temporary -directory. Note that if you use -P, the debhelper programs can only be -acting on a single package at a time. So if you have a package that builds -many binary packages, you will need to use the -p flag to specify which -binary package the debhelper program will act on. For example: - - dh_installdocs -pfoolib1 -Pdebian/tmp-foolib1 - dh_installdocs -pfoolib1-dev -Pdebian/tmp-foolib1-dev - dh_installdocs -pfoolib-bin -Pdebian/tmp-foolib-bin - -This uses debian/tmp- as the package build directory. - -Other notes: ------------ - -* In general, if any debhelper program needs a directory to exist under - debian/, it will create it. I haven't bothered to document this in all the - man pages, but for example, dh_installdeb knows to make debian/tmp/DEBIAN/ - before trying to put files there, dh_installmenu knows you need a - debian/tmp/usr/lib/menu/ before installing the menu files, etc. - -- Joey Hess diff --git a/doc/TODO b/doc/TODO index 188e3c6c..dbfc2771 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,19 +1,29 @@ -* add all other functionality of debstd (??) - - add a program to generate file similar to buildinfo.Debian generated by - debmake (wishlist bug #17043). I just never saw the point of that file.. - - Make dh_movefiles remove emptied directories after it's moved all the - files out of them (wishlist bug #17111). -* something should add ldconfig calls properly to the postinst of packages - that contain shared libraries. maybe dh_makeshlibs? But it wasn't designed - to do that originally, and even worse, it is often run after - dh_installdeb, so the fragements wouldn't go into the postinst. So maybe a - new script is called for. +This is the TODO for debhelper. As more and more people use debhelper, this +list grows - I welcome patches to fix items on it! + +Bugs: + +* dh_movefiles bombs if the argument is a wildcard pattern that matches + nothing (reported by Drow). +* dh_installdocs fails if debian/docs is empty except for a blank line. + There are probably other instances of this. Debhelper should behave better + (#24686). +* all commands should print a warning message if non-cumulative parameters + are given more than once (ie, two -u's to dh_gencontrol). + +Wishlist items: + +* Add option to dh_compress to allow addition of files to compress besides + the default ones. +* Add emacsen support to debhelper. (#21401) +* Make dh_movefiles remove emptied directories after it's moved all the + files out of them (#17111). * info support for debhelper (currently implemented, but I hate how I did it, - so it's not in the package.) (wishlist bug #15717) + so it's not in the package.) (#15717) * enhance dh_installmanpages so it associates binaries and man pages and installs the man pages into the correct areas to suit the binaries they document. I may need to make this only happen when a switch is given, to - preserve backward compatibility. + preserve backward compatibility. (#16933, #17061) * maybe make dh_installmanpages look at the .TH line of man pages whose filenames end in .man, to figure out what section they go it. This would require a switch to turn on, for backwards compatibility. @@ -24,3 +34,32 @@ they might have; still it would be nice to check them too, just to make debhelper more flexible.) One easy fix is to add umask 022 to dh_lib, however, there may be unforeseen ramifications of such a change. +* something should add ldconfig calls properly to the postinst of packages + that contain shared libraries. maybe dh_makeshlibs? But it wasn't designed + to do that originally, and even worse, it is often run after + dh_installdeb, so the fragements wouldn't go into the postinst. So maybe a + new script is called for. +* docbase support (#25233). Waiting for docbase to stabalize and be used + widly. +* Support /etc/X11/window-managers, by making it easy for window managers to + add themselves to it in the postinst. Not high priority because there are + few window managers. (#20971) +* dhelp support. Currently pending on dhelp use becoming widespead (#18342) +* Support use of environment variables in data taken from user, ie, in + debian/dirs. The problem with doing this is that we really want to allow + any filenames in that input, even those that look like environment + variables. However, it may be worth adding a switch to make it parse + environment variables. (#20964) +* It's possible to speed up debhelper by having it cache some values that + multiple commands call. One way to do this would be to write dh_cache, + that generates the cache. The catch is that if the user runs that program, + they are stating that they don't do anything later to invalidate the cache, + without calling ch_cache again. (#23792) +* Add a switch to dh_installdeb to allow it to do user definied + substitutions. (#25235) + +Depricated: + +* remove dh_installdebfiles, dh_du. + - need to wait a reasonable length of time. I'm currently planning + on doing this after slink is released. -- cgit v1.2.3