r104: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:56:24 +0000 (04:56 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:56:24 +0000 (04:56 +0000)
47 files changed:
Dh_Getopt.pm [new file with mode: 0644]
Dh_Lib.pm [new file with mode: 0644]
autoscripts/postinst-emacsen [new file with mode: 0644]
autoscripts/prerm-emacsen [new file with mode: 0644]
debhelper.1 [new file with mode: 0644]
debian/changelog
debian/control
debian/cron.d [new file with mode: 0644]
debian/cron.daily [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/menu [new file with mode: 0644]
dh_builddeb.1
dh_clean.1
dh_compress
dh_compress.1
dh_debstd.1
dh_du.1
dh_fixperms
dh_fixperms.1
dh_gencontrol.1
dh_getopt.pl
dh_installchangelogs.1
dh_installcron.1
dh_installdeb.1
dh_installdebfiles.1
dh_installdirs.1
dh_installdocs
dh_installdocs.1
dh_installemacsen [new file with mode: 0755]
dh_installemacsen.1 [new file with mode: 0644]
dh_installexamples.1
dh_installinit.1
dh_installmanpages.1
dh_installmenu.1
dh_makeshlibs.1
dh_md5sums.1
dh_movefiles.1
dh_shlibdeps.1
dh_strip.1
dh_suidregister.1
dh_testdir.1
dh_testroot.1
dh_testversion [new file with mode: 0755]
dh_testversion.1
dh_undocumented.1
doc/README
doc/TODO

diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm
new file mode 100644 (file)
index 0000000..eb6aef9
--- /dev/null
@@ -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 (file)
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 (<DH_FARRAY_IN>) {
+               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,"<debian/control") || 
+               error("cannot read debian/control: $!\n");
+       while (<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 (file)
index 0000000..45f1dee
--- /dev/null
@@ -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 (file)
index 0000000..d11dafa
--- /dev/null
@@ -0,0 +1 @@
+/usr/lib/emacsen-common/emacs-package-remove #PACKAGE#
diff --git a/debhelper.1 b/debhelper.1
new file mode 100644 (file)
index 0000000..f329666
--- /dev/null
@@ -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/<packagename> 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 <joeyh@master.debian.org>
index db56690c9c24e8373b8aa8500508b319e93d6205..10b817989ebebbb69e6744c0ca402ac5c1257c8e 100644 (file)
@@ -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 <joeyh@master.debian.org>  Sun, 30 Aug 1998 22:21:26 -0700
+
 debhelper (1.0) stable unstable; urgency=low
 
   * 1.0 at last!
index c4dccd9595bc585a49a7510486fa2a4890cc8945..0a97ae80bf70b74ab79a5ce3f59e5ed3b15226b6 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/debian/cron.daily b/debian/cron.daily
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/debian/menu b/debian/menu
new file mode 100644 (file)
index 0000000..e69de29
index ecbbfa6c6e8cb39bb6b93325a5a143e3098d7c47..cf492b4c28b88707ea28d7fab8014f262dc01c26 100644 (file)
@@ -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 <joeyh@master.debian.org>
index cb437e9cb1023b3a9c5f0055638058f52a697372..333fa1743db20555644f16bef9599ef1a8dc8143 100644 (file)
@@ -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.
index 7d6e4979ade9cef8456959980e5ded3e035e386e..1b58f70a19f85a7a6cbb268f634487d3cd4e6cc3 100755 (executable)
@@ -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
index c78291ee82d80df63cb4f9d0094308ddd9febe56..ec0def529171ebd47daa24001876763566db227a 100644 (file)
@@ -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"
index e3568eb61b8ae1424ae131781870b4419dc6a65a..e47e64aa976c28cdbe7337480496fc4d061f67ce 100644 (file)
@@ -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 <joeyh@master.debian.org>
diff --git a/dh_du.1 b/dh_du.1
index 9497a61df9bd25e9963616ae0c68138515a5a22e..670e371db4793367071778d65b08416b0a290252 100644 (file)
--- 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 <joeyh@master.debian.org>
index 0e845335cb8f6327cf44142f3c4347df92b1fc2c..544ee9be9dd50805360e89a6ede751abc97abd93 100755 (executable)
@@ -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"
 
index 19f89d11230bc5e0a2096ee917bc40d6c7246826..fd304c70688bc09c20e205a2e7f8d4f4bc8b34e7 100644 (file)
@@ -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
index b0cc783c8fc48f750f9a0c6f9b5320c28f0ed787..2bfade492411bae2cbd563f2f8aa46c8fa8fdf1f 100644 (file)
@@ -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
index b7a856c4acc9993ed5b55003e73cc184f976eadf..f1aa7cecc9db7bed7bcb9c42fbea9f757d2eddf6 100755 (executable)
@@ -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'
index 84fb6b468c11dba43dcb7c14bb805c14680ab449..708223382bfc78106adcc87e0ec42a30dd8d513a 100644 (file)
@@ -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
index 20bdc82ff486a75ef7e2d6535913e526d9da4853..adda071169b67d75890f7247273d57280cc62d6e 100644 (file)
@@ -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
index fc7b8deee0953e98526e52acc832ff0723840be2..03fa10684d4a84511b5c79636b6a70ba76ba1290 100644 (file)
@@ -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
index cf1580d0259eb6f541a3425ba63598f0f7ee34c9..ae4782d265ea5f4f4b709501ee3a208c1b4cb316 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 8ae440c63d0e5f27371cae4e7fb19c62e7be964d..77c992d96b52997f17d4e719758407b2384f1ff7 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 7a11b7f7c7b53b23e31f5f834c67e3343bde54ef..fcdedc500fed9cd119d6d1adb7eeaebfd4a0af16 100755 (executable)
@@ -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
index 98737606e7e414eddca7d42eea55c531f694cfe7..ffae16236011c69bd00d1b62c8746c79ef82fcb6 100644 (file)
@@ -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 (executable)
index 0000000..e87cece
--- /dev/null
@@ -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 (file)
index 0000000..15ec575
--- /dev/null
@@ -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 <joeyh@master.debian.org>
index be0b4cc32d357e4d653844cb151204a9303b2bdd..776aef79df9b5c0d21153f12e2d6c933a08596ba 100644 (file)
@@ -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"
index 99222bc436ac06abf001d69ff6c10b5ec259531a..f76ec9170113385a13f7799b4c0b2e18061a329c 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 7053dbc6a8ebc995fba8318c983859480d5db7d7..edc37c21c7afd533fec169e642154956dfb886fd 100644 (file)
@@ -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
index 7147b49f2578784edec01cf152dcbead22759d6e..d9d8296a174ad7c9315fa589c3b77da2c8e04f29 100644 (file)
@@ -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 <joeyh@master.debian.org>
index bad72c4e72702cb64804adb44a89a7d94e69ea21..282d54fef803e41638cb14f8c3e564bec8bec24d 100644 (file)
@@ -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
index f432fed26145b7885ba47dad44914f0ca0e15185..22b4fe284565d46fa2b0c6f2e24f8c7b8168e03d 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 1c27f9683f578a620139ea37857da283a0477cda..260d5069135bf03acea7b91346a26834982ed41c 100644 (file)
@@ -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 <joeyh@master.debian.org>
index b976f8c9996ab8abf2bb992192275986daf8bcbd..f9f6f3e4ea61328769565b6aab10e9edf5d2ae47 100644 (file)
@@ -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
index 9ae97c600a879e052b97b654c840eb823a06cc25..960dc72e9f9ab4c5e9dd19da45b3177b21e1f353 100644 (file)
@@ -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
index 5769495646a09844a4c2d827e0cbcdb7af1b555a..edce61d05560d13e6b665b8307fa5293a7aa58ee 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 17561accceaa77eb28b08505a84f924fe241bb97..309a7d9475214dcc1818df2e83f0d6d211609e51 100644 (file)
@@ -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
index 605dae4c51eac4e7caacd5cbb1f79c98da02f2e4..6fcdf4f2cb87b7ddd8a5ffa33eb44e72c4362396 100644 (file)
@@ -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 <joeyh@master.debian.org>
diff --git a/dh_testversion b/dh_testversion
new file mode 100755 (executable)
index 0000000..57c0e58
--- /dev/null
@@ -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.");
+}
index 5fb7332baf5c492de5630896136284a9215dd4d0..19ded263ba9b693f962f675a0c08edb9e8c9c908 100644 (file)
@@ -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 <joeyh@master.debian.org>
index 69d2150a7c1595415b30687e34151be5d879c615..25654ed5284ee7e02fdd9f11b40e871f1bb1c080 100644 (file)
@@ -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
index 986eb02cb1955f3c77d6128386bd1668756347da..845f94ef42fc6b65e3451f9401fa1278cf8f072f 100644 (file)
@@ -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/<packagename> 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-<package> 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 <joeyh@master.debian.org>
index 188e3c6c7bb9a0b4f502018c7e9058d049f8b678..dbfc277198505836180e425b8b6c12b45ce08a01 100644 (file)
--- 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.
   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.