From e348bcc96f206a25afc2ad1d4f004c74b7f8ab37 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:56:24 +0000 Subject: [PATCH] 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 diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm new file mode 100644 index 0000000..eb6aef9 --- /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 0000000..c9b964c --- /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 0000000..45f1dee --- /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 0000000..d11dafa --- /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 0000000..f329666 --- /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 db56690..10b8179 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 c4dccd9..0a97ae8 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 0000000..e69de29 diff --git a/debian/cron.daily b/debian/cron.daily new file mode 100644 index 0000000..e69de29 diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ + diff --git a/debian/menu b/debian/menu new file mode 100644 index 0000000..e69de29 diff --git a/dh_builddeb.1 b/dh_builddeb.1 index ecbbfa6..cf492b4 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 cb437e9..333fa17 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 7d6e497..1b58f70 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 c78291e..ec0def5 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 e3568eb..e47e64a 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 9497a61..670e371 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 0e84533..544ee9b 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 19f89d1..fd304c7 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 b0cc783..2bfade4 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 b7a856c..f1aa7ce 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 84fb6b4..7082233 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 20bdc82..adda071 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 fc7b8de..03fa106 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 cf1580d..ae4782d 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 8ae440c..77c992d 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 7a11b7f..fcdedc5 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 9873760..ffae162 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 0000000..e87cece --- /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 0000000..15ec575 --- /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 be0b4cc..776aef7 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 99222bc..f76ec91 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 7053dbc..edc37c2 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 7147b49..d9d8296 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 bad72c4..282d54f 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 f432fed..22b4fe2 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 1c27f96..260d506 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 b976f8c..f9f6f3e 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 9ae97c6..960dc72 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 5769495..edce61d 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 17561ac..309a7d9 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 605dae4..6fcdf4f 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 0000000..57c0e58 --- /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 5fb7332..19ded26 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 69d2150..25654ed 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 986eb02..845f94e 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 188e3c6..dbfc277 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. -- 2.39.5