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_testdir.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dh_testdir.1') diff --git a/dh_testdir.1 b/dh_testdir.1 index 569a580b..da245542 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -1,4 +1,4 @@ -.TH DH_INSTALLDOCS 1 +.TH DH_TESTDIR 1 .SH NAME dh_testdir \- test directory before building debian package .SH SYNOPSIS -- 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_testdir.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_testdir.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 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_testdir.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 From 0287a9cbf507569b92fa157fb002a4ead079bbdb Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:58:44 +0000 Subject: r116: Initial Import --- debian/changelog | 18 ++++++++++++++++++ debian/rules | 19 +++++++------------ dh_installchangelogs | 5 +++++ dh_installchangelogs.1 | 9 ++++++++- dh_shlibdeps | 42 +++++++++++++++++++++++------------------- dh_testdir | 17 +++++++++-------- dh_testdir.1 | 2 -- dh_testroot | 13 +++++++------ 8 files changed, 77 insertions(+), 48 deletions(-) (limited to 'dh_testdir.1') diff --git a/debian/changelog b/debian/changelog index f1a479e4..b124f138 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +debhelper (1.1.10) unstable; urgency=low + + * It's come to my attention that a few packages use filename globbing in + debian/{docs,examples,whatever} files and expect that to work. It used + to work before the perl conversion, but it was never _documented_, or + intented to work. If you use this in your packages, they are broken and + need fixing (and will refuse to build with current versions of debhelper). + I apologize for the inconvenience. + + * dh_clean: fixed a bug, intorduced in version 1.1.8, where it didn't + remove debian/files properly. + * dh_shlibdeps, dh_testdir, dh_testroot, dh_testversion: converted to perl. + * Encode the version of debhelper in a sepererate file, so dh_testversion + doesn't have to be generated when a new version of debhelper is built. + * Removed bogus menu file. + + -- Joey Hess Mon, 17 Aug 1998 14:15:17 -0700 + debhelper (1.1.9) unstable; urgency=low * dh_fixperms: has been removing the +x bits of all doc/*/examples/* files diff --git a/debian/rules b/debian/rules index 8572498b..94af8686 100755 --- a/debian/rules +++ b/debian/rules @@ -8,35 +8,30 @@ export DH_AUTOSCRIPTDIR=autoscripts # Figure out the current debhelper version. -VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null`" : \ - '.*Version: \(.*\).*Distribution:') +VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)') export DH_VERBOSE=1 -test_files=dh_lib - build: - ./dh_testdir $(test_files) - sed "s/#DEBHELPER_VERSION#/$(VERSION)/" < dh_testversion.in \ - > dh_testversion - chmod 755 dh_testversion +# Nothing to do. clean: - ./dh_testdir $(test_files) + ./dh_testdir ./dh_testroot - ./dh_clean dh_testversion + ./dh_clean # Build architecture-dependent files here. binary-arch: build -# We have nothing to do by default. +# Nothing to do. # Build architecture-independent files here. binary-indep: build - ./dh_testdir $(test_files) + ./dh_testdir ./dh_testroot ./dh_clean -k ./dh_installdirs usr/bin usr/lib/debhelper + echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > debian/tmp/usr/lib/debhelper/Dh_Version.pm find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \ -exec install -p {} debian/tmp/usr/bin \; cp -a dh_lib dh_getopt.pl *.pm debian/tmp/usr/lib/debhelper diff --git a/dh_installchangelogs b/dh_installchangelogs index 0024fc10..97e057b7 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -43,5 +43,10 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { if ($upstream) { doit("install","-p","-m644",$upstream,"$TMP/usr/doc/$PACKAGE/changelog"); + if ($dh{K_FLAG}) { + # Install symlink to original name of the upstream changelog file. + # Use basename in case original file was in a subdirectory or something. + doit("ln","-sf","changelog","$TMP/usr/doc/$PACKAGE/".Dh_Lib::basename($upstream)); + } } } diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1 index 9a579a65..815c2dda 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 "[debhelper options] [upstream]" +.I "[debhelper options] [-k] [upstream]" .SH "DESCRIPTION" dh_installchangelogs is a debhelper program that is responsible for installing changelogs into package build directories. @@ -25,6 +25,13 @@ See .BR debhelper (1) for a list of options common to all debhelper commands. .TP +.B \-k, \--keep +Keep the original name of the upstream changelog. This will be accomplished +by installing the upstream changelog as "changelog", and making a symlink from +that to the original name of the changelog file. This can be useful if the +upstream changelog has an unusual name, or if other documentation in the +package refers to the changelog file. +.TP .B upstream Install this file as the upstream changelog. .SH NOTES diff --git a/dh_shlibdeps b/dh_shlibdeps index e30c4a5b..f7ac6012 100755 --- a/dh_shlibdeps +++ b/dh_shlibdeps @@ -1,24 +1,28 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Find dependancies. Simple dpkg-shlibdeps wrapper. -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); -for PACKAGE in $DH_DOPACKAGES; do - TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $EXT=pkgext($PACKAGE); - # Run dpkg-shlibdeps to generate dependancies. - filelist="" - for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do - case "`file $file`" in - *ELF*) - filelist="$file $filelist" - ;; - esac - done - if [ "$filelist" ]; then - doit "dpkg-shlibdeps -Tdebian/${EXT}substvars $DH_U_PARAMS $filelist" - fi -done + my @filelist; + my $ff; + + # Generate a list of all ELF binaries in the package. + foreach $file (split(/\n/,`find $TMP -type f \\( -perm +111 -or -name "*.so*" \\)`)) { + # TODO: this is slow, optimize. Ie, file can run once on multiple files.. + $ff=`file $file`; + if ($ff=~m/ELF/) { + push @filelist,$file; + } + } + + if (@filelist) { + doit("dpkg-shlibdeps","-Tdebian/$EXT\substvars",@{$dh{U_PARAMS}},@filelist); + } +} diff --git a/dh_testdir b/dh_testdir index 4e482fce..0cb95c1d 100755 --- a/dh_testdir +++ b/dh_testdir @@ -1,14 +1,15 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Checks to make sure we are building the package in the right directory. # Tests for the existance of debian/control, and for the existance # of any other files you specify on the command line. -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); -for file in debian/control $@; do - if [ ! -e "$file" ] ; then - error "\"$file\" not found. Are you sure you are in the correct directory?" - fi -done +foreach $file ('debian/control',@ARGV) { + if (! -e $file) { + error("\"$file\" not found. Are you sure you are in the correct directory?"); + } +} diff --git a/dh_testdir.1 b/dh_testdir.1 index 309a7d94..43c7439a 100644 --- a/dh_testdir.1 +++ b/dh_testdir.1 @@ -24,7 +24,5 @@ See for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" .BR debhelper (1) -.SH BUGS -Files with spaces in their names will not be processed correctly. .SH AUTHOR Joey Hess diff --git a/dh_testroot b/dh_testroot index c7041094..629b8f84 100755 --- a/dh_testroot +++ b/dh_testroot @@ -1,12 +1,13 @@ -#!/bin/sh -e +#!/usr/bin/perl -w # # Checks to make sure you are root. -PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); # Test for uid = 0, not username of root, becuase # some people rename root. -if [ "`id -u`" != 0 ]; then - error "You must run this as root." -fi +if ($< != 0) { + error("You must run this as root."); +} -- cgit v1.2.3