]> git.donarmstrong.com Git - debhelper.git/commitdiff
r905: This commit was manufactured by cvs2svn to create tag version_2.0.91
authorunknown <unknown>
Mon, 28 Jul 2003 18:45:30 +0000 (18:45 +0000)
committerunknown <unknown>
Mon, 28 Jul 2003 18:45:30 +0000 (18:45 +0000)
'version_2_0_91'.

170 files changed:
.foo [deleted file]
BUGS [deleted file]
Debian/Debhelper/Dh_Getopt.pm [new file with mode: 0644]
Debian/Debhelper/Dh_Lib.pm [new file with mode: 0644]
Dh_Getopt.pm [deleted file]
Dh_Lib.pm [deleted file]
Makefile [deleted file]
PROGRAMMING [deleted file]
README [deleted file]
TODO [deleted file]
Test.pm [deleted file]
autoscripts/postinst-doc-base
autoscripts/postinst-emacsen [deleted file]
autoscripts/postinst-info
autoscripts/postinst-info-nosection
autoscripts/postinst-init
autoscripts/postinst-init-norestart [deleted file]
autoscripts/postinst-init-nostart [new file with mode: 0644]
autoscripts/postinst-makeshlibs [new file with mode: 0644]
autoscripts/postinst-menu
autoscripts/postinst-menu-method
autoscripts/postinst-mime
autoscripts/postinst-modules
autoscripts/postinst-python [new file with mode: 0644]
autoscripts/postinst-scrollkeeper [new file with mode: 0644]
autoscripts/postinst-sgmlcatalog [new file with mode: 0644]
autoscripts/postinst-suid
autoscripts/postinst-usrlocal [new file with mode: 0644]
autoscripts/postinst-wm [deleted file]
autoscripts/postinst-xaw [deleted file]
autoscripts/postrm-init
autoscripts/postrm-makeshlibs [new file with mode: 0644]
autoscripts/postrm-menu [new file with mode: 0644]
autoscripts/postrm-menu-method
autoscripts/postrm-mime [new file with mode: 0644]
autoscripts/postrm-modules [new file with mode: 0644]
autoscripts/postrm-scrollkeeper [new file with mode: 0644]
autoscripts/postrm-sgmlcatalog [new file with mode: 0644]
autoscripts/postrm-suid
autoscripts/postrm-wm [deleted file]
autoscripts/postrm-xaw [deleted file]
autoscripts/prerm-doc-base
autoscripts/prerm-emacsen [deleted file]
autoscripts/prerm-init
autoscripts/prerm-init-norestart [new file with mode: 0644]
autoscripts/prerm-python [new file with mode: 0644]
autoscripts/prerm-sgmlcatalog [new file with mode: 0644]
autoscripts/prerm-usrlocal [new file with mode: 0644]
autoscripts/prerm-wm [new file with mode: 0644]
autoscripts/prerm-xaw [deleted file]
debhelper.1 [deleted file]
debhelper.pod [new file with mode: 0644]
debian/changelog
debian/compat [new file with mode: 0644]
debian/control
debian/copyright
debian/cron.d [deleted file]
debian/cron.daily [deleted file]
debian/debhelper2.substvars [deleted file]
debian/debhelperfoo.substvars [deleted file]
debian/dhelp [deleted file]
debian/docs [deleted file]
debian/emacsen-install [deleted file]
debian/emacsen-remove [deleted file]
debian/init.d [deleted file]
debian/links [deleted file]
debian/menu [deleted file]
debian/rules
debian/subtsvars [deleted file]
dh_builddeb
dh_builddeb.1 [deleted file]
dh_clean
dh_clean.1 [deleted file]
dh_compress
dh_compress.1 [deleted file]
dh_debstd [deleted file]
dh_debstd.1 [deleted file]
dh_du [deleted file]
dh_du.1 [deleted file]
dh_fixperms
dh_fixperms.1 [deleted file]
dh_gencontrol
dh_gencontrol.1 [deleted file]
dh_getopt.pl [deleted file]
dh_install [new file with mode: 0755]
dh_installcatalogs [new file with mode: 0755]
dh_installchangelogs
dh_installchangelogs.1 [deleted file]
dh_installcron
dh_installcron.1 [deleted file]
dh_installdeb
dh_installdeb.1 [deleted file]
dh_installdebconf [new file with mode: 0755]
dh_installdebfiles [deleted file]
dh_installdebfiles.1 [deleted file]
dh_installdirs
dh_installdirs.1 [deleted file]
dh_installdocs
dh_installdocs.1 [deleted file]
dh_installemacsen
dh_installemacsen.1 [deleted file]
dh_installexamples
dh_installexamples.1 [deleted file]
dh_installinfo
dh_installinfo.1 [deleted file]
dh_installinit
dh_installinit.1 [deleted file]
dh_installlogcheck [new file with mode: 0755]
dh_installlogrotate [new file with mode: 0755]
dh_installman [new file with mode: 0755]
dh_installmanpages
dh_installmanpages.1 [deleted file]
dh_installmenu
dh_installmenu.1 [deleted file]
dh_installmime
dh_installmime.1 [deleted file]
dh_installmodules
dh_installmodules.1 [deleted file]
dh_installpam
dh_installpam.1 [deleted file]
dh_installwm
dh_installwm.1 [deleted file]
dh_installxaw [deleted file]
dh_installxaw.1 [deleted file]
dh_installxfonts [new file with mode: 0755]
dh_lib [deleted file]
dh_link
dh_link.1 [deleted file]
dh_listpackages
dh_listpackages.1 [deleted file]
dh_makeshlibs
dh_makeshlibs.1 [deleted file]
dh_md5sums
dh_md5sums.1 [deleted file]
dh_movefiles
dh_movefiles.1 [deleted file]
dh_perl
dh_perl.1 [deleted file]
dh_python [new file with mode: 0755]
dh_scrollkeeper [new file with mode: 0755]
dh_shlibdeps
dh_shlibdeps.1 [deleted file]
dh_strip
dh_strip.1 [deleted file]
dh_suidregister
dh_suidregister.1 [deleted file]
dh_testdir
dh_testdir.1 [deleted file]
dh_testroot
dh_testroot.1 [deleted file]
dh_testversion
dh_testversion.1 [deleted file]
dh_testversion.in [deleted file]
dh_undocumented
dh_undocumented.1 [deleted file]
dh_usrlocal [new file with mode: 0755]
doc/PROGRAMMING
doc/README
doc/TODO
doc/from-debstd [deleted file]
doc/v2 [deleted file]
examples/rules
examples/rules.indep
examples/rules.multi
examples/rules.multi2 [new file with mode: 0755]
foo [deleted file]
from-debstd [deleted file]
me [deleted file]
me.info [deleted file]
pgptemp.$00 [deleted file]

diff --git a/.foo b/.foo
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/BUGS b/BUGS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
new file mode 100644 (file)
index 0000000..53db13a
--- /dev/null
@@ -0,0 +1,213 @@
+#!/usr/bin/perl -w
+#
+# Debhelper option processing library.
+#
+# Joey Hess GPL copyright 1998-2002
+
+package Debian::Debhelper::Dh_Getopt;
+use strict;
+
+use Debian::Debhelper::Dh_Lib;
+use Getopt::Long;
+use Exporter;
+#use vars qw{@ISA @EXPORT};
+#@ISA=qw(Exporter);
+#@EXPORT=qw(&aparseopts); # FIXME: for some reason, this doesn't work.
+
+my (%options, %exclude_package);
+
+sub showhelp {
+       my $prog=basename($0);
+       print "Usage: $prog [options]\n\n";
+       print "  $prog is a part of debhelper. See debhelper(7)\n";
+       print "  and $prog(1) for complete usage instructions.\n"; 
+       exit(1);
+}
+
+# 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;
+       }
+       elsif ($option eq 's' or $option eq 'same-arch') {
+               push @{$options{DOPACKAGES}}, GetPackages('same');
+               $options{DOSAME}=1;
+       }
+       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;
+}
+
+# This collects non-options values.
+sub NonOption {
+       push @{$options{ARGV}}, @_;
+}
+
+# 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,
+       
+               "s" => \&AddPackage,
+               "same-arch" => \&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},
+               "dirs-only" => \$options{D_FLAG},
+       
+               "r" => \$options{R_FLAG},
+               "no-restart-on-upgrade" => \$options{R_FLAG},
+               "no-start" => \$options{NO_START},
+       
+               "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},
+               "dpkg-gencontrol-params=s", => \$options{U_PARAMS},
+
+               "l=s", => \$options{L_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},
+               
+               "sourcedir=s" => \$options{SOURCEDIR},
+               
+               "destdir=s" => \$options{DESTDIR},
+
+               "filename=s" => \$options{FILENAME},
+               
+               "priority=i" => \$options{PRIORITY},
+               
+               "flavor=s" => \$options{FLAVOR},
+
+               "autodest" => \$options{AUTODEST},
+
+               "h|help" => \&showhelp,
+
+               "mainpackage=s" => \$options{MAINPACKAGE},
+
+               "list-missing" => \$options{LIST_MISSING},
+               
+               "L|libpackage=s" => \$options{LIBPACKAGE},
+               
+               "<>" => \&NonOption,
+       );
+
+       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;
+       }
+       
+       # If we have not been given any packages to act on, assume they
+       # want us to act on them all. Note we have to do this before excluding
+       # packages out, below.
+       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
+               if ($options{DOINDEP} || $options{DOARCH} || $options{DOSAME}) {
+                       # User specified that all arch (in)dep package be
+                       # built, and there are none of that type.
+                       error("I have no package to build");
+               }
+               push @{$options{DOPACKAGES}},GetPackages();
+       }
+       
+       # 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;
+
+       # If there are no packages to act on now, it's an error.
+       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
+               error("I have no package to build");
+       }
+
+       if (defined $options{U_PARAMS}) {
+               # Split the U_PARAMS up into an array.
+               my $u=$options{U_PARAMS};
+               undef $options{U_PARAMS};
+                push @{$options{U_PARAMS}}, split(/\s+/,$u);
+        }
+
+       # Anything left in @ARGV is options that appeared after a --
+       # These options are added to the U_PARAMS array, while the
+       # non-option values we collected replace them in @ARGV;
+       push @{$options{U_PARAMS}}, @ARGV;
+       @ARGV=@{$options{ARGV}} if exists $options{ARGV};
+
+       return %options;
+}
+
+sub import {
+       # Enable bundling of short command line options.
+       Getopt::Long::config("bundling");
+}              
+
+1
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
new file mode 100644 (file)
index 0000000..345630d
--- /dev/null
@@ -0,0 +1,567 @@
+#!/usr/bin/perl -w
+#
+# Library functions for debhelper programs, perl version.
+#
+# Joey Hess, GPL copyright 1997-2000.
+
+package Debian::Debhelper::Dh_Lib;
+use strict;
+
+use Exporter;
+use vars qw(@ISA @EXPORT %dh);
+@ISA=qw(Exporter);
+@EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
+           &pkgfile &pkgext &isnative &autoscript &filearray &filedoublearray
+           &GetPackages &basename &dirname &xargs %dh &compat &addsubstvar
+           &delsubstvar &excludefile);
+
+my $max_compat=4;
+
+sub init {
+       # If DH_OPTIONS is set, prepend it @ARGV.
+       if (defined($ENV{DH_OPTIONS})) {
+               # Ignore leading/trailing whitespace.
+               $ENV{DH_OPTIONS}=~s/^\s+//;
+               $ENV{DH_OPTIONS}=~s/\s+$//;
+               unshift @ARGV,split(/\s+/,$ENV{DH_OPTIONS});
+       }
+
+       # 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;
+       my $arg;
+       foreach $arg (@ARGV) {
+               if ($arg=~m/^-/) {
+                       $parseopt=1;
+                       last;
+               }       
+       }
+       if ($parseopt) {
+               eval "use Debian::Debhelper::Dh_Getopt";
+               error($!) if $@;
+               %dh=Debian::Debhelper::Dh_Getopt::parseopts();
+       }
+
+       # Another way to set excludes.
+       if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
+               push @{$dh{EXCLUDE}}, split(":", $ENV{DH_ALWAYS_EXCLUDE});
+       }
+       
+       # Generate EXCLUDE_FIND.
+       if ($dh{EXCLUDE}) {
+               $dh{EXCLUDE_FIND}='';
+               foreach (@{$dh{EXCLUDE}}) {
+                       my $x=$_;
+                       $x=escape_shell($x);
+                       $x=~s/\./\\./g;
+                       $dh{EXCLUDE_FIND}.="-regex .*$x.* -or ";
+               }
+               $dh{EXCLUDE_FIND}=~s/ -or $//;
+       }
+       
+       # Check to see if DH_VERBOSE environment variable was set, if so,
+       # make sure verbose is on.
+       if (defined $ENV{DH_VERBOSE} && $ENV{DH_VERBOSE} ne "") {
+               $dh{VERBOSE}=1;
+       }
+
+       # Check to see if DH_NO_ACT environment variable was set, if so, 
+       # make sure no act mode is on.
+       if (defined $ENV{DH_NO_ACT} && $ENV{DH_NO_ACT} ne "") {
+               $dh{NO_ACT}=1;
+       }
+
+       my @allpackages=GetPackages();
+       # Get the name of the main binary package (first one listed in
+       # debian/control). Only if the main package was not set on the
+       # command line.
+       if (! exists $dh{MAINPACKAGE} || ! defined $dh{MAINPACKAGE}) {
+               $dh{MAINPACKAGE}=$allpackages[0];
+       }
+
+       # Check if packages to build have been specified, if not, fall back to
+       # the default, doing them all.
+       if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
+               if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) {
+                       error("You asked that all arch in(dep) packages be built, but there are none of that type.");
+               }
+               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 (".join(",",@{$dh{DOPACKAGES}}).").");
+       }
+
+       # 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];
+}
+
+# Pass it an array containing the arguments of a shell command like would
+# be run by exec(). It turns that into a line like you might enter at the
+# shell, escaping metacharacters and quoting arguments that contain spaces.
+sub escape_shell {
+       my @args=@_;
+       my $line="";
+       my @ret;
+       foreach my $word (@args) {
+               if ($word=~/\s/) {
+                       # Escape only a few things since it will be quoted.
+                       # Note we use double quotes because you cannot
+                       # escape ' in single quotes, while " can be escaped
+                       # in double.
+                       # This does make -V"foo bar" turn into "-Vfoo bar",
+                       # but that will be parsed identically by the shell
+                       # anyway..
+                       $word=~s/([\n`\$"\\])/\\$1/g;
+                       push @ret, "\"$word\"";
+               }
+               else {
+                       # This list is from _Unix in a Nutshell_. (except '#')
+                       $word=~s/([\s!"\$()*+#;<>?@\[\]\\`|~])/\\$1/g;
+                       push @ret,$word;
+               }
+       }
+       return join(' ', @ret);
+}
+
+# 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(escape_shell(@_));
+
+       if (! $dh{NO_ACT}) {
+               my $ret=system(@_);
+               $ret == 0 || error("command returned error code $ret");
+       }
+}
+
+# Run a command and display the command to stdout if verbose mode is on.
+# Use doit() if you can, instead of this function, because this function
+# forks a shell. However, this function can handle more complicated stuff
+# like redirection.
+sub complex_doit {
+       verbose_print(join(" ",@_));
+       
+       if (! $dh{NO_ACT}) {
+               # The join makes system get a scalar so it forks off a shell.
+               system(join(" ",@_)) == 0
+                       || error("command returned error code");
+       }                       
+}
+
+# Run a command that may have a huge number of arguments, like xargs does.
+# Pass in a reference to an array containing the arguments, and then other
+# parameters that are the command and any parameters that should be passed to
+# it each time.
+sub xargs {
+       my $args=shift;
+
+        # The kernel can accept command lines up to 20k worth of characters.
+       my $command_max=20000; # LINUX SPECIFIC!!
+                       # I could use POSIX::ARG_MAX, but that would be slow.
+
+       # Figure out length of static portion of command.
+       my $static_length=0;
+       foreach (@_) {
+               $static_length+=length($_)+1;
+       }
+       
+       my @collect=();
+       my $length=$static_length;
+       foreach (@$args) {
+               if (length($_) + 1 + $static_length > $command_max) {
+                       error("This command is greater than the maximum command size allowed by the kernel, and cannot be split up further. What on earth are you doing? \"@_ $_\"");
+               }
+               $length+=length($_) + 1;
+               if ($length < $command_max) {
+                       push @collect, $_;
+               }
+               else {
+                       doit(@_,@collect) if $#collect > -1;
+                       @collect=($_);
+                       $length=$static_length + length($_) + 1;
+               }
+       }
+       doit(@_,@collect) if $#collect > -1;
+}
+
+# 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;
+       
+       print STDERR basename($0).": $message\n";
+}
+
+# Returns the basename of the argument passed to it.
+sub basename {
+       my $fn=shift;
+
+       $fn=~s/\/$//g; # ignore trailing slashes
+       $fn=~s:^.*/(.*?)$:$1:;
+       return $fn;
+}
+
+# Returns the directory name of the argument passed to it.
+sub dirname {
+       my $fn=shift;
+       
+       $fn=~s/\/$//g; # ignore trailing slashes
+       $fn=~s:^(.*)/.*?$:$1:;
+       return $fn;
+}
+
+# Pass in a number, will return true iff the current compatibility level
+# is less than or equal to that number.
+sub compat {
+       my $num=shift;
+       
+       my $c=1;
+       if (defined $ENV{DH_COMPAT}) {
+               $c=$ENV{DH_COMPAT};
+       }
+       elsif (-e 'debian/compat') {
+               # Try the file..
+               open (COMPAT_IN, "debian/compat") || error "debian/compat: $!";
+               $c=<COMPAT_IN>;
+               chomp $c;
+       }
+
+       if ($c > $max_compat) {
+               error("Sorry, but $max_compat is the highest compatibility level of debhelper currently supported.");
+       }
+
+       return ($c <= $num);
+}
+
+# Pass it a name of a binary package, it returns the name of the tmp dir to
+# use, for that package.
+sub tmpdir {
+       my $package=shift;
+
+       if ($dh{TMPDIR}) {
+               return $dh{TMPDIR};
+       }
+       elsif (compat(1) && $package eq $dh{MAINPACKAGE}) {
+               # This is for back-compatibility with the debian/tmp tradition.
+               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 existing filename to use.
+#
+# It tries several filenames:
+#   * debian/package.filename.buildarch
+#   * debian/package.filename
+#   * debian/file (if the package is the main package)
+sub pkgfile {
+       my $package=shift;
+       my $filename=shift;
+
+       if (-f "debian/$package.$filename.".buildarch()) {
+               return "debian/$package.$filename.".buildarch();
+       }
+       elsif (-f "debian/$package.$filename") {
+               return "debian/$package.$filename";
+       }
+       elsif ($package eq $dh{MAINPACKAGE} && -f "debian/$filename") {
+               return "debian/$filename";
+       }
+       else {
+               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 (compat(1) and $package eq $dh{MAINPACKAGE}) {
+               return "";
+       }
+       return "$package.";
+}
+
+# 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;
+
+               return $isnative_cache{$package} if defined $isnative_cache{$package};
+               
+               # 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=~m/Version:\s*(.*)/m;
+               # Did the changelog parse fail?
+               if (! defined $dh{VERSION}) {
+                       error("changelog parse failure");
+               }
+
+               # Is this a native Debian package?
+               if ($dh{VERSION}=~m/.*-/) {
+                       return $isnative_cache{$package}=0;
+               }
+               else {
+                       return $isnative_cache{$package}=1;
+               }
+       }
+}
+
+# Automatically add a shell script snippet to a debian script.
+# Only works if the script has #DEBHELPER# in it.
+#
+# Parameters:
+# 1: package
+# 2: script to add to
+# 3: filename of snippet
+# 4: sed to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
+sub autoscript {
+       my $package=shift;
+       my $script=shift;
+       my $filename=shift;
+       my $sed=shift || "";
+
+       # This is the file we will append to.
+       my $outfile="debian/".pkgext($package)."$script.debhelper";
+
+       # Figure out what shell script snippet to use.
+       my $infile;
+       if (defined($ENV{DH_AUTOSCRIPTDIR}) && 
+           -e "$ENV{DH_AUTOSCRIPTDIR}/$filename") {
+               $infile="$ENV{DH_AUTOSCRIPTDIR}/$filename";
+       }
+       else {
+               if (-e "/usr/share/debhelper/autoscripts/$filename") {
+                       $infile="/usr/share/debhelper/autoscripts/$filename";
+               }
+               else {
+                       error("/usr/share/debhelper/autoscripts/$filename does not exist");
+               }
+       }
+
+       complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
+       complex_doit("sed \"$sed\" $infile >> $outfile");
+       complex_doit("echo '# End automatically added section' >> $outfile");
+}
+
+# Removes a whole substvar line.
+sub delsubstvar {
+       my $package=shift;
+       my $substvar=shift;
+
+       my $ext=pkgext($package);
+       my $substvarfile="debian/${ext}substvars";
+
+       if (-e $substvarfile) {
+               complex_doit("grep -s -v '^${substvar}=' $substvarfile > $substvarfile.new || true");
+               doit("mv", "$substvarfile.new","$substvarfile");
+       }
+}
+                               
+# Adds a dependency on some package to the specified
+# substvar in a package's substvar's file.
+sub addsubstvar {
+       my $package=shift;
+       my $substvar=shift;
+       my $deppackage=shift;
+       my $verinfo=shift;
+       my $remove=shift;
+
+       my $ext=pkgext($package);
+       my $substvarfile="debian/${ext}substvars";
+       my $str=$deppackage;
+       $str.=" ($verinfo)" if defined $verinfo && length $verinfo;
+
+       # Figure out what the line will look like, based on what's there
+       # now, and what we're to add or remove.
+       my $line="";
+       if (-e $substvarfile) {
+               my %items;
+               open(SUBSTVARS_IN, "$substvarfile") || error "read $substvarfile: $!";
+               while (<SUBSTVARS_IN>) {
+                       chomp;
+                       if (/^\Q$substvar\E=(.*)/) {
+                               %items = map { $_ => 1} split(", ", $1);
+                               
+                               last;
+                       }
+               }
+               close SUBSTVARS_IN;
+               if (! $remove) {
+                       $items{$str}=1;
+               }
+               else {
+                       delete $items{$str};
+               }
+               $line=join(", ", keys %items);
+       }
+       elsif (! $remove) {
+               $line=$str;
+       }
+
+       if (length $line) {
+                complex_doit("(grep -s -v ${substvar} $substvarfile; echo ".escape_shell("${substvar}=$line").") > $substvarfile.new");
+                doit("mv", "$substvarfile.new", $substvarfile);
+       }
+       else {
+               delsubstvar($package,$substvar);
+       }
+}
+
+# Reads in the specified file, one line at a time. splits on words, 
+# and returns an array of arrays of the contents.
+# If a value is passed in as the second parameter, then glob
+# expansion is done in the directory specified by the parameter ("." is
+# frequently a good choice).
+sub filedoublearray {
+       my $file=shift;
+       my $globdir=shift;
+
+       my @ret;
+       open (DH_FARRAY_IN, $file) || error("cannot read $file: $1");
+       while (<DH_FARRAY_IN>) {
+               my @line;
+               # Only do glob expansion in v3 mode.
+               #
+               # The tricky bit is that the glob expansion is done
+               # as if we were in the specified directory, so the
+               # filenames that come out are relative to it.
+               if (defined $globdir && ! compat(2)) {
+                       for (map { glob "$globdir/$_" } split) {
+                               s#^$globdir/##;
+                               push @line, $_;
+                       }
+               }
+               else {
+                       @line = split;
+               }
+               push @ret, [@line];
+       }
+       close DH_FARRAY_IN;
+       
+       return @ret;
+}
+
+# Reads in the specified file, one word at a time, and returns an array of
+# the result. Can do globbing as does filedoublearray.
+sub filearray {
+       return map { @$_ } filedoublearray(@_);
+}
+
+# Passed a filename, returns true if -X says that file should be excluded.
+sub excludefile {
+        my $filename = shift;
+        foreach my $f (@{$dh{EXCLUDE}}) {
+                return 1 if $filename =~ /\Q$f\E/;
+        }
+        return 0;
+}
+
+# Returns the build architecture. (Memoized)
+{
+       my $arch;
+       
+       sub buildarch {
+               return $arch if defined $arch;
+
+               $arch=`dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null` || error($!);
+               chomp $arch;
+               return $arch;
+       }
+}
+
+# Returns a list of packages in the control file.
+# Must pass "arch" or "indep" or "same" to specify arch-dependant or
+# -independant or same arch packages. If nothing is specified, returns all
+# packages.
+sub GetPackages {
+       my $type=shift;
+       
+       $type="" if ! defined $type;
+       
+       # Look up the build arch if we need to.
+       my $buildarch='';
+       if ($type eq 'same') {
+               $buildarch=buildarch();
+       }
+
+       my $package="";
+       my $arch="";
+       my @list=();
+       my %seen;
+       open (CONTROL, 'debian/control') ||
+               error("cannot read debian/control: $!\n");
+       while (<CONTROL>) {
+               chomp;
+               s/\s+$//;
+               if (/^Package:\s*(.*)/) {
+                       $package=$1;
+                       # Detect duplicate package names in the same control file.
+                       if (! $seen{$package}) {
+                               $seen{$package}=1;
+                       }
+                       else {
+                               error("debian/control has a duplicate entry for $package");
+                       }
+               }
+               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 eq 'same' && ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
+                            ! $type)) {
+                               push @list, $package;
+                               $package="";
+                               $arch="";
+                       }
+               }
+       }
+       close CONTROL;
+
+       return @list;
+}
+
+1
diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm
deleted file mode 100644 (file)
index 0c28500..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debhelper option processing library.
-#
-# Joey Hess GPL copyright 1998.
-
-package Dh_Getopt;
-use strict;
-
-use Dh_Lib;
-use Getopt::Long;
-use Exporter;
-#use vars qw{@ISA @EXPORT};
-#@ISA=qw(Exporter);
-#@EXPORT=qw(&aparseopts); # FIXME: for some reason, this doesn't work.
-
-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;
-       }
-       elsif ($option eq 's' or $option eq 'same-arch') {
-               push @{$options{DOPACKAGES}}, GetPackages('same');
-               $options{DOSAME}=1;
-       }
-       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;
-}
-
-# 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,
-       
-               "s" => \&AddPackage,
-               "same-arch" => \&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},
-               "dirs-only" => \$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},
-               "dpkg-gencontrol-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},
-               
-               "sourcedir=s" => \$options{SOURCEDIR},
-               
-               "destdir=s" => \$options{DESTDIR},
-       );
-
-       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;
-       }
-       
-       # If we have not been given any packages to act on, assume they
-       # want us to act on them all. Note we have to do this before excluding
-       # packages out, below.
-       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
-               if ($options{DOINDEP} || $options{DOARCH} || $options{DOSAME}) {
-                               # User specified that all arch (in)dep package be
-                               # built, and there are none of that type.
-                               error("I have no package to build");
-               }
-               push @{$options{DOPACKAGES}},GetPackages();
-       }
-       
-       # 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;
-
-       # Generate EXCLUDE_FIND.
-       $options{EXCLUDE_FIND}='';
-       foreach (@{$options{EXCLUDE}}) {
-               $options{EXCLUDE_FIND}.="-regex .*".quotemeta($_).".* -or ";
-       }
-       $options{EXCLUDE_FIND}=~s/ -or $//;
-
-       # If there are no packages to act on now, it's an error.
-       if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) {
-               error("I have no package to build");
-       }
-
-       return %options;
-}      
-
-sub import {
-       # Enable bundling of short command line options.
-       Getopt::Long::config("bundling");
-}              
-
-1
diff --git a/Dh_Lib.pm b/Dh_Lib.pm
deleted file mode 100644 (file)
index e74e8cc..0000000
--- a/Dh_Lib.pm
+++ /dev/null
@@ -1,371 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Library functions for debhelper programs, perl version.
-#
-# Joey Hess, GPL copyright 1997, 1998.
-
-package Dh_Lib;
-use strict;
-
-use Exporter;
-use vars qw(@ISA @EXPORT %dh);
-@ISA=qw(Exporter);
-@EXPORT=qw(&init &doit &complex_doit &verbose_print &error &warning &tmpdir
-           &pkgfile &pkgext &isnative &autoscript &filearray &GetPackages
-           &xargs
-           %dh);
-
-my $max_compat=2;
-
-sub init {
-       # If DH_OPTIONS is set, prepend it @ARGV.
-       if (defined($ENV{DH_OPTIONS})) {
-               unshift @ARGV,split(/\s+/,$ENV{DH_OPTIONS});
-       }
-
-       # 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;
-       my $arg;
-       foreach $arg (@ARGV) {
-               if ($arg=~m/^-/) {
-                       $parseopt=1;
-                       last;
-               }       
-       }
-       if ($parseopt) {
-               eval "use Dh_Getopt";
-               error($!) if $@;
-               %dh=Dh_Getopt::parseopts();
-       }
-
-       # Check to see if DH_VERBOSE environment variable was set, if so,
-       # make sure verbose is on.
-       if (defined $ENV{DH_VERBOSE} && $ENV{DH_VERBOSE} ne "") {
-               $dh{VERBOSE}=1;
-       }
-
-       # Check to see if DH_NO_ACT environment variable was set, if so, 
-       # make sure no act mode is on.
-       if (defined $ENV{DH_NO_ACT} && $ENV{DH_NO_ACT} ne "") {
-               $dh{NO_ACT}=1;
-       }
-
-       # 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 (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) {
-               if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) {
-                       # User specified that all arch (in)dep package be 
-                       # built, and there are none of that type.
-                       error("I have no package to act on");
-               }
-               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 (".join(",",@{$dh{DOPACKAGES}}).").");
-       }
-
-       # 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];
-
-       # Split the U_PARAMS up into an array.
-       my $u=$dh{U_PARAMS};
-       undef $dh{U_PARAMS};
-       if (defined $u) {
-               push @{$dh{U_PARAMS}}, split(/\s+/,$u);
-       }
-}
-
-# Escapes out shell metacharacters in a word of shell script.
-sub escape_shell { my $word=shift;
-       # This list is from _Unix in a Nutshell_. (except '#')
-       $word=~s/([\s!"\$()*+#;<>?@\[\]\\`|~])/\\$1/g;
-       return $word;
-}
-
-# 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(" ",map { escape_shell($_) } @_));
-       
-       if (! $dh{NO_ACT}) {
-               system(@_) == 0
-                       || error("command returned error code");
-               
-       }
-}
-
-# Run a command and display the command to stdout if verbose mode is on.
-# Use doit() if you can, instead of this function, because this function
-# forks a shell. However, this function can handle more complicated stuff
-# like redirection.
-sub complex_doit {
-       verbose_print(join(" ",@_));
-       
-       if (! $dh{NO_ACT}) {
-               # The join makes system get a scalar so it forks off a shell.
-               system(join(" ",@_)) == 0
-                       || error("command returned error code");
-       }                       
-}
-
-# Run a command that may have a huge number of arguments, like xargs does.
-# Pass in a reference to an array containing the arguments, and then other
-# parameters that are the command and any parameters that should be passed to
-# it each time.
-sub xargs {
-       my $args=shift;
-
-        # The kernel can accept command lines up to 20k worth of characters.
-       my $command_max=20000;
-
-       # Figure out length of static portion of command.
-       my $static_length=0;
-       foreach (@_) {
-               $static_length+=length($_)+1;
-       }
-       
-       my @collect=();
-       my $length=$static_length;
-       foreach (@$args) {
-               if (length($_) + 1 + $static_length > $command_max) {
-                       error("This command is greater than the maximum command size allowed by the kernel, and cannot be split up further. What on earth are you doing? \"@_ $_\"");
-               }
-               $length+=length($_) + 1;
-               if ($length < $command_max) {
-                       push @collect, $_;
-               }
-               else {
-                       doit(@_,@collect) if $#collect > -1;
-                       @collect=();
-                       $length=$static_length;
-               }
-       }
-       doit(@_,@collect) if $#collect > -1;
-}
-
-# 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;
-       print STDERR basename($0).": $message\n";
-}
-
-# Returns the basename of the argument passed to it.
-sub basename { my $fn=shift;
-       $fn=~s:^.*/(.*?)$:$1:;
-       return $fn;
-}
-
-# Returns the directory name of the argument passed to it.
-sub dirname { my $fn=shift;
-       $fn=~s:^(.*)/.*?$:$1:;
-       return $fn;
-}
-
-# Pass in a number, will return true iff the current compatability level
-# is equal to that number.
-sub compat {
-       my $num=shift;
-       
-       my $c=1;
-       if (defined $ENV{DH_COMPAT}) {
-               $c=$ENV{DH_COMPAT};
-       }
-
-       if ($c > $max_compat) {
-               error("Sorry, but $max_compat is the highest compatability level of debhelper currently supported.");
-       }
-
-       return ($c == $num);
-}
-
-# Pass it a name of a binary package, it returns the name of the tmp dir to
-# use, for that package.
-sub tmpdir { my $package=shift;
-       if ($dh{TMPDIR}) {
-               return $dh{TMPDIR};
-       }
-       elsif (compat(1) && $package eq $dh{MAINPACKAGE}) {
-               # This is for back-compatability with the debian/tmp tradition.
-               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 (-f "debian/$package.$filename") {
-               return "debian/$package.$filename";
-       }
-       elsif ($package eq $dh{MAINPACKAGE} && -f "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 $dh{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 (! defined $isnative_cache{$package}) {
-                       # 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=~m/Version: (.*)/m;
-
-                       # Is this a native Debian package?
-                       if ($dh{VERSION}=~m/.*-/) {
-                               $isnative_cache{$package}=0;
-                       }
-                       else {
-                               $isnative_cache{$package}=1;
-                       }
-               }
-       
-               return $isnative_cache{$package};
-       }
-}
-
-# Automatically add a shell script snippet to a debian script.
-# Only works if the script has #DEBHELPER# in it.
-#
-# Parameters:
-# 1: package
-# 2: script to add to
-# 3: filename of snippet
-# 4: sed to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
-sub autoscript { my $package=shift; my $script=shift; my $filename=shift; my $sed=shift || "";
-       # This is the file we will append to.
-       my $outfile="debian/".pkgext($package)."$script.debhelper";
-
-       # Figure out what shell script snippet to use.
-       my $infile;
-       if (defined($ENV{DH_AUTOSCRIPTDIR}) && 
-           -e "$ENV{DH_AUTOSCRIPTDIR}/$filename") {
-               $infile="$ENV{DH_AUTOSCRIPTDIR}/$filename";
-       }
-       else {
-               if (-e "/usr/share/debhelper/autoscripts/$filename") {
-                       $infile="/usr/share/debhelper/autoscripts/$filename";
-               }
-               else {
-                       error("/usr/share/debhelper/autoscripts/$filename does not exist");
-               }
-       }
-
-       # TODO: do this in perl, perhaps?
-       complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
-       complex_doit("sed \"$sed\" $infile >> $outfile");
-       complex_doit("echo '# End automatically added section' >> $outfile");
-}
-
-# Reads in the specified file, one word at a time, and returns an array of
-# the result.
-sub filearray { my $file=shift;
-       my @ret;
-       open (DH_FARRAY_IN,"<$file") || error("cannot read $file: $1");
-       while (<DH_FARRAY_IN>) {
-               push @ret,split(' ',$_);
-       }
-       close DH_FARRAY_IN;
-       
-       return @ret;
-}
-
-# Returns a list of packages in the control file.
-# Must pass "arch" or "indep" or "same" to specify arch-dependant or
-# -independant or same arch packages. If nothing is specified, returns all
-# packages.
-sub GetPackages { my $type=shift;
-       $type="" if ! defined $type;
-       
-       # Look up the build arch if we need to.
-       my$buildarch='';
-       if ($type eq 'same') {
-               $buildarch=`dpkg --print-architecture` || error($!);
-               chomp $buildarch;
-       }
-
-       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 eq 'same' && ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) ||
-                            ! $type)) {
-                               push @list, $package;
-                               $package="";
-                               $arch="";
-                       }
-               }
-       }
-       close CONTROL;
-
-       return @list;
-}
-
-1
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/PROGRAMMING b/PROGRAMMING
deleted file mode 100644 (file)
index 7dc0c63..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-This file documents things you should know to write a new debhelper program.
-
-Standardization:
----------------
-
-There are lots of debhelper commands. To make the learning curve shallower,
-I want them all to behave in a standard manner:
-
-All debhelper programs have names beginning with "dh_". This is so we don't
-pollute the name space too much.
-
-Debhelper programs should never output anything to standard output except
-error messages, important warnings, and the actual commands they run that
-modify files under debian/ and debian/tmp, etc (this last only if they are
-passed -v, and if you output the commands, you should indent them with 1 tab). 
-This is so we don't have a lot of noise output when all the debhelper commands
-in a debian/rules are run, so the important stuff is clearly visible.
-
-Debhelper programs should accept the options, -v, -i, -a, -p, --no-act, and
--P, and any long forms of these options, like --verbose . If necessary, the
-options may be ignored.
-
-If debhelper commands need config files, they should use
-debian/package.filename as the name of the config file (replace filename
-with whatever your command wants), and debian/filename should also be
-checked for config information for the first binary package in
-debian/control. Also, debhelper commands should accept the same sort of
-information that appears in the config files, on their command lines, if
-possible, and apply that information to the first package they act on.
-
-Debhelper programs should never modify the debian/postinst, debian/prerm,
-etc scripts, instead, they can add lines to debian/postinst.debhelper, etc. 
-The autoscript() function (see below) is one easy way to do this.
-dh_installdeb is an exception, it will run after the other commands and
-merge these modifications into the actual postinst scripts.
-
-There are always exceptions. Just ask me.
-
-Introducing dh_lib:
-------------------
-
-All debhelper programs use the dh_lib library (actually it's a shell script)
-to parse their arguments and set some useful variables. It's not mandatory
-that your program use dh_lib, but it will make it a lot easier to keep it in
-sync with the rest of debhelper if it does, so this is highly encouraged.
-
-Typically, you invoke dh_lib like this:
-
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
-
-The path statement is there to make your program look first in debian/ for
-dh_lib (so users can install a modified version there if necessary), then the
-rest of the path, then the canonical location of dh_lib, /usr/lib/debhelper.
-
-Argument processing:
--------------------
-
-All debhelper programs should respond to certain arguments, such as -v, -i,
--a, and -p. To help you make this work right, dh_lib handles argument
-processing.
-
-As soon as dh_lib loads, it processes any arguments that have been passed to
-your program. The following variables may be set during this stage; your
-program can use them later:
-
-switch         variable        description
--v             DH_VERBOSE      should the program verbosely output what it is
-                               doing?
---no-act       DH_NO_ACT       should the program not actually do anything?
--i,-a,-p       DH_DOPACKAGES   a space delimited list of the binary packages
-                               to act on
--i,-p          DH_DOINDEP      a space delimited list of the binary independent
-                               packages to act on
--a,-p          DH_DOARCH       a space delimited list of the binary dependent
-                               packages to act on
--n             DH_NOSCRIPTS    if set, do not make any modifications to the 
-                               package's postinst, postrm, etc scripts.
--X             DH_EXCLUDE      exclude a something from processing (you
-                               decide what this means for your program)
-               DH_EXCLUDE_GREP same as DH_EXCLUDE, except all items are
-                               separated by '|' characters, instead of spaces,
-                               handy for egrep -v
--x             DH_INCLUDE_CONFFILES
-                               include conffiles. It's -x for obscure
-                               historical reasons.
--d             DH_D_FLAG       you decide what this means to your program
--r             DH_R_FLAG       you decide what this means to your program
--k             DH_K_FLAG       you decide what this means to your program
--P             DH_TMPDIR       package build directory (implies only one
-                               package is being acted on)
--u             DH_U_PARAMS     will be set to a string, that is typically
-                               parameters your program passes on to some
-                               other program.
--m             DH_M_PARAMS     will be set to a string, you decide what it
-                               means to your program
--V             DH_V_FLAG       will be set to a string, you decide what it
-                               means to your program
--V             DH_V_FLAG_SET   will be 1 if -V was specified, even if no
-                               parameters were passed along with the -V
--A             DH_PARAMS_ALL   generally means that additional command line
-                               parameters passed to the program (other than
-                               those processed here), will apply to all 
-                               binary packages the program acts on, not just
-                               the first
---init-script  DH_INIT_SCRIPT  will be set to a string, which specifies an
-                               init script name (probably only
-                               dh_installinit will ever use this)
-
-Any additional command line parameters that do not start with "-" will be 
-ignored, and you can access them later just as you normally would ($1, $2,
-etc).
-
-If you need a new command line option, just ask me, and I will add it.
-
-Global variables:
-----------------
-
-The following variables are also set, you can use any of them:
-
-MAINPACKAGE    the name of the first binary package listed in
-               debian/control
-DH_FIRSTPACKAGE        the first package we were instructed to act on. This package
-               typically gets special treatment, additional arguments
-               specified on the command line may effect it.
-
-Functions:
----------
-
-Dh_lib also contains a number of functions you may find useful.
-
-doit()
-       Pass this function a string that is a shell command. It will run the
-       command (unless DH_NO_ACT is set), and if DH_VERBOSE is set, it will
-       also output the command to stdout. You should use this function for
-       almost all commands your program performs that manipulate files in
-       the package build directories.
-complex_doit()
-       This is the same as doit(), except you can pass more complicated
-       commands to it (ie, commands involving piping redirection)
-verbose_echo()
-       Pass this command a string, and it will echo it if DH_VERBOSE is set.
-error()
-       Pass this command a string, it will output it to standard error and
-       exit.
-warning()
-       Pass this command a string, and it will output it to standard error
-       as a warning message.
-tmpdir()
-       Pass this command the name of a binary package, it will return the
-       name of the tmp directory that will be used as this package's
-       package build directory. Typically, this will be "debian/tmp" or
-       "debian/package".
-pkgfile()
-       Pass this command the name of a binary package, and the base name of a
-       file, and it will return the actual filename to use. This is used
-       for allowing debhelper programs to have configuration files in the
-       debian/ directory, so there can be one config file per binary
-       package. The convention is that the files are named
-       debian/package.filename, and debian/filename is also allowable for
-       the MAINPACKAGE. If the file does not exist, nothing is returned.
-pkgext()
-       Pass this command the name of a binary package, and it will return
-       the name to prefix to files in debian/ for this package. For the
-       MAINPACKAGE, it returns nothing (there is no prefix), for the other
-       packages, it returns "package.".
-isnative()
-       Pass this command the name of a package, it returns 1 if the package
-       is a native debian package.
-       As a side effect, VERSION is set to the version number of the
-       package.
-autoscript()
-       Pass 3 parameters:
-        1: script to add to
-        2: filename of snippet
-        3: sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
-           (optional)
-       This command automatically adds shell script snippets to a debian
-       maintainer script (like the postinst or prerm).
-
-Notes:
------
-
-Dh_lib is still evolving.
-There will probably be a perl version too, in the future.
-
--- Joey Hess <joeyh@master.debian.org>
diff --git a/README b/README
deleted file mode 100644 (file)
index 986eb02..0000000
--- a/README
+++ /dev/null
@@ -1,100 +0,0 @@
-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 help you get started, I've included examples of debian/rules files
-that use debhelper commands extensively. See /usr/doc/debhelper/examples/ . 
-These files are also useful as they give one good order you can run the 
-various debhelper scripts in (though other variations are possible).
-
-Starting a new package:
-----------------------
-
-You can just use the example rules files and do the rest of the new package
-set up by hand, or you could try the new dh-make package, which contains a
-"dh_make" command that is similar to debmake, and tries to automate the
-process.
-
-Converting from debstd to debhelper:
------------------------------------
-
-See the file "from-debstd" for documentation on how to do this.
-
-Automatic generation of debian install scripts:
-----------------------------------------------
-
-Some debhelper commands will automatically generate parts of debian install
-scripts. If you want these automatically generated things included in your
-debian install scripts, then you need to add "#DEBHELPER#" to your scripts,
-in the place the code should be added. "#DEBHELPER#" will be replaced by any 
-auto-generated code when you run dh_installdeb.
-
-All scripts that automatically generate code in this way let it be disabled
-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:
-
-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>
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index 188e3c6..0000000
--- a/TODO
+++ /dev/null
@@ -1,26 +0,0 @@
-* 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.
-* info support for debhelper (currently implemented, but I hate how I did it,
-  so it's not in the package.) (wishlist bug #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.
-* 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.
-* All debhelper programs should be checked that they output files with the
-  correct permissions no matter what the umask is set to. Currently, only
-  those programs that run after dh_fixperms have been so checked. (Checking
-  the rest is low priority, since dh_fixperms fixes any incorrect permissions
-  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.
diff --git a/Test.pm b/Test.pm
deleted file mode 100644 (file)
index 55f80ac..0000000
--- a/Test.pm
+++ /dev/null
@@ -1,254 +0,0 @@
-use strict;
-package Test;
-use Test::Harness 1.1501 ();
-use Carp;
-use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish
-         qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)); #private-ish
-$VERSION = '1.13';
-require Exporter;
-@ISA=('Exporter');
-@EXPORT=qw(&plan &ok &skip);
-@EXPORT_OK=qw($ntest $TESTOUT);
-
-$TestLevel = 0;                # how many extra stack frames to skip
-$|=1;
-#$^W=1;  ?
-$ntest=1;
-$TESTOUT = *STDOUT{IO};
-
-# Use of this variable is strongly discouraged.  It is set mainly to
-# help test coverage analyzers know which test is running.
-$ENV{REGRESSION_TEST} = $0;
-
-sub plan {
-    croak "Test::plan(%args): odd number of arguments" if @_ & 1;
-    croak "Test::plan(): should not be called more than once" if $planned;
-    my $max=0;
-    for (my $x=0; $x < @_; $x+=2) {
-       my ($k,$v) = @_[$x,$x+1];
-       if ($k =~ /^test(s)?$/) { $max = $v; }
-       elsif ($k eq 'todo' or 
-              $k eq 'failok') { for (@$v) { $todo{$_}=1; }; }
-       elsif ($k eq 'onfail') { 
-           ref $v eq 'CODE' or croak "Test::plan(onfail => $v): must be CODE";
-           $ONFAIL = $v; 
-       }
-       else { carp "Test::plan(): skipping unrecognized directive '$k'" }
-    }
-    my @todo = sort { $a <=> $b } keys %todo;
-    if (@todo) {
-       print $TESTOUT "1..$max todo ".join(' ', @todo).";\n";
-    } else {
-       print $TESTOUT "1..$max\n";
-    }
-    ++$planned;
-}
-
-sub to_value {
-    my ($v) = @_;
-    (ref $v or '') eq 'CODE' ? $v->() : $v;
-}
-
-sub ok ($;$$) {
-    croak "ok: plan before you test!" if !$planned;
-    my ($pkg,$file,$line) = caller($TestLevel);
-    my $repetition = ++$history{"$file:$line"};
-    my $context = ("$file at line $line".
-                  ($repetition > 1 ? " fail \#$repetition" : ''));
-    my $ok=0;
-    my $result = to_value(shift);
-    my ($expected,$diag);
-    if (@_ == 0) {
-       $ok = $result;
-    } else {
-       $expected = to_value(shift);
-       my ($regex,$ignore);
-       if (!defined $expected) {
-           $ok = !defined $result;
-       } elsif (!defined $result) {
-           $ok = 0;
-       } elsif ((ref($expected)||'') eq 'Regexp') {
-           $ok = $result =~ /$expected/;
-       } elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or
-           ($ignore, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) {
-           $ok = $result =~ /$regex/;
-       } else {
-           $ok = $result eq $expected;
-       }
-    }
-    my $todo = $todo{$ntest};
-    if ($todo and $ok) {
-       $context .= ' TODO?!' if $todo;
-       print $TESTOUT "ok $ntest # ($context)\n";
-    } else {
-       print $TESTOUT "not " if !$ok;
-       print $TESTOUT "ok $ntest\n";
-       
-       if (!$ok) {
-           my $detail = { 'repetition' => $repetition, 'package' => $pkg,
-                          'result' => $result, 'todo' => $todo };
-           $$detail{expected} = $expected if defined $expected;
-           $diag = $$detail{diagnostic} = to_value(shift) if @_;
-           $context .= ' *TODO*' if $todo;
-           if (!defined $expected) {
-               if (!$diag) {
-                   print $TESTOUT "# Failed test $ntest in $context\n";
-               } else {
-                   print $TESTOUT "# Failed test $ntest in $context: $diag\n";
-               }
-           } else {
-               my $prefix = "Test $ntest";
-               print $TESTOUT "# $prefix got: ".
-                   (defined $result? "'$result'":'<UNDEF>')." ($context)\n";
-               $prefix = ' ' x (length($prefix) - 5);
-               if ((ref($expected)||'') eq 'Regexp') {
-                   $expected = 'qr/'.$expected.'/'
-               } else {
-                   $expected = "'$expected'";
-               }
-               if (!$diag) {
-                   print $TESTOUT "# $prefix Expected: $expected\n";
-               } else {
-                   print $TESTOUT "# $prefix Expected: $expected ($diag)\n";
-               }
-           }
-           push @FAILDETAIL, $detail;
-       }
-    }
-    ++ $ntest;
-    $ok;
-}
-
-sub skip ($$;$$) {
-    my $whyskip = to_value(shift);
-    if ($whyskip) {
-       $whyskip = 'skip' if $whyskip =~ m/^\d+$/;
-       print $TESTOUT "ok $ntest # $whyskip\n";
-       ++ $ntest;
-       1;
-    } else {
-       local($TestLevel) = $TestLevel+1;  #ignore this stack frame
-       &ok;
-    }
-}
-
-END {
-    $ONFAIL->(\@FAILDETAIL) if @FAILDETAIL && $ONFAIL;
-}
-
-1;
-__END__
-
-=head1 NAME
-
-  Test - provides a simple framework for writing test scripts
-
-=head1 SYNOPSIS
-
-  use strict;
-  use Test;
-
-  # use a BEGIN block so we print our plan before MyModule is loaded
-  BEGIN { plan tests => 14, todo => [3,4] }
-
-  # load your module...
-  use MyModule;
-
-  ok(0); # failure
-  ok(1); # success
-
-  ok(0); # ok, expected failure (see todo list, above)
-  ok(1); # surprise success!
-
-  ok(0,1);             # failure: '0' ne '1'
-  ok('broke','fixed'); # failure: 'broke' ne 'fixed'
-  ok('fixed','fixed'); # success: 'fixed' eq 'fixed'
-  ok('fixed',qr/x/);   # success: 'fixed' =~ qr/x/
-
-  ok(sub { 1+1 }, 2);  # success: '2' eq '2'
-  ok(sub { 1+1 }, 3);  # failure: '2' ne '3'
-  ok(0, int(rand(2));  # (just kidding :-)
-
-  my @list = (0,0);
-  ok @list, 3, "\@list=".join(',',@list);      #extra diagnostics
-  ok 'segmentation fault', '/(?i)success/';    #regex match
-
-  skip($feature_is_missing, ...);    #do platform specific test
-
-=head1 DESCRIPTION
-
-L<Test::Harness> expects to see particular output when it executes
-tests.  This module aims to make writing proper test scripts just a
-little bit easier (and less error prone :-).
-
-=head1 TEST TYPES
-
-=over 4
-
-=item * NORMAL TESTS
-
-These tests are expected to succeed.  If they don't something's
-screwed up!
-
-=item * SKIPPED TESTS
-
-Skip is for tests that might or might not be possible to run depending
-on the availability of platform specific features.  The first argument
-should evaluate to true (think "yes, please skip") if the required
-feature is not available.  After the first argument, skip works
-exactly the same way as do normal tests.
-
-=item * TODO TESTS
-
-TODO tests are designed for maintaining an B<executable TODO list>.
-These tests are expected NOT to succeed.  If a TODO test does succeed,
-the feature in question should not be on the TODO list, now should it?
-
-Packages should NOT be released with succeeding TODO tests.  As soon
-as a TODO test starts working, it should be promoted to a normal test
-and the newly working feature should be documented in the release
-notes or change log.
-
-=back
-
-=head1 RETURN VALUE
-
-Both C<ok> and C<skip> return true if their test succeeds and false
-otherwise in a scalar context.
-
-=head1 ONFAIL
-
-  BEGIN { plan test => 4, onfail => sub { warn "CALL 911!" } }
-
-While test failures should be enough, extra diagnostics can be
-triggered at the end of a test run.  C<onfail> is passed an array ref
-of hash refs that describe each test failure.  Each hash will contain
-at least the following fields: C<package>, C<repetition>, and
-C<result>.  (The file, line, and test number are not included because
-their correspondence to a particular test is tenuous.)  If the test
-had an expected value or a diagnostic string, these will also be
-included.
-
-The B<optional> C<onfail> hook might be used simply to print out the
-version of your package and/or how to report problems.  It might also
-be used to generate extremely sophisticated diagnostics for a
-particularly bizarre test failure.  However it's not a panacea.  Core
-dumps or other unrecoverable errors prevent the C<onfail> hook from
-running.  (It is run inside an C<END> block.)  Besides, C<onfail> is
-probably over-kill in most cases.  (Your test code should be simpler
-than the code it is testing, yes?)
-
-=head1 SEE ALSO
-
-L<Test::Harness> and, perhaps, test coverage analysis tools.
-
-=head1 AUTHOR
-
-Copyright (c) 1998-1999 Joshua Nathaniel Pritikin.  All rights reserved.
-
-This package is free software and is provided "as is" without express
-or implied warranty.  It may be used, redistributed and/or modified
-under the terms of the Perl Artistic License (see
-http://www.perl.com/perl/misc/Artistic.html)
-
-=cut
index c3653beddaa527255eb36cb45c0085b6c5cd3cd7..39265721046586c56279466d69207afed7a9558f 100644 (file)
@@ -1,3 +1,3 @@
-if command -v install-docs >/dev/null 2>&1; then
+if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then
        install-docs -i /usr/share/doc-base/#DOC-ID#
 fi
diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen
deleted file mode 100644 (file)
index 45f1dee..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/emacsen-common/emacs-package-install #PACKAGE#
index 59881a191f275bcc9b7505bf3c49af3f2218bcc9..71ffa19b70697ad62f8373bb4f9165e3ac27cb8c 100644 (file)
@@ -1 +1,3 @@
-install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+if [ "$1" = "configure" ]; then
+       install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+fi
index cba27d278360e54d99a583dd3236e1dc8b0d6b1b..ffef86368d8af8828c00819a2aa556ba2fc11ee4 100644 (file)
@@ -1 +1,3 @@
-install-info --quiet #FILE#
+if [ "$1" = "configure" ]; then
+       install-info --quiet #FILE#
+fi
index 976c6b3403065cb1e9e37fbd16d63c1d0cb9c32a..b5bd7a5798870f5e7d311e1ed3f5867852b9df6c 100644 (file)
@@ -1,2 +1,8 @@
-update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-/etc/init.d/#SCRIPT# start
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+       update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+       if [ -x /usr/sbin/invoke-rc.d ]; then
+               invoke-rc.d #SCRIPT# start
+       else
+               /etc/init.d/#SCRIPT# start
+       fi
+fi
diff --git a/autoscripts/postinst-init-norestart b/autoscripts/postinst-init-norestart
deleted file mode 100644 (file)
index b33702c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-update-rc.d #SCRIPT# #INITPARMS# >/dev/null
-if [ "$1" = "configure" ]; then
-       if [ -z "$2" -o "$2" = "<unknown>" ]; then
-               /etc/init.d/#SCRIPT# start
-       fi
-fi
diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart
new file mode 100644 (file)
index 0000000..5d882b6
--- /dev/null
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+       update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+fi
diff --git a/autoscripts/postinst-makeshlibs b/autoscripts/postinst-makeshlibs
new file mode 100644 (file)
index 0000000..8a25b9e
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+       ldconfig
+fi
index 2be88247cbe0926bcd8fca40bd21e1c8583536a9..276a3c0a7f64f4e9bb1bdc83bda0d55faa15f2ba 100644 (file)
@@ -1 +1 @@
-if test -x /usr/bin/update-menus ; then update-menus ; fi
+if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi
index 03acde7f692ad5f4ab0ab3e76c406afe3001225f..01913d8269354b56a66e6c86db3c7264736b5c61 100644 (file)
@@ -1,5 +1,5 @@
 inst=/etc/menu-methods/#PACKAGE#
-if [ -x /usr/bin/update-menus -a -f $inst ] ; then
+if [ -x /usr/bin/update-menus ] && [ -f $inst ] ; then
        chmod a+x $inst
        update-menus
 fi
index e993233b2007d161d79cb6a675750597b1bfcd95..bef63cc97295085f3db20ba68bc07f60e11b71ab 100644 (file)
@@ -1 +1 @@
-if [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-mime; fi
index a8f4ce706af3e95f1eedca6e500b741ab06fb414..babf39bd09971cf120ab7229c9e2b932bdf884d4 100644 (file)
@@ -1,2 +1,3 @@
-update-modules
-depmod -a
+if [ "$1" = "configure" ] && [ -x /sbin/update-modules ]; then
+       update-modules >/dev/null
+fi
diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python
new file mode 100644 (file)
index 0000000..6f1f9a5
--- /dev/null
@@ -0,0 +1,8 @@
+PYTHON=#PYVER#
+if which $PYTHON >/dev/null 2>&1; then
+       DIRLIST="#DIRLIST#"
+       for i in $DIRLIST ; do
+               $PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i
+               $PYTHON /usr/lib/$PYTHON/compileall.py -q $i
+       done
+fi
diff --git a/autoscripts/postinst-scrollkeeper b/autoscripts/postinst-scrollkeeper
new file mode 100644 (file)
index 0000000..5f2a255
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+       scrollkeeper-update -q
+fi
diff --git a/autoscripts/postinst-sgmlcatalog b/autoscripts/postinst-sgmlcatalog
new file mode 100644 (file)
index 0000000..100dee2
--- /dev/null
@@ -0,0 +1,7 @@
+if [ "$1" = "configure" ]; then
+       rm -f #CENTRALCAT#
+       for ordcat in #ORDCATS#; do
+               update-catalog --quiet --add #CENTRALCAT# ${ordcat}
+       done
+       update-catalog --quiet --add --super #CENTRALCAT#
+fi
index dcc277fd6290c32ac52396e7c5286694acf0090f..d0d16c06d2763382e5b033fc1b98f9c7586bc519 100644 (file)
@@ -1,6 +1,8 @@
-if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
-        suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
-elif [ -e /#FILE# ]; then
-        chown #OWNER#.#GROUP# /#FILE#
-        chmod #PERMS# /#FILE#
+if [ "$1" = "configure" ]; then
+       if which suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+               suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
+       elif [ -e /#FILE# ]; then
+               chown #OWNER#.#GROUP# /#FILE#
+               chmod #PERMS# /#FILE#
+       fi
 fi
diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal
new file mode 100644 (file)
index 0000000..a2f004d
--- /dev/null
@@ -0,0 +1,16 @@
+if [ "$1" = configure ]; then
+(
+       while read line; do
+               set -- $line
+               dir="$1"; mode="$2"; user="$3"; group="$4"
+               if [ ! -e "$dir" ]; then
+                       if mkdir "$dir" 2>/dev/null; then
+                               chown "$user":"$group" "$dir"
+                               chmod "$mode" "$dir"
+                       fi
+               fi
+       done
+) << DATA
+#DIRS#
+DATA
+fi
diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm
deleted file mode 100644 (file)
index 925c788..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if command -v register-window-manager >/dev/null 2>&1; then
-       register-window-manager --add #WM#
-fi
diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw
deleted file mode 100644 (file)
index 3d8e2d1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-if test -x /usr/sbin/update-xaw-wrappers; then
-       /usr/sbin/update-xaw-wrappers
-fi
-for opts in #OPTS#; do
-       update-alternatives --quiet --install $opts 25
-done   
index 1c29298256bdcf9ca800b7214520cdf058a1d95d..9596dd977eb282ca5f365ab71769f56e814f3966 100644 (file)
@@ -1,3 +1,3 @@
 if [ "$1" = "purge" ] ; then
-       update-rc.d #SCRIPT# remove >/dev/null
+       update-rc.d #SCRIPT# remove #INITPARMS# >/dev/null
 fi
diff --git a/autoscripts/postrm-makeshlibs b/autoscripts/postrm-makeshlibs
new file mode 100644 (file)
index 0000000..96bf24e
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+       ldconfig
+fi
diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu
new file mode 100644 (file)
index 0000000..a180558
--- /dev/null
@@ -0,0 +1 @@
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
index 3270b7c71ead09001e1697c90be12df54a6bb85e..ffa1e4862bd35a3cf125f351d701f28033e4dff8 100644 (file)
@@ -1,3 +1,3 @@
 inst=/etc/menu-methods/#PACKAGE#
-if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi
-if test -x /usr/bin/update-menus ; then update-menus; fi
+if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
diff --git a/autoscripts/postrm-mime b/autoscripts/postrm-mime
new file mode 100644 (file)
index 0000000..a940411
--- /dev/null
@@ -0,0 +1 @@
+if which update-mime >/dev/null 2>&1; then update-mime; fi
diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules
new file mode 100644 (file)
index 0000000..f2d4cb7
--- /dev/null
@@ -0,0 +1,3 @@
+if [ -x /sbin/update-modules ]; then
+       update-modules >/dev/null
+fi
diff --git a/autoscripts/postrm-scrollkeeper b/autoscripts/postrm-scrollkeeper
new file mode 100644 (file)
index 0000000..47b7154
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ] && which scrollkeeper-update >/dev/null 2>&1; then
+       scrollkeeper-update -q
+fi
diff --git a/autoscripts/postrm-sgmlcatalog b/autoscripts/postrm-sgmlcatalog
new file mode 100644 (file)
index 0000000..168a694
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "purge" ]; then
+       rm -f #CENTRALCAT# #CENTRALCAT#.old
+fi
index d4a761996421cf1ee4fbb0e12374f10ea1f22c4b..a4cfecf9a943b25d7d1c6a9810f34863b8b94278 100644 (file)
@@ -1,3 +1,4 @@
-if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+if [ "$1" = remove ] && [ -e /etc/suid.conf ] && \
+   which suidunregister >/dev/null 2>&1; then
         suidunregister -s #PACKAGE# /#FILE#
 fi
diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm
deleted file mode 100644 (file)
index 6a7eb47..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-if [ "$1" = "purge" ] && command -v register-window-manager >/dev/null 2>&1
-then
-       register-window-manager --remove #WM#
-fi
diff --git a/autoscripts/postrm-xaw b/autoscripts/postrm-xaw
deleted file mode 100644 (file)
index b8d718e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if test -x /usr/sbin/update-xaw-wrappers; then
-       /usr/sbin/update-xaw-wrappers
-fi
index 9678003ece922a60539bac1655d9165e08b72166..c57d999a2edff9e58db861de1a860ca9b66296df 100644 (file)
@@ -1,3 +1,4 @@
-if command -v install-docs >/dev/null 2>&1; then
+if [ "$1" = remove ] || [ "$1" = upgrade ] && \
+   which install-docs >/dev/null 2>&1; then
        install-docs -r #DOC-ID#
 fi
diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen
deleted file mode 100644 (file)
index d11dafa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/emacsen-common/emacs-package-remove #PACKAGE#
index 64975a38aa69f01b98fd7f7093a446db327691ad..eab98c72f385f26e0707b191f2b89a13cec7c61a 100644 (file)
@@ -1 +1,7 @@
-/etc/init.d/#SCRIPT# stop
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+       if [ -x /usr/sbin/invoke-rc.d ] ; then
+               invoke-rc.d #SCRIPT# stop
+       else
+               /etc/init.d/#SCRIPT# stop
+       fi
+fi
diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart
new file mode 100644 (file)
index 0000000..fb99152
--- /dev/null
@@ -0,0 +1,7 @@
+if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
+       if [ -x /usr/sbin/invoke-rc.d ] ; then
+               invoke-rc.d #SCRIPT# stop
+       else
+               /etc/init.d/#SCRIPT# stop
+       fi
+fi
diff --git a/autoscripts/prerm-python b/autoscripts/prerm-python
new file mode 100644 (file)
index 0000000..0dc1273
--- /dev/null
@@ -0,0 +1,5 @@
+if [ "$1" = remove ]; then
+       dpkg -L #PACKAGE# |
+               awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
+               xargs rm -f >&2
+fi
diff --git a/autoscripts/prerm-sgmlcatalog b/autoscripts/prerm-sgmlcatalog
new file mode 100644 (file)
index 0000000..cdc96e0
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+       update-catalog --quiet --remove --super #CENTRALCAT#
+fi
diff --git a/autoscripts/prerm-usrlocal b/autoscripts/prerm-usrlocal
new file mode 100644 (file)
index 0000000..baafc23
--- /dev/null
@@ -0,0 +1,7 @@
+(
+       while read dir; do
+               rmdir "$dir" 2>/dev/null || true
+       done
+) << DATA
+#JUSTDIRS#
+DATA
diff --git a/autoscripts/prerm-wm b/autoscripts/prerm-wm
new file mode 100644 (file)
index 0000000..b97d627
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+       update-alternatives --remove x-window-manager #WM#
+fi
diff --git a/autoscripts/prerm-xaw b/autoscripts/prerm-xaw
deleted file mode 100644 (file)
index 2507a2f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-for opts in #OPTS#; do
-       update-alternatives --quiet --remove $opts
-done
-       
diff --git a/debhelper.1 b/debhelper.1
deleted file mode 100644 (file)
index 438c950..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-.TH DEBHELPER 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-debhelper \- overview of the debhelper commands
-.SH SYNOPSIS
-.B dh_*
-.I "[-v] [-a] [-i] [-s] [--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"
-The following command line options are supported by all debhelper programs.
-.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 \-s, \--same-arch
-This is a smarter version of the -a flag, that is used in some rare
-circumstances. It understands that if the control file lists "Architecture: i386"
-for the package, the package should not be acted on on other architectures. So
-this flag makes the command act on all "Architecture: any" packages, as well
-as on any packages that have the current architecture explicitly specified.
-Constrast to the -a flag, which makes the command work on all packages that
-are not architecture independant.
-.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 "COMMON DEBHELPER OPTIONS"
-The following command line options are supported by some debhelper programs.
-See the man page of each program for a complete explination of what the
-option does.
-.TP
-.B \-n
-Do not modify postinst/postrm/etc scripts.
-.TP
-.B \-Xitem, \--exclude=item
-Exclude an item from processing.
-.TP
-.B \-A, \-all
-Makes files or other items that are specified on the command line take effect
-in ALL packages acted on, not just the first.
-.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
-,
-.B -p
-, and
-.B -s
-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. If DH_COMPAT=2, debian/<packagename> is always used,
-even for the first 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/<foo>/DEBIAN/
-before trying to put files there, dh_installmenu knows you need a
-debian/<foo>/usr/lib/menu/ before installing the menu files, etc.
-.SH "DEBHELPER COMMANDS"
-Here is the complete list of available debhelper commands.
-#LIST#
-.SH ENVIRONMENT
-.TP
-.I DH_VERBOSE
-Enables verbose mode.
-.TP
-.I DH_COMPAT
-Specifies what compatability level debhelper should run at. The default is 1,
-which makes debhelper behave in a manner compatable with the 1.x series of
-debhelper. If set to 2, debhelper's behavior will change to use the new
-features of the 2.x series. Use this with caution, as the 2.x series makes
-major changes that will break most packages. For documentation on these
-changes, read /usr/doc/debhelper/v2
-.TP
-.I DH_NO_ACT
-Enables no-act mode.
-.TP
-.I DH_OPTIONS
-Anything in this variable will be prepended to the command line
-arguments of all debhelper commands. This in useful in some situations,
-for example, if you need to pass -p to all debhelper commands that will be
-run. If you use DH_OPTIONS, be sure to use "dh_testversion 1.1.17" - older
-debhelpers will ignore it and do things you don't want them to.
-.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.
-.TP
-.BR http://kitenet.net/programs/debhelper/
-Debhelper web site.
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/debhelper.pod b/debhelper.pod
new file mode 100644 (file)
index 0000000..3fa2e2d
--- /dev/null
@@ -0,0 +1,404 @@
+=head1 NAME
+
+debhelper - the debhelper tool suite
+
+=head1 SYNOPSIS
+
+B<dh_>I<*> [B<-v>] [B<-a>] [B<-i>] [B<-s>] [B<--no-act>] [B<-ppackage>] [B<-Npackage] [-Ptmpdir>]
+
+=head1 DESCRIPTION
+
+Debhelper is used to help you build a debian package. The philosophy behind
+debhelper is to provide a collection of small, simple, and easily
+understood tools that are used in debian/rules to automate various common
+aspects of building a package. This means less work for you, the packager.
+It also, to some degree means that these tools can be changed if debian
+policy changes, and packages that use them will require only a rebuild to
+comply with the new policy.
+
+A typical debian/rules file that uses debhelper will call several debhelper
+commands in sequence. Debhelper commands are all named with a "dh_" prefix.
+Examples of rules files that use debhelper are in
+F</usr/share/doc/debhelper/examples/>
+
+To create a new debian package using debhelper, you can just copy one of
+the sample rules files and edit it by hand. Or you can try the dh-make
+package, which contains a L<dh_make|dh_make(1)> command that partially
+automates the process. For a more gentle introduction, the maint-guide debian
+package contains a tutorial about making your first package using debhelper.
+
+=head1 DEBHELPER COMMANDS
+
+Here is the complete list of available debhelper commands. See their man
+pages for additional documentation.
+
+=over 4
+
+#LIST#
+
+=back
+
+=head1 DEBHELPER CONFIG FILES
+
+Many debhelper commands make use of files in F<debian/> to control what they
+do. Besides the common F<debian/changelog> and F<debian/control>, which are
+in all packages, not just those using debhelper, some additional files can
+be used to configure the behavior of specific debhelper commands. These
+files are typically named debian/package.foo (where "package" of course,
+is replaced with the package that is being acted on).
+
+For example, dh_installdocs uses files named debian/package.docs to list
+the documentation files it will install. See the man pages of individual
+commands for details about the names and formats of the files they use.
+Generally, these files will list files to act on, one file per line. Some
+programs in debhelper use pairs of files and destinations or slightly more
+complicated formats.
+
+Note that if a package is the first (or only) binary package listed in
+debian/control, debhelper will use debian/foo if no debian/package.foo
+file can be found.
+
+In some rare cases, you may want to have different versions of these files
+for different architectures. If files named debian/package.foo.arch
+exist, where "arch" is the same as the output of "dpkg --print-architecture",
+then they will be used in preference to other, more general files.
+
+In many cases, these config files are used to specify various types of
+files. Documentation or example files to install, files to move, and so on.
+When appropriate, in cases like these, you can use standard shell wildcard
+characters ('?' and '*' and '[..]' character classes) in the files.
+
+=head1 SHARED DEBHELPER OPTIONS
+
+The following command line options are supported by all debhelper programs.
+
+=over 4
+
+=item B<-v>, B<--verbose>
+
+Verbose mode: show all commands that modify the package build directory.
+
+=item B<--no-act>
+
+Do not really do anything. If used with -v, the result is that the command
+will output what it would have done.
+
+=item B<-a>, B<--arch>
+
+Act on all architecture dependent packages.
+
+=item B<-i>, B<--indep>
+
+Act on all architecture independent packages.
+
+=item B<->I<ppackage>, B<--package=>I<package>
+
+Act on the package named "package". This option may be specified multiple
+times to make debhelper operate on a given set of packages.
+
+=item B<-s>, B<--same-arch>
+
+This is a smarter version of the -a flag, that is used in some rare
+circumstances. It understands that if the control file lists "Architecture: i386"
+for the package, the package should not be acted on on other architectures. So
+this flag makes the command act on all "Architecture: any" packages, as well
+as on any packages that have the current architecture explicitly specified.
+Contrast to the -a flag, which makes the command work on all packages that
+are not architecture independant.
+
+=item B<-N>I<package>, B<--no-package=>I<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.
+
+=item B<-P>I<tmpdir>, B<--tmpdir=>I<tmpdir>
+
+Use "tmpdir" for package build directory. The default is debian/<package>
+
+=item B<--mainpackage=>I<package>
+
+This little-used option changes the package which debhelper considers the
+"main package", that is, the first one listed in debian/control, and the
+one for which debian/foo files can be used instead of the usual
+debian/package.foo files.
+
+=back
+
+=head1 COMMON DEBHELPER OPTIONS
+
+The following command line options are supported by some debhelper programs.
+See the man page of each program for a complete explanation of what each
+option does.
+
+=over 4
+
+=item B<-n>
+
+Do not modify postinst/postrm/etc scripts.
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude an item from processing. This option may be used multiple times,
+to exclude more than one thing.
+
+=item B<-A>, B<-all>
+
+Makes files or other items that are specified on the command line take effect
+in ALL packages acted on, not just the first.
+
+=back
+
+=head1 NOTES
+
+=head2 Multiple binary package support
+
+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>, B<-p>, and B<-s> parameters. These parameters are cumulative. 
+If none are given, debhelper programs default to acting on all packages listed
+in the control file.
+
+See F</usr/share/doc/debhelper/examples/rules.multi> for an example of how to
+use this in a package that generates multiple binary packages.
+
+=head2 Automatic generation of debian install scripts
+
+Some debhelper commands will automatically generate parts of debian
+maintainer scripts. If you want these automatically generated things
+included in your existing debian maintainer scripts, then you need to add
+"#DEBHELPER#" to your scripts, in the place the code should be added.
+"#DEBHELPER#" will be replaced by any auto-generated code when you run
+dh_installdeb. 
+
+If a script does not exist at all and debhelper needs to add something to
+it, then debhelper will create the complete script.
+
+All debhelper commands that automatically generate code in this way let it
+be disabled by the -n parameter (see above).
+
+Note that the inserted code 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 (note that I made sure that $1, $2, etc are set with
+the set command):
+
+  my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
+  #DEBHELPER#
+  EOF
+  system ($temp) / 256 == 0
+       or die "Problem with debhelper scripts: $!";
+
+=head2 Automatic generation of miscellaneous dependencies.
+
+Some debhelper commands may make the generated package need to depend on
+some other packages. For example, if you use L<dh_installdebconf(1)>, your
+package will generally need to depend on debconf. Or if you use
+L<dh_installxfonts(1)>, your package will generally need to depend on a
+particular version of xutils. Keeping track of these miscellaneous
+dependencies can be annoying since they are dependant on how debhelper does
+things, so debhelper offers a way to automate it.
+
+All commands of this type, besides documenting what dependencies may be
+needed on their man pages, will automatically generate a substvar called
+${misc:Depends}. If you put that token into your debian/control file, it
+will be expanded to the dependencies debhelper figures you need. 
+
+This is entirely independent of the standard ${shlibs:Depends} generated by
+L<dh_makeshlibs(1)>, and the ${perl:Depends} generated by L<dh_perl(1)>.
+You can choose not to use any of these, if debhelper's guesses don't match
+reality.
+
+=head2 Package build directories
+
+By default, all debhelper programs assume that the temporary directory used
+for assembling the tree of files in a package is debian/<package>.
+
+Sometimes, you might want to use some other temporary directory. This is
+supported by the -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 also 
+use the -p flag to specify which binary package the debhelper program will
+act on.
+
+=head2 Debhelper compatibility levels
+
+From time to time, major non-backwards-compatible changes need to be made
+to debhelper, to keep it clean and well-designed as needs change and its
+author gains more experience. To prevent such major changes from breaking
+existing packages, the concept of debhelper compatability levels was 
+introduced. You tell debhelper which compatability level it should use, and
+it modifies its behavior in various ways.
+
+You tell debhelper what compatability level to use by writing a number to
+debian/compat. For example, to turn on V4 mode:
+
+  % echo 4 > debian/compat
+
+These are the available compatablity levels:
+
+=over 4
+
+=item V1
+
+This is the original debhelper compatability level, and so it is the default
+one. In this mode, debhelper will use debian/tmp as the package tree
+directory for the first binary package listed in the control file, while using
+debian/<package> for all other packages listed in the control file.
+This mode is deprecated.
+
+=item V2
+
+In this mode, debhelper will consistently use debian/<package>
+as the package tree directory for every package that is built.
+
+=item V3
+
+This mode works like V2, with the following additions:
+
+=over 8
+
+=item -
+
+Debhelper config files support globbing via * and ?, when appropriate. To
+turn this off and use those characters raw, just prefix with a backslash.
+
+=item -
+
+dh_makeshlibs makes the postinst and postrm scripts call ldconfig.
+
+=item -
+
+Every file in etc/ is automatically flagged as a conffile by dh_installdeb.
+
+=back
+
+=item V4
+
+This is the reccommended mode of operation. It does everything V3 does,
+plus:
+
+=over 8
+
+=item -
+
+dh_makeshlibs -V will not include the debian part of the version number in
+the generated dependancy line in the shlibs file.
+
+=item -
+
+You are encouraged to put the new ${misc:Depends} into debian/control to
+suppliment the ${shlibs:Depends} field.
+
+=item -
+
+dh_fixperms will make all files in bin/ directories and in etc/init.d 
+executable.
+
+=item -
+
+dh_link will correct existing links to conform with policy.
+
+=back
+
+=back
+
+=head2 Doc directory symlinks
+
+Sometimes it is useful to make a package not contain a /usr/share/doc/package
+directory at all, instead placing just a dangling symlink in the binary
+package, that points to some other doc directory. Policy says this is ok if
+your package depends on the package whose doc directory it uses. To
+accomplish this, just don't tell debhelper to install any documentation
+files into the package, and use dh_link to set up the symlink (or do it by
+hand), and debhelper should do the right thing: notice it is a dangling
+symlink and not try to install a copyright file or changelog.
+
+=head2 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/<package>/DEBIAN/
+before trying to put files there, dh_installmenu knows you need a
+debian/<package>/usr/lib/menu/ before installing the menu files, etc.
+
+Once your package uses debhelper to build, be sure to add
+debhelper to your Build-Depends line in debian/control. You should
+build-depend on a verson of debhelper equal to (or greater than) the
+debhelper compatability level your package uses. So if your package used
+compatability level 4:
+
+  Build-Depends: debhelper (>= 4)
+
+=head1 ENVIRONMENT
+
+=over 4
+
+=item DH_VERBOSE
+
+Set to 1 to enable verbose mode. Debhelper will output every command it runs
+that modifies files on the build system.
+
+=item DH_COMPAT
+
+Temporarily specifies what compatibility level debhelper should run at,
+overriding any value in debian/compat.
+
+=item DH_NO_ACT
+
+Set to 1 to enable no-act mode.
+
+=item DH_OPTIONS
+
+Anything in this variable will be prepended to the command line
+arguments of all debhelper commands. This is useful in some situations,
+for example, if you need to pass -p to all debhelper commands that will be
+run. If you use DH_OPTIONS, be sure to build depend on "debhelper >= 1.1.17" --
+older debhelpers will ignore it and do things you don't want them to. One very
+good way to set DH_OPTIONS is by using "Target-specific Variable Values" in
+your debian/rules file. See the make documentation for details on doing this.
+
+=item DH_ALWAYS_EXCLUDE
+
+If set, this adds the value the variable is set to to the -X options of all
+commands that support the -X option. Moreover, dh_builddeb will rm -rf
+anything that matches the value in your package build tree.
+
+This can be useful if you are doing a build from a CVS source tree, in
+which case setting DH_ALWAYS_EXCLUDE=CVS will prevent any CVS directories
+from sneaking into the package you build. Or, if a package has a source
+tarball that (unwisely) includes CVS directories, you might want to export
+DH_ALWAYS_EXCLUDE=CVS in debian/rules, to make it take effect wherever
+your package is built.
+
+Multiple things to exclude can be separated with colons, as in
+DH_ALWAYS_EXCLUDE=CVS:.svn
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item F</usr/share/doc/debhelper/examples/>
+
+A set of example debian/rules files that use debhelper.
+
+=item L<http://kitenet.net/programs/debhelper/>
+
+Debhelper web site.
+
+=back
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
index ad08e488dffa83daa586dac003a7811113eee176..4c03e6d84ff499e89a11f30e2c48d1f5fc98d6a6 100644 (file)
+debhelper (4.1.55) unstable; urgency=low
+
+  * dh_strip: do not strip files multiple times.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 22 Jul 2003 17:04:49 -0400
+
+debhelper (4.1.54) unstable; urgency=low
+
+  * dh_scrollkeeper: fix postrm to not run if scrollkeeper is not present
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 19 Jul 2003 16:57:30 +0200
+
+debhelper (4.1.53) unstable; urgency=low
+
+  * dh_scrollkeeper: fixed some overenthusiastic quoting. Closes: #201810
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 18 Jul 2003 09:45:23 +0200
+
+debhelper (4.1.52) unstable; urgency=low
+
+  * dh_clean: Clean the *.debhelper temp files on a per-package basis, in
+    case dh_clean is run on one package at a time.
+  * Removed the debian/substvars removal code entirely. It was only there to
+    deal with half-built trees built with debhelper << 3.0.30
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  6 Jul 2003 20:28:27 -0400
+
+debhelper (4.1.51) unstable; urgency=low
+
+  * dh_installchangelogs: Install debian/NEWS as NEWS.Debian, even for native
+    packages. This doesn't follow the lead of the changelog for native
+    packages for the reasons discussed in bug #192089
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  4 Jul 2003 00:34:24 -0400
+
+debhelper (4.1.50) unstable; urgency=low
+
+  * dh_clean: make -X work for debian/substvars file.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jul 2003 22:05:32 -0400
+
+debhelper (4.1.49) unstable; urgency=low
+
+  * dh_installman: Don't require trailing whitespace after the seciton number
+    in the TH line.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jul 2003 14:08:41 -0400
+
+debhelper (4.1.48) unstable; urgency=low
+
+  * dh_python typo fix Closes: #197679
+  * dh_link: don't complain if tmp dir does not exist yet when doing pre-link
+    scan.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 19 Jun 2003 19:51:13 -0400
+
+debhelper (4.1.47) unstable; urgency=low
+
+  * dh_install: recalculate automatic $dest eash time through the glob loop.
+    It might change if there are multiple wildcards Closes: #196344
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Jun 2003 13:35:27 -0400
+
+debhelper (4.1.46) unstable; urgency=low
+
+  * Added dh_scrollkeeper, by Ross Burton.
+  * Added dh_userlocal, by Andrew Stribblehill. (With root.root special case
+    added by me.)
+  * Added dh_installlogcheck, by Jon Middleton. Closes: #184021
+  * Add aph's name to copyright file too.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 12 Jun 2003 10:01:28 -0400
+
+debhelper (4.1.45) unstable; urgency=low
+
+  * Typo fixes from Adam Garside.
+  * dh_python: don't bother terminating the regexp, 2.2.3c1 for example.
+    Closes: #194531
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 24 May 2003 11:55:32 -0400
+
+debhelper (4.1.44) unstable; urgency=low
+
+  * dh_python: allow for a + at the end of the python version, as in the
+    python in stable, version 2.1.3+.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 20 May 2003 17:50:16 -0400
+
+debhelper (4.1.43) unstable; urgency=low
+
+  * dh_python: Honour -n flag. Closes: #192804
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 10 May 2003 13:00:12 -0400
+
+debhelper (4.1.42) unstable; urgency=medium
+
+  * Fix stupid typo in dh_movefiles. Closes: #188833
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 13 Apr 2003 11:44:22 -0400
+
+debhelper (4.1.41) unstable; urgency=low
+
+  * dh_movefiles: Do not pass --remove-files to tar, since that makes
+    it break hard links (see #188663).
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 12 Apr 2003 17:11:28 -0400
+
+debhelper (4.1.40) unstable; urgency=low
+
+  * Fix build with 077 umask. Closes: #187757
+  * Allow colons between multiple items in DH_ALWAYS_EXCLUDE.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  6 Apr 2003 14:30:48 -0400
+
+debhelper (4.1.39) unstable; urgency=low
+
+  * Add calls to dh_installcatalogs to example rules files. Closes: #186819
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 31 Mar 2003 11:52:03 -0500
+
+debhelper (4.1.38) unstable; urgency=low
+
+  * Fixed dh_installcatalog's references to itself on man page.
+    Closes: #184411
+  * dh_installdebconf: Set umask to sane before running po2debconf or
+    debconf-mergetemplates
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 23 Mar 2003 21:17:09 -0800
+
+debhelper (4.1.37) unstable; urgency=low
+
+  * dh_installmenu: Refer to menufile(5) instead of 5L so as not to confuse
+    pod2man. Closes: #184013
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  8 Mar 2003 18:37:14 -0500
+
+debhelper (4.1.36) unstable; urgency=low
+
+  * Rename debhelper.1 to debhelper.7.
+  * Typo, Closes: #183267
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  4 Mar 2003 14:27:45 -0500
+
+debhelper (4.1.34) unstable; urgency=low
+
+  * Removed vegistal substvars stuff from dh_inistallinit.
+  * Update debhelper(1).
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 24 Feb 2003 19:34:44 -0500
+
+debhelper (4.1.33) unstable; urgency=low
+
+  * wiggy didn't take my hint about making update-modules send warnings to
+    stderr, so its overly verbose stdout is now directed to /dev/null to
+    prevent conflicts with debconf. Closes: #150804
+  * dh_fixperms: only skip examples directories which in a parent of
+    usr/share/doc, not in a deeper tree. Closes: #152602
+  * dh_compress: stop even looking at usr/doc
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 22 Feb 2003 14:45:32 -0500
+
+debhelper (4.1.32) unstable; urgency=low
+
+  * dh_md5sums: note that it's used by debsums. Closes: #181521
+  * Make addsubstvars() escape the value of the variable before passing it to
+    the shell. Closes: #178524
+  * Fixed escape_shell()'s escaping of a few things.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 18 Feb 2003 19:01:45 -0500
+
+debhelper (4.1.31) unstable; urgency=low
+
+  * Added dh_installcatalogs, for sgml (and later xml) catalogs. By
+    Adam DiCarlo. Closes: #90025
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 12 Feb 2003 11:26:24 -0500
+
+debhelper (4.1.30) unstable; urgency=low
+
+  * Turned dh_undocumented into a no-op, as policy does not want
+    undocumented.7 links anymore.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  3 Feb 2003 16:34:13 -0500
+
+debhelper (4.1.29) unstable; urgency=low
+
+  * List binary-common in .PHONY in rules.multi2. Closes: #173278
+  * Cleaned up error message if python is not installed. Closes: #173524
+  * dh_python: Bug fix from Josselin Mouette for case of building an arch
+    indep python package depending on a arch dependent package. However, I
+    used GetPackages() rather than add yet another control file parser.
+    Untested.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 18 Dec 2002 21:20:41 -0500
+
+debhelper (4.1.28) unstable; urgency=low
+
+  * Fix dh_install to install empty directories even if it is excluding some
+    files from installation.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 12 Dec 2002 14:39:30 -0500
+
+debhelper (4.1.27) unstable; urgency=low
+
+  * Fixed dh_python ordering in example rules files. Closes: #172283
+  * Make python postinst fragment only run python if it is installed, useful
+    for packages that include python modules but do not depend on python.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Dec 2002 21:53:08 -0500
+
+debhelper (4.1.26) unstable; urgency=low
+
+  * dh_builddeb: Reluctantly call dpkg-deb directly. dpkg cannot pass extra
+    params to dpkg-deb. Closes: #170330
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 24 Nov 2002 11:14:36 -0500
+
+debhelper (4.1.25) unstable; urgency=low
+
+  * Added a dh_python command, by Josselin Mouette 
+    <josselin.mouette@ens-lyon.org>.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 21 Nov 2002 00:55:35 -0500
+
+debhelper (4.1.24) unstable; urgency=low
+
+  * Various minor changes based on suggestions by luca.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 21 Nov 2002 00:13:52 -0500
+
+debhelper (4.1.23) unstable; urgency=low
+
+  * Still run potodebconf after warning about templates.ll files.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 15 Nov 2002 15:33:31 -0500
+
+debhelper (4.1.22) unstable; urgency=low
+
+  * dh_install: Support autodest with non-debian/tmp sourcedirs.
+    Closes: #169138
+  * dh_install: Support implicit "." sourcedir and --list-missing.
+    (Also supports ./foo file specs and --list-missing.)
+    Closes: #168751
+  * dh_md5sums: Don't glob. Closes: #169135
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 15 Nov 2002 13:12:24 -0500
+
+debhelper (4.1.21) unstable; urgency=low
+
+  * Make dh_install --list-missing honor -X excludes. Closes: #168739
+  * As a special case, if --sourcedir is not set (so is "."), make
+    --list-missing look only at what is in debian/tmp. This is gross, but
+    people have come to depend on that behavior, and that combination has no
+    other sane meaning. Closes: #168751
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 14 Nov 2002 10:56:21 -0500
+
+debhelper (4.1.20) unstable; urgency=low
+
+  * typo in dh_shlibdeps(1), Closes: #167421
+  * dh_movefiles: make --list-missing respect --sourcedir. Closes: #168441
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 12 Nov 2002 17:56:32 -0500
+
+debhelper (4.1.19) unstable; urgency=low
+
+  * Added note to dh_installdebconf(1) about postinst sourcing debconf
+    confmodule. (Cf #106070)
+  * Added an example to dh_install(1). Closes: #166402
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 27 Oct 2002 20:26:02 -0500
+
+debhelper (4.1.18) unstable; urgency=low
+
+  * Use dpkg-architecture instead of dpkg --print-architecture (again?)
+    See #164863
+  * typo fix Closes: #164958 The rest seems clear enough from context, so
+    omitted.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 16 Oct 2002 20:47:43 -0400
+
+debhelper (4.1.17) unstable; urgency=low
+
+  * dh_installinit: added --no-start for rcS type scripts. Closes: #136502
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 11 Oct 2002 13:58:22 -0400
+
+debhelper (4.1.16) unstable; urgency=low
+
+  * Depend on po-debconf, and I hope I can drop the debconf-utils dep soon.
+    Closes: #163569
+  * Removed debconf-utils build-dep. Have no idea why that was there.
+  * dh_installman: Don't use extended section as section name for translated
+    man pages, use only the numeric section as is done for regular man pages.
+    Closes: #163534
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Oct 2002 11:49:37 -0400
+
+debhelper (4.1.15) unstable; urgency=low
+
+  * dh_compress: Exclude .css files, to prevent broken links from html files,
+    and since they are generally small, and since this matches existing
+    practice. Closes: #163303
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  5 Oct 2002 15:04:44 -0400
+
+debhelper (4.1.14) unstable; urgency=low
+
+  * dh_fixperms: Make sure .pm files are 0644. Closes: #163418
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  5 Oct 2002 14:03:52 -0400
+
+debhelper (4.1.13) unstable; urgency=low
+
+  * dh_installdebconf: Support po-debconf debian/po directories.
+    Closes: #163128
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  2 Oct 2002 23:41:51 -0400
+
+debhelper (4.1.12) unstable; urgency=low
+
+  * The "reverse hangover" release.
+  * dh_strip: better documentation, removed extraneous "item" from SYNOPSIS.
+    Closes: #162493
+  * dh_strip: detect and don't strip debug/*.so files.
+  * Note that 4.1.11 changelog entry was incorrect, dh_perl worked fine
+    without that change, but the new behavior is less likely to break things
+    if dpkg-gencontrol changes.
+  * Various improvements to debhelper(1).
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 27 Sep 2002 19:37:19 -0400
+
+debhelper (4.1.11) unstable; urgency=low
+
+  * Make addsubstvars remove old instances of line before adding new. This
+    will make dh_perl get deps right for packages that have perl modules and
+    XS in them.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 22 Sep 2002 11:27:08 -0400
+
+debhelper (4.1.10) unstable; urgency=low
+
+  * Depend on coreutils | fileutils. Closes: #161452
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 19 Sep 2002 11:21:19 -0400
+
+debhelper (4.1.9) unstable; urgency=low
+
+  * Fixed over-escaping of period when generating EXCLUDE_FIND.
+    Closes: #159155
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Sep 2002 13:41:05 -0400
+
+debhelper (4.1.8) unstable; urgency=low
+
+  * Use invoke-rc.d always now that it is in policy. Fall back to old behavior
+    if invoke-rc.d is not present, so versioned deps on sysvinit are not
+    needed.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 15 Sep 2002 20:07:41 -0400
+
+debhelper (4.1.7) unstable; urgency=low
+
+  * dh_builddeb(1): It's --filename, not --name. Closes: #160151
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  8 Sep 2002 20:05:07 -0400
+
+debhelper (4.1.6) unstable; urgency=low
+
+  * Clarified dh_perl man page. Closes: #159332
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  3 Sep 2002 12:27:08 -0400
+
+debhelper (4.1.5) unstable; urgency=low
+
+  * Fixed excessive escaping around terms in DH_EXCLUDE_FIND. Closes: #159155
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  1 Sep 2002 19:20:32 -0400
+
+debhelper (4.1.4) unstable; urgency=low
+
+  * Patch from Andrew Suffield to make dh_perl understand #!/usr/bin/env perl
+    Closes: #156243
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 17 Aug 2002 23:05:45 -0400
+
+debhelper (4.1.3) unstable; urgency=low
+
+  * dh_installinit: Always start daemon on upgraded even if
+    --no-restart-on-upgrade is given; since the daemon is not stopped
+    with that parameter starting it again is a no-op, unless the daemon was
+    not running for some reason. This makes transtions to using the flag
+    easier. Closes: #90976 and sorry it took me so long to verify you were
+    right.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  4 Aug 2002 18:52:12 -0400
+
+debhelper (4.1.2) unstable; urgency=low
+
+  * Typo, Closes: #155323
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  3 Aug 2002 12:17:11 -0400
+
+debhelper (4.1.1) unstable; urgency=low
+
+  * Added a -L flag to dh_shlibdeps that is a nice alternative to providing a
+    shlibs.local.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 25 Jul 2002 19:15:09 -0400
+
+debhelper (4.1.0) unstable; urgency=low
+
+  * Remove /usr/doc manglement code from postinst and prerm.
+    Do not use this verion of debhelper for woody backports!
+  * Removed dh_installxaw.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 21 Jul 2002 15:26:10 -0400
+
+debhelper (4.0.19) unstable; urgency=low
+
+  * Make dh_installchangelogs install debian/NEWS files as well, as
+    NEWS.Debian. Make dh_compress always compress them. The idea is to make
+    these files be in a machine parsable form, like the debian changelog, but
+    only put newsworthy info into them. Automated tools can then display new
+    news on upgrade. It is hoped that if this catches on it will reduce the
+    abuse of debconf notes. See discussion on debian-devel for details.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 14 Jul 2002 23:09:24 -0400
+
+debhelper (4.0.18) unstable; urgency=low
+
+  * Removed a seemingly useless -dDepends in dh_shlibdeps's call to
+    dpkg-shalibdeps; this allows for stuff like dh_shlibdeps -- -dRecommends
+    Closes: #152117
+  * Added a --list-missing parameter to dh_install, which calc may find
+    useful.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  7 Jul 2002 22:44:01 -0400
+
+debhelper (4.0.17) unstable; urgency=low
+
+  * In dh_install, don't limit to -type f when doing the find due to -X.
+    This makes it properly install syml8inks, cf my rpm bug.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  5 Jul 2002 22:58:03 -0400
+
+debhelper (4.0.16) unstable; urgency=low
+
+  * Patch from doogie to make dh_movefiles support -X. Closes: #150978
+  * Pound home in dh_installman's man page that yet, it really does do the
+    right thing. Closes: #150644
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Jul 2002 22:28:53 -0400
+
+debhelper (4.0.15) unstable; urgency=low
+
+  * Stupid, evil typo.
+  * Fixed the tests clint didn't show me.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 20 Jun 2002 20:57:06 -0400
+
+debhelper (4.0.14) unstable; urgency=low
+
+  * In script fragments, use more posix tests, no -a or -o, no parens.
+    Closes: #150403
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 20 Jun 2002 20:39:55 -0400
+
+debhelper (4.0.13) unstable; urgency=low
+
+  * Added --mainpackage= option, of use in some kernel modules packages.
+  * dh_gencontrol only needs to pass -p to dpkg-gencontrol if there is more
+    than one package in debian/control. This makes it a bit more flexible in
+    some cases.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 19 Jun 2002 19:44:12 -0400
+
+debhelper (4.0.12) unstable; urgency=low
+
+  * Fixed debconf-utils dependency.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 15 Jun 2002 20:20:21 -0400
+
+debhelper (4.0.11) unstable; urgency=low
+
+  * dh_compress: always compress .pcf files in
+    /usr/X11R6/lib/X11/fonts/{100dpi,75dpi,misc}, as is required by policy.
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  1 Jun 2002 18:08:50 -0400
+
+debhelper (4.0.10) unstable; urgency=low
+
+  * Consistently use the which command instead of command -v or hardcoded
+    paths in autoscripts. Neither is in posix, but which is in debianutils, so
+    will always be available. command -v is not available in zsh.
+    Closes: #148172
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 26 May 2002 00:54:33 -0400
+
+debhelper (4.0.9) unstable; urgency=low
+
+  * dh_install: glob relative to --sourcedir. Closes: #147908
+  * Documented what globbing is allowed.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 23 May 2002 12:28:30 -0400
+
+debhelper (4.0.8) unstable; urgency=low
+
+  * Don't leak regex characters from -X when generating DH_EXCLUDE_FIND.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 22 May 2002 21:03:38 -0400
+
+debhelper (4.0.7) unstable; urgency=low
+
+  * dh_strip: If a file is an ELF shared binary, does not have a .so.* in its
+    name, stirp it as a ELF binary. It seems that GNUstep has files of this
+    sort. See bug #35733 (not sufficient to close all of it).
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 22 May 2002 20:40:09 -0400
+
+debhelper (4.0.6) unstable; urgency=low
+
+  * Make dh_clean remove autom4te.cache.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 22 May 2002 14:08:33 -0400
+
+debhelper (4.0.5) unstable; urgency=low
+
+  * Removing perl warning message.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 19 May 2002 01:04:16 -0400
+
+debhelper (4.0.4) unstable; urgency=low
+
+  * Set DH_ALWAYS_EXCLUDE=CVS and debhelper will exclude CVS directories
+    from processing by any command that takes a -X option, and dh_builddeb 
+    will also go in and rm -rf any that still sneak into the build tree.
+  * dh_install: A patch from Eric Dorland <eric@debian.org> adds support for
+    --sourcedir, which allows debian/package.files files to be moved over to
+    debian/package.install, and just work. Closes: #146847
+  * dh_movefiles: don't do file tests in no-act mode. Closes: #144573
+  * dh_installdebconf: pass --drop-old-templates to debconf-mergetemplate.
+    Means debhelper has to depend on debconf-utils 1.1.1.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 May 2002 21:38:03 -0400
+
+debhelper (4.0.3) unstable; urgency=low
+
+  * Corrects misbuild with CVS dirs in deb. Closes: #146576
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 17 May 2002 15:38:26 -0400
+
+debhelper (4.0.2) unstable; urgency=low
+
+  * dh_install: delay globbing until after destintations have been found.
+    Closes: #143234
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 16 Apr 2002 21:25:32 -0400
+
+debhelper (4.0.1) unstable; urgency=low
+
+  * dh_installdebconf: allow parameters after -- to go to
+    debconf-mergetemplate.
+  * dh_installman: don't whine about zero-length man pages in .so conversion.
+  * Forgot to export filedoublearray, Closes: #142784
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 12 Apr 2002 23:22:15 -0400
+
+debhelper (4.0.0) unstable; urgency=low
+
+  * dh_movefiles has long been a sore point in debhelper. Inherited
+    from debstd, its interface and implementation suck, and I have maintained
+    it while never really deigning to use it. Now there is a remplacment:
+    dh_install, which ...
+    - copies files, doesn't move them. Closes: #75360, #82649
+    - doesn't have that whole annoying debian/package.files vs. debian/files
+      mess, as it uses debian/install.
+    - supports copying empty subdirs. Closes: #133037
+    - doesn't use tar, thus no error reproting problems. Closes: #112538
+    - files are listed relative to the pwd, debian/tmp need not be used at
+      all, so no globbing issues. Closes: #100404
+    - supports -X. Closes: #116902
+    - the whole concept of moving files out of a directory is gone, so this
+      bug doesn't really apply. Closes: #120026
+    - This is exactly what Bill Allombert asked for in #117383, even though I
+      designed it seemingly independantly. Thank you Bill! Closes: #117383
+  * Made debhelper's debian/rules a lot simpler by means of the above.
+  * Updated example rules file to use dh_install. Also some reordering and
+    other minor changes.
+  * dh_movefiles is lightly deprecated, and when you run into its bugs and
+    bad design, you are incouraged to just use dh_install instead.
+  * dh_fixperms: in v4 only, make all files in bin/ dirs +x. Closes: #119039
+  * dh_fixperms: in v4 only, make all files in etc/init.d executable (of
+    course there's -X ..)    
+  * dh_link: in v4 only, finds existing, non-policy-conformant symlinks
+    and corrects them. This has the side effect of making dh_link idempotent.
+  * Added a -h/--help option. This seems very obvious, but it never occured to
+    me before..
+  * use v4 for building debhelper itself
+  * v4 mode is done, you may now use it without fear of it changing.
+    (This idea of this upload is to get v4 into woody so people won't run into
+    many issues backporting from sarge to woody later on. Packages targeted
+    for woody should continue to use whatever compatability level they are
+    using.)
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 11 Apr 2002 17:28:57 -0400
+
+debhelper (3.4.14) unstable; urgency=low
+
+  * Fixed an uninitialized value warning, Closes: #141729
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  8 Apr 2002 11:45:02 -0400
+
+debhelper (3.4.13) unstable; urgency=low
+
+  * Typo, Closes: #139176
+  * Fixed dh_md5sums conffile excluding/including.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 20 Mar 2002 11:25:36 -0500
+
+debhelper (3.4.12) unstable; urgency=low
+
+  * Fix to #99169 was accidentually reverted in 3.0.42; reinstated.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 16 Mar 2002 23:31:46 -0500
+
+debhelper (3.4.11) unstable; urgency=low
+
+  * Fixed dh_installdocs and dh_installexamples to support multiple -X's.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 28 Feb 2002 13:02:35 -0500
+
+debhelper (3.4.10) unstable; urgency=low
+
+  * Fixed dh_movefiles. Closes: #135479, #135459
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 24 Feb 2002 12:25:32 -0500
+
+debhelper (3.4.9) unstable; urgency=low
+
+  * dh_movefiles: Allow for deeper --sourcedir. Closes: #131363
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 20 Feb 2002 16:37:43 -0500
+
+debhelper (3.4.8) unstable; urgency=low
+
+  * Thanks to Benjamin Drieu <benj@debian.org>, dh_installdocs -X now works.
+    I had to modify his patch to use cp --parents, since -P spews warnings
+    now. Also, I made it continue to use cp -a if nothing is excluded,
+    which is both faster, and means this patch is less likely to break
+    anything if it turns out to be buggy. Also, stylistic changes.
+    Closes: #40649
+  * Implemented -X for dh_installexamples as well.
+  * dh_clean -X substvars will also work now. Closes: #66890
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 17 Feb 2002 12:26:37 -0500
+
+debhelper (3.4.7) unstable; urgency=low
+
+  * dh_perl: don't gripe if there is no substvar file. Closes: #133140
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  9 Feb 2002 17:37:32 -0500
+
+debhelper (3.4.6) unstable; urgency=low
+
+  * Typo, Closes: #132454
+  * Ignore leading/trailing whitespace in DH_OPTIONS, Closes: #132645
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  5 Feb 2002 17:33:57 -0500
+
+debhelper (3.4.5) unstable; urgency=low
+
+  * dh_installxfonts: separate multiple commands with \n so sed doesn't get
+    upset. Closes: #131322
+
+ -- Joey Hess <joey@kitenet.net>  Tue, 29 Jan 2002 18:58:58 -0500
+
+debhelper (3.4.4) unstable; urgency=low
+
+  * Introduced the debian/compat file. This is the new, preferred way to say
+    what debhelper compatability level your package uses. It has the big
+    advantage of being available to debhelper when you run it at the command
+    line, as well as in debian/rules.
+  * A new v4 feature: dh_installinit, in v4 mode, will use invoke-rc.d.
+    This is in v4 for testing, but I may well roll it back into v3 (and
+    earlier) once woody is released and I don't have to worry about breaking
+    things (and, presumably, once invoke-rc.d enters policy).
+  * Some debhelper commands will now build up a new substvars variable,
+    ${misc:Depends}, based on things they know your package needs to depend
+    on. For example, dh_installinit in v4 mode adds sysvinit (>= 2.80-1) to
+    that dep list, and dh_installxfonts adds a dep on xutils. This variable
+    should make it easier to keep track of what your package needs to depends
+    on, supplimenting the ${shlibs:Depends} and ${perl:Depends} substvars.
+    Hmm, this appears to be based loosely on an idea by Masato Taruishi
+    <taru@debian.org>, filtered through a long period of mulling it over.
+    Closes: #76352
+  * Use the addsubstvar function I wrote for the above in dh_perl too.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 26 Jan 2002 23:30:51 -0500
+
+debhelper (3.4.3) unstable; urgency=low
+
+  * Improved dh_installxfonts some more:
+    - Better indenting of generated code.
+    - Better ordering of generated code (minor fix).
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 26 Jan 2002 23:09:59 -0500
+
+debhelper (3.4.2) unstable; urgency=low
+
+  * dh_installman: more documentation about the .TH line. Closes: #129205
+  * dh_installxfonts:
+    - Packages that use this should depend on xutils. See man page.
+    - However, if you really want to, you can skip the dep, and the
+      postinst will avoid running program that arn't available. Closes: #131053
+    - Use update-fonts-dir instead of handling encodings ourselves. Yay!
+    - Pass only the last component of the directory name to
+      update-fonts-*, since that's what they perfer now.
+    - Other changes, chould fully comply with Debian X font policy now.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 15 Jan 2002 12:17:43 -0500
+
+debhelper (3.4.1) unstable; urgency=low
+
+  * Fixed programmer's documentation of DOINDEP and DOARCH, Closes: #128546
+  * Fixed dh_builddeb SYNOPSIS, Closes: #128548
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 10 Jan 2002 13:49:37 -0500
+
+debhelper (3.4.0) unstable; urgency=low
+
+  * Began work on v4 support (and thus the large version number jump), and it
+    is only for the very brave right now since I will unhesitatingly break
+    compatability in v4 mode as I'm developing it. Currently, updating to v4
+    mode will only make dh_makeshlibs -V generate shared library deps that
+    omit the debian part of the version number. The reasoning behind this
+    change is that the debian revision should not typically break binary
+    compatability, that existing use of -V is causing too tight versioned
+    deps, and that if you do need to include the debian revision for some
+    reason, you can always write it out by hand. Closes: #101497
+  * dh_testversion is deprecated -- use build deps instead. A warning message
+    is now output when it runs. Currently used by: 381 packages.
+  * dh_installxaw is deprecated -- xaw-wrappers in no longer in the
+    distribution. A warning message is now output when it runs. Currently used
+    by: 3 packages (bugs filed).
+  * Added referneces to menufile in dh_installmenu man page. Closes: #127978
+    (dh_make is not a part of debhelper, if you want it changed, file a bug on
+    dh-make.)
+    
+ -- Joey Hess <joeyh@debian.org>  Sat,  5 Jan 2002 22:45:09 -0500
+
+debhelper (3.0.54) unstable; urgency=low
+
+  * Added a version to the perl build dep, Closes: #126677
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 27 Dec 2001 20:39:46 -0500
+
+debhelper (3.0.53) unstable; urgency=low
+
+  * dh_strip: run file using a safe pipe open, that will not expose any weird
+    characters in filenames to a shell. Closes: #126491
+  * fixed dh_testdir man page
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 26 Dec 2001 21:15:42 -0500
+
+debhelper (3.0.52) unstable; urgency=low
+
+  * Typo, Closes: #122679
+  * Export dirname from Dh_Lib, and related cleanup, Closes: #125770
+  * Document dirname, basename in PROGRAMMING
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  6 Dec 2001 11:58:52 -0500
+
+debhelper (3.0.51) unstable; urgency=low
+
+  * Man page cleanups, Closes: #119335
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 17 Nov 2001 21:04:15 -0500
+
+debhelper (3.0.50) unstable; urgency=low
+
+  * dh_undocumented: check for existing uncompressed man pages. Closes: #87972
+  * Optimized dh_installdeb conffile finding. Closes: #119035
+  * dh_installdeb: changed the #!/bin/sh -e to set -e on a new line. Whether
+    this additional bloat is worth it to make it easier for people to sh -x
+    a script by hand is debatable either way, I guess. Closes: #119046
+  * Added a check for duplicated package stanzas in debian/control, 
+    Closes: #118805
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 17 Nov 2001 14:00:54 -0500
+
+debhelper (3.0.49) unstable; urgency=low
+
+  * More informative error, Closes: #118767
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  8 Nov 2001 18:12:11 -0500
+
+debhelper (3.0.48) unstable; urgency=low
+
+  * Added .zip and .jar to list of things to compress (Closes: #115735),
+    and modified docs (Closes: #115733).
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 15 Oct 2001 19:01:43 -0400
+
+debhelper (3.0.47) unstable; urgency=low
+
+  * dh_installman: documented translated man page support, and made it work
+    properly. It was not stripping the language part from the installed
+    filenames.
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  9 Oct 2001 15:16:18 -0400
+
+debhelper (3.0.46) unstable; urgency=low
+
+  * Typo, Closes: #114135
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Oct 2001 19:39:34 -0400
+
+debhelper (3.0.45) unstable; urgency=low
+
+  * dh_installxfonts: Do not specify /usr/sbin/ paths; that should be in
+    the path and dpkg enforces it. Closes: #112385
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 16 Sep 2001 18:48:59 -0400
+
+debhelper (3.0.44) unstable; urgency=low
+
+  * Added dh_strip to rules.multi2, and removed .TODO.swp. Closes: #110418
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 28 Aug 2001 15:22:41 -0400
+
+debhelper (3.0.43) unstable; urgency=low
+
+  * dh_perl: made it use doit commands so -v mode works. Yeah, uglier.
+    Closes: #92826
+    Also some indentation fixes. 
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 24 Aug 2001 15:34:55 -0400
+
+debhelper (3.0.42) unstable; urgency=low
+
+  * dh_movefiles: Typo, Closes: #106532
+  * Use -x to test for existance of init scripts, rather then -e since
+    we'll be running them, Closes: #109692
+  * dh_clean: remove debian/*.debhelper. No need to name files 
+    specifically; any file matching that is a debhelper temp file. 
+    Closes: #106514, #85520
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 23 Aug 2001 15:47:35 -0400
+
+debhelper (3.0.40) unstable; urgency=low
+
+  * Typo, Closes: #104405
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 11 Jul 2001 22:57:41 -0400
+
+debhelper (3.0.39) unstable; urgency=low
+
+  * dh_compress: Don't compress .bz2 files, Closes: #102935
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 30 Jun 2001 20:39:17 -0400
+
+debhelper (3.0.38) unstable; urgency=low
+
+  * fixed doc bog, Closes: #102130
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 24 Jun 2001 21:08:15 -0400
+
+debhelper (3.0.37) unstable; urgency=low
+
+  * Spellpatch, Closes: #101553
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 20 Jun 2001 22:03:57 -0400
+
+debhelper (3.0.36) unstable; urgency=low
+
+  * Whoops, I forgot to revert dh_perl too. Closes: #101477
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 19 Jun 2001 14:10:24 -0400
+
+debhelper (3.0.35) unstable; urgency=low
+
+  * Revert change of 3.0.30. This broke too much stuff. Maybe I'll
+    change it in debhelper v4..
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 18 Jun 2001 13:56:35 -0400
+
+debhelper (3.0.34) unstable; urgency=low
+
+  * Unimportant spelling fix. Closes: #100666
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 14 Jun 2001 12:30:28 -0400
+
+debhelper (3.0.33) unstable; urgency=low
+
+  * dh_gencontrol: Work around very strange hurd semantics
+    which allow "" to be an empty file. Closes: #100542
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 11 Jun 2001 18:15:19 -0400
+
+debhelper (3.0.32) unstable; urgency=low
+
+  * Check that update-modules is present before running it, since modutils
+    is not essential. Closes: #100430
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 10 Jun 2001 15:13:51 -0400
+
+debhelper (3.0.31) unstable; urgency=low
+
+  * Remove dh_testversion from example rules file, Closes: #99901
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  7 Jun 2001 20:24:39 -0400
+
+debhelper (3.0.30) unstable; urgency=low
+
+  * dh_gencontrol: Added a documented interface for specifying substvars
+    data in a file. Substvars data may be put in debian/package.substvars.
+    (Those files used to be used by debhelper for automatically generated
+    data, but it uses a different internal filename now). It will be merged
+    with any automatically determined substvars data. See bug #98819
+  * I want to stress that no one should ever rely in internal, undocumented
+    debhelper workings. Just because debhelper uses a certian name for some
+    internally used file does not mean that you should feel free to modify
+    that file to your own ends in a debian package. If you do use it, don't
+    be at all suprised when it breaks. If you find that debhelper is lacking
+    a documented interface for something that you need, ask for it!
+    (debhelper's undocumented, internal use only files should now all be
+    prefixed with ".debhelper")
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  3 Jun 2001 16:37:33 -0400
+
+debhelper (3.0.29) unstable; urgency=low
+
+  * Added -X flag to dh_makeshlibs, for packages with wacky plugins that
+    look just like shared libs, but are not.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  1 Jun 2001 14:27:06 -0400
+
+debhelper (3.0.28) unstable; urgency=low
+
+  * dh_clean: clean up temp files used by earlier versons of debhelper.
+    Closes: #99169
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 30 May 2001 16:24:09 -0400
+
+debhelper (3.0.27) unstable; urgency=low
+
+  * Fixed issues with extended parameters to dh_gencontrol including spaces
+    and quotes. This was some histirical cruft that deals with splitting up
+    the string specified by -u, and it should not have applied to the set
+    of options after --. Now that it's fixed, any and all programs that
+    support a -- and options after it, do not require any special quoting
+    of the succeeding options. Quote just like you would in whatever
+    program those options go to. So, for example, 
+    dh_gencontrol -Vblah:Depends='foo, bar (>= 1.2)' will work just as you
+    would hope. This fix does NOT apply to -u; don't use -u if you must do
+    something complex. Closes: #89311
+  * Made escape_shell output a lot better.
+ -- Joey Hess <joeyh@debian.org>  Tue, 29 May 2001 17:54:19 -0400
+
+debhelper (3.0.26) unstable; urgency=low
+
+  * Always include package name in maintainer script fragment filenames 
+    and generated shlibs files (except for in DH_COMPAT=1 mode). This is a
+    purely cosmetic change, and if it breaks anything, you were using an
+    undocumented interface. Closes: #95387
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 24 May 2001 16:31:46 -0400
+
+debhelper (3.0.25) unstable; urgency=low
+
+  * dh_makeshlins: append to LD_LIBRARY_PATH at start, not each time
+    through loop. Closes: #98598
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 24 May 2001 14:16:50 -0400
+
+debhelper (3.0.24) unstable; urgency=low
+
+  * Missing semi-colon.
+  * Call dh_shlibdeps as part of build process, as simple guard against
+    this (dh_* should be called, really).
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 15 May 2001 10:27:34 -0400
+
+debhelper (3.0.23) unstable; urgency=low
+
+  * dh_shlibdeps: the -l switch now just adds to LD_LIBRARY_PATH, if it is
+    already set. Newer fakeroots set it, and clobbering their settings 
+    breaks things since they LD_PRELOAD a library that is specified in the
+    LD_LIBRARY_PATH. (blah) Closes: #97494
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 14 May 2001 22:32:23 -0400
+
+debhelper (3.0.22) unstable; urgency=low
+
+  * dh_installinfo: doc enchancement, Closes: #97515
+  * dh_md5sums: don't fail if pwd has spaces in it (must be scraping the
+    bottom of the bug barrel here). Closes: #97404
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 14 May 2001 21:22:47 -0400
+
+debhelper (3.0.21) unstable; urgency=low
+
+  * Corrected bashism (echo -e, DAMNIT), in rules file that resulted in a
+    corrupted Dh_Version.pm. Closes: #97236
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 12 May 2001 12:21:40 -0400
+
+debhelper (3.0.20) unstable; urgency=low
+
+  * Modified the postrm fragment for dh_installxfonts to not try to delete
+    any files. The responsibility for doing so devolves onto update-fonts-*
+    (which don't yet, but will). See bug #94752
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 11 May 2001 13:30:43 -0400
+
+debhelper (3.0.19) unstable; urgency=low
+
+  * Now uses html2text rather than lynx for converting html changelogs.
+    The program generates better results, and won't annoy the people who
+    were oddly annoyed at having to install lynx. Instead, it will annoy a
+    whole other set of people, I'm sure. Closes: #93747
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 May 2001 21:23:46 -0400
+
+debhelper (3.0.18) unstable; urgency=low
+
+  * dh_perl: updates from bod:
+    - Provide minimum version for arch-indep module dependencies
+      (perl-policy 1,18, section 3.4.1).
+    - Always update substvars, even if Perl:Depends is empty.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 21 Apr 2001 15:13:15 -0700
+
+debhelper (3.0.17) unstable; urgency=low
+
+  * dh_shlibdeps: document that -l accepts multiple dirs, and
+    make multiple dirs absolute properly, not just the first.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Apr 2001 23:20:30 -0700
+
+debhelper (3.0.16) unstable; urgency=low
+
+  * Documented -isp, Closes: #93983
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 14 Apr 2001 19:16:47 -0700
+
+debhelper (3.0.15) unstable; urgency=low
+
+  * Typo, Closes: #92407
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  3 Apr 2001 12:15:02 -0700
+
+debhelper (3.0.14) unstable; urgency=low
+
+  * dh_strip: ensure that the file _ends_ with `.a'. Closes: #90647
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 21 Mar 2001 20:21:11 -0800
+
+debhelper (3.0.13) unstable; urgency=low
+
+  * dh_makeshlibs: more support for nasty soname formats, Closes: #90520
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 21 Mar 2001 15:00:42 -0800
+
+debhelper (3.0.12) unstable; urgency=low
+
+  * Applied a patch from Anton Zinoviev <anton@lml.bas.bg> to pass -e
+    to mkfontdir. Closes: #89418
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 16 Mar 2001 21:03:29 -0800
+
+debhelper (3.0.11) unstable; urgency=low
+
+  * dh_makeshlibs: don't follow links to .so files. Instead, we will look
+    for *.so* files. This should work for the variously broken db3,
+    liballeg, and it will fix the problem with console-tools-dev, which
+    contained (arguably broken) absolute symlinks to real files, which were
+    followed. Closes: #85483
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 14 Mar 2001 14:55:58 -0800
+
+debhelper (3.0.10) unstable; urgency=medium
+
+  * Fixed broken -e #SCRIPT# tests in init script start/stop/restart code.
+    Arrgh. All packages built with the old code (that is, all daemon
+    packages built with debhelper 3.0.9!) are broken. Closes: #89472
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 13 Mar 2001 06:10:03 -0500
+
+debhelper (3.0.9) unstable; urgency=low
+
+  * Modified to use dpkg-architecture instead of dpkg --print-architecture.
+    I hate this, and wish it wasn't necessary to make cross compiles for
+    the hurd work. Closes: #88494
+  * Now depends on debconf-utils for debconf-mergetemplates. Closes: #87321
+  * Continues to depend on lynx for html changelog conversions. Yes, these
+    and packages with translated debconf templates are rather rare, but
+    it makes more sense for debhelper to consistently depend on all utilities
+    it uses internally rather than force people to keep their dependancies
+    up to date with debhelper internals. If I decide tomorrow that w3m is
+    the better program to use to format html changelogs, I can make the
+    change and packages don't need to update their build dependancies.
+    Closes: #88464, #77743
+  * Test for init scripts before running them, since they are conffiles and
+    the admin may have removed them for some reason, and policy wants
+    us to deal with that gracefully.
+  * dh_makeshlibs: now uses objdump, should be more accurate. Closes:
+    #88426
+  * Wildcards have been supported for a while, Closes: #54197
+  * dh_installdocs and dh_link have been able to make doc-dir symlinks for
+    a while, Closes: #51225
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  4 Mar 2001 15:48:45 -0800
+
+debhelper (3.0.8) unstable; urgency=low
+
+  * dh_perl update
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 24 Feb 2001 23:31:31 -0800
+
+debhelper (3.0.7) unstable; urgency=low
+
+  * dh_makeshlibs: only generate call to ldconfig if it really looks like 
+    a given *.so* file is indeed a shared library.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 23 Feb 2001 14:38:50 -0800
+
+debhelper (3.0.6) unstable; urgency=low
+
+  * Corrected some uninitialized value stuff in dh_suidregister (actually
+    quite a bad bug).
+  * dh_installman: fixed variable socoping error, so file conversions
+    should work now.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 16 Feb 2001 14:15:02 -0800
+
+debhelper (3.0.5) unstable; urgency=low
+
+  * Updated dh_perl to a new version for the new perl organization and
+    policy. The -k flag has been done away with, as the new perl packages
+    don't make packlist files.
+  * Fixed some bugs in the new dh_perl and updated it to my current
+    debhelper coding standards.
+  * Use dh_perl to generate debhelper's own deps.
+  * Version number increase to meet perl policy.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 13 Feb 2001 09:07:48 -0800
+
+debhelper (3.0.1) unstable; urgency=low
+
+  * Build-depends on perl-5.6, since it uses 2 argument pod2man.
+  * Cleanups of debhelper.1 creation process.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 12 Feb 2001 16:12:59 -0800
+
+debhelper (3.0.0) unstable; urgency=low
+
+  * Added dh_installman, a new program that replaces dh_installmanpages.
+    It is not DWIM. You tell it what to install and it figures out where 
+    based on .TH section field and filename extention. I reccommend everyone
+    begin using it, since this is much better then dh_installmanpages's
+    evilness. I've been meaning to do this for a very long time..
+    Closes: #38673, #53964, #64297, #16933, #17061, #54059, #54373, #61816
+  * dh_installmanpages remains in the package for backwards compatability,
+    but is mildly deprecated.
+  * dh_testversion is deprecated; use build dependancies instead.
+  * dh_suidregister: re-enabled. Aj thinks that requiring people to stop
+    using it is unacceptable. Who am I to disagree with a rc bug report?
+    Closes: #84910 It is still deprecated, and it will still whine at you
+    if you use it. I appreciate the job everyone has been doing at
+    switching to statoverrides..
+  * Since dh_debstd requires dh_installmanpages (where do you think the
+    latter's evil interface came from?), I have removed it. It was a nice
+    thought-toy, but nobody really used it, right?
+  * Since the from-debstd document walks the maintainer through running
+    dh_debstd to get a list of debhelper commands, and since that document
+    has really outlives its usefullness, I removed it too. Use dh-make
+    instead.
+  * dh_installman installs only into /usr/share/man, not the X11R6
+    directory. Policy says "files must not be installed into
+    `/usr/X11R6/bin/', `/usr/X11R6/lib/', or `/usr/X11R6/man/' unless this
+    is necessary for the package to operate properly", and I really doubt
+    a man page being in /usr/share/man is going to break many programs.
+    Closes: #81853 (I hope the bug submitter doesn't care that
+    dh_installmanpages still puts stuff in the X11R6/man directory.)
+  * dh_undocumented now the same too now.
+  * dh_installinit: installs debian/package.default files as /etc/default/
+    files.
+  * Updated to current perl coding standards (use strict, lower-case
+    variable names, pod man pages).
+  * Since with the fixing of the man page installer issue, my checklist for
+    debhelper v3 is complete, I pronounce debhelper v3 done! Revved the
+    version number appropriatly (a large jump; v3 changes less than I had
+    planned). Note that I have no plans for a v4 at this time. :-)
+  * Testing: I have used this new version of debhelper to build a large
+    number of my own packages, and it seems to work. But this release
+    touches every file in this package, so be careful out there..
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  8 Feb 2001 14:29:58 -0800
+
+debhelper (2.2.21) unstable; urgency=low
+
+  * Fixed a stupid typo in dh_suidregister, Closes: #85110
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  6 Feb 2001 13:29:57 -0800
+
+debhelper (2.2.20) unstable; urgency=low
+
+  * dh_installinit -r: stop init script in prerm on package removal,
+    Closes: #84974
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  5 Feb 2001 10:06:31 -0800
+
+debhelper (2.2.19) unstable; urgency=low
+
+  * dh_shlibdeps -l can handle relative paths now. Patch from Colin Watson
+    <cjw44@flatline.org.uk>, Closes: #84408
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Feb 2001 13:35:39 -0800
+
+debhelper (2.2.18) unstable; urgency=medium
+
+  * Added a suggests to debconf-utils, Closes: #83643
+    I may chenge this to a dependancy at some point in the future,
+    since one debconf command needs the package to work.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 30 Jan 2001 22:39:54 -0800
+
+debhelper (2.2.17) unstable; urgency=medium
+
+  * dh_installdebconf: marge in templates with a .ll_LL extention,
+    they were previously ignored.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 29 Jan 2001 13:05:21 -0800
+
+debhelper (2.2.16) unstable; urgency=medium
+
+  * Bah, reverted that last change. It isn't useful because
+    dpkg-buildpackage reads the real control file and gets confused.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Jan 2001 01:47:46 -0800
+
+debhelper (2.2.15) unstable; urgency=medium
+
+  * Added the ability to make debhelper read a different file than
+    debian/control as the control file. This is very useful for various and
+    sundry things, all Evil, most involving kernel packages.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 24 Jan 2001 17:33:46 -0800
+
+debhelper (2.2.14) unstable; urgency=medium
+
+  * Corrected globbing issue with dh_movefiles in v3 mode. Closes: #81431
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 21 Jan 2001 18:33:59 -0800
+
+debhelper (2.2.13) unstable; urgency=medium
+
+  * Fixed a man page typo, Closes: #82371:
+  * Added note to dh_strip man page, Closes: #82220
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 15 Jan 2001 20:38:53 -0800
+
+debhelper (2.2.12) unstable; urgency=medium
+
+  * suidmanager is obsolete now, and so is dh_suidmanager. Instead,
+    packages that contain suid binaries should include the binaries suid in
+    the .deb, and dpkg-statoverride can override this. If this is done
+    to a program that previously used suidmanager, though, you need to
+    conflict with suidmanager (<< 0.50).
+  * Made dh_suidmanager check to see if it would have done anything before.
+    If so, it states that it is obsolete, and refer users to the man
+    page, which now explains the situation, and then aborts the build.
+    If it would have done nothing before, it just outputs a warning that
+    it is an obsolete program.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 10 Jan 2001 13:17:50 -0800
+
+debhelper (2.2.11) unstable; urgency=medium
+
+  * Fixed dh_installwm. Oops. Closes: #81124 
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  3 Jan 2001 10:18:38 -0800
+
+debhelper (2.2.10) unstable; urgency=low
+
+  * dh_shlibdeps: re-enabled -l flag, it's needed again. Closes: #80560
+
+ -- Joey Hess <joey@kitenet.net>  Tue, 26 Dec 2000 22:05:30 -0800
+
+debhelper (2.2.9) unstable; urgency=low
+
+  * Fixed perl wanring, Closes: #80242
+
+ -- Joey Hess <joey@kitenet.net>  Thu, 21 Dec 2000 14:43:11 -0800
+
+debhelper (2.2.8) unstable; urgency=medium
+
+  * dh_installwm: Moved update-alternatives --remove call to prerm, 
+    Closes: #80209
+  * ALso guarded all update-alternatives --remove calls.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 21 Dec 2000 11:33:30 -0800
+
+debhelper (2.2.7) unstable; urgency=low
+
+  * Spelling patch.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  3 Dec 2000 17:12:15 -0800
+
+debhelper (2.2.6) unstable; urgency=low
+
+  * typo: Closes, #78567
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  2 Dec 2000 14:27:31 -0800
+
+debhelper (2.2.5) unstable; urgency=low
+
+  * Oops, it was not expanding wildcard when it should.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 29 Nov 2000 20:59:33 -0800
+
+debhelper (2.2.4) unstable; urgency=low
+
+  * dh_movefiles: added error message on file not found
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 29 Nov 2000 20:25:52 -0800
+
+debhelper (2.2.3) unstable; urgency=low
+
+  * If DH_COMPAT=3 is set, the following happens:
+    - Various debian/foo files like debian/docs, debian/examples, etc,
+      begin to support filename globbing. use \* to escape the wildcards of
+      course. I doubt this will bite anyone (Debian doesn't seem to contain 
+      files with "*" or "?" in their names..), but it is guarded by v3 just
+      to be sure. Closes: #34120, #37694, #39846, #46249
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Nov 2000 20:43:26 -0800
+
+debhelper (2.2.2) unstable; urgency=low
+
+  * dh_makeshlibs: corrected the evil db3-regex so it doesn't misfire on
+    data like "debian/libruby/usr/lib/ruby/1.6/i486-linux/etc.so".
+    Closes: #78139
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Nov 2000 12:21:53 -0800
+
+debhelper (2.2.1) unstable; urgency=low
+
+  * Reverted the change to make debian/README be treated as README.Debian,
+    after I learned people use it for eg, documenting the source package
+    itself. Closes: #34628, since it seems this is not such an "incredibly
+    minor" change after all. Never underetimate the annoyance of
+    backwards-compatability.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Nov 2000 12:01:52 -0800
+
+debhelper (2.2.0) unstable; urgency=low
+
+  * DH_COMPAT=3 now enables the following new features which I can't just
+    turn on by default for fear of breaking backwards compatability:
+    - dh_makeshlibs makes the postinst/postrm call ldconfig. Closes: #77154
+      Patch from Masato Taruishi <taru@debian.org> (modified). If you 
+      use this, be sure dh_makeshlibs runs before dh_installdeb; many
+      old rules files have the ordering backwards.
+    - dh_installdeb now causes all files in /etc to be registered as
+      conffiles.
+    - debian/README is now supported: it is treated exactly like
+      debian/README.Debian. Either file is installed as README.Debian in
+      non-native packages, and now as just README in native packages.
+      Closes: #34628
+  * This is really only the start of the changes for v3, so use with
+    caution..
+  * dh_du has finally been removed. It has been deprecated for ages, and
+    a grep of the archive shows that nothing is using it except biss-awt
+    and scsh. I filed bugs on both almost exactly a year ago. Those bugs
+    should now be raised to severity important..
+  * --number option (to dh_installemacsen) is removed. It has been
+    deprecated for a while and nothing uses it. Use --priority instead.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 26 Nov 2000 17:51:58 -0800
+
+debhelper (2.1.28) unstable; urgency=low
+
+  * Ok, fine, I'll make debhelper depend on lynx for the one or two
+    packages that have html changelogs. But you'll be sorry...
+    Closes: #77604
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 21 Nov 2000 15:13:39 -0800
+
+debhelper (2.1.27) unstable; urgency=low
+
+  * Typo, Closes: #77441
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 19 Nov 2000 13:23:30 -0800
+
+debhelper (2.1.26) unstable; urgency=low
+
+  * Completed the fix from the last version.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 15 Nov 2000 20:39:25 -0800
+
+debhelper (2.1.25) unstable; urgency=low
+
+  * Ok, I tihnk we have a db3 fix that will really work now.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 12 Nov 2000 13:29:59 -0800
+
+debhelper (2.1.24) unstable; urgency=low
+
+  * I retract 2.1.23, the hack doesn't help make dpkg-shlibdeps work; db3
+    is broken upstream.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 12 Nov 2000 13:29:57 -0800
+
+debhelper (2.1.23) unstable; urgency=low
+
+  * dh_makeshlibs: Also scan files named "*.so*", not just "*.so.*",
+    but only if they are files. This should make it more usable with
+    rather stupidly broken libraries like db3, which do not encode the
+    major version in their filenames. However, it cannot guess the major
+    version of such libraries, so -m must be used.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 11 Nov 2000 17:24:58 -0800
+
+debhelper (2.1.22) unstable; urgency=low
+
+  * Fixed dh_perl to work with perl 5.6, Closes: #76508
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  7 Nov 2000 15:56:54 -0800
+
+debhelper (2.1.21) unstable; urgency=low
+
+  * dh_movefiles: no longer does the symlink ordering hack, as
+    this is supported by dpkg itself now. Added a dependancy on
+    dpkg-dev >= 1.7.0 to make sure this doesn't break anything.
+  * While I'm updating for dpkg 1.7.0, I removed the -ldirectory hack
+    from dh_shlibdeps; dpkg-shlibdeps has its own much more brutal hack to
+    make this work. The switch is ignored now for backwards compatability.
+  * dh_suidregister will be deprecated soon -- dpkg-statoverride is a
+    much better way.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  6 Nov 2000 15:14:49 -0800
+
+debhelper (2.1.20) unstable; urgency=low
+
+  * dh_suidregister: do not unregister on purge, since it will have already
+    been unregistered then, and a warning will result.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  5 Nov 2000 17:02:50 -0800
+
+debhelper (2.1.19) unstable; urgency=low
+
+  * dh_builddeb: Ok, it is cosmetic, but it annoyed me.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  5 Nov 2000 16:20:46 -0800
+
+debhelper (2.1.18) unstable; urgency=low
+
+  * dh_builddeb: added a --filename option to specify the output filename.
+    This is intended to be used when building .udebs for the debian
+    installer.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 28 Oct 2000 11:41:20 -0700
+
+debhelper (2.1.17) unstable; urgency=low
+
+  * dh_movefiles.1: well I thought it was quite obvious why it always used
+    debian/tmp, but it's a faq. Added some explanation. By the way, since
+    there now exists a documented way to use dh_movefiles that does not
+    have problems with empty directories that get left behind and so on, I
+    think this Closes: #17111, #51985
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 27 Oct 2000 23:07:42 -0700
+
+debhelper (2.1.16) unstable; urgency=low
+
+  * dh_movefiles: fixed a regexp quoting problem with --sourcedir. 
+    Closes: #75434
+  * Whoops, I think I overwrote bod's NMU with 2.2.15. Let's merge those
+    in:
+    .
+    debhelper (2.1.14-0.1) unstable; urgency=low
+    .
+      * Non-maintainer upload (thanks Joey).
+      * dh_installchangelogs, dh_installdocs: allow dangling symlinks for
+        $TMP/usr/share/doc/$PACKAGE (useful for multi-binary packages).
+        Closes: #53381
+    .
+    -- Brendan O'Dea <bod@debian.org>  Fri, 20 Oct 2000 18:11:59 +1100
+    .
+    I also added some documentation to debhelper.1 about this, and removed
+    the TODO entry about it.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 23 Oct 2000 15:14:49 -0700
+
+debhelper (2.1.15) unstable; urgency=low
+
+  * dh_installwm: patched a path in some backwards compatability code.
+    Closes: #75283
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 23 Oct 2000 10:13:44 -0700
+
+debhelper (2.1.14) unstable; urgency=low
+
+  * Rats, the previous change makes duplicate lines be created in the
+    shlibs file, and lintian conplains. Added some hackery that should
+    prevent that. Closes: #73052
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  3 Oct 2000 12:32:22 -0700
+
+debhelper (2.1.13) unstable; urgency=low
+
+  * Typo, Closes: #72932
+  * dh_makeshlibs: follow symlinks to files when looking for files that are
+    shared libraries. This allows it to catch files like
+    "liballeg-3.9.33.so" that are not in the *.so.* form it looks for, but
+    that doe have links to them that are in the right form. Closes: #72938
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  1 Oct 2000 18:23:48 -0700
+
+debhelper (2.1.12) unstable; urgency=low
+
+  * Rebuild to remove cvs junk, Closes: #72610
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 27 Sep 2000 12:39:06 -0700
+
+debhelper (2.1.11) unstable; urgency=low
+
+  * dh_installmanpages: don't install files that start with .#* -- these
+    are CVS files..
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 21 Sep 2000 11:58:52 -0700
+
+debhelper (2.1.10) unstable; urgency=low
+
+  * Modified to allow no spaces between control file field name and value
+    (this appears to be logal).
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 19 Sep 2000 23:13:17 -0700
+
+debhelper (2.1.9) unstable; urgency=low
+
+  * dh_installmodules: corrected the code added to maintainer scripts so it
+    does not call depmod -a. update-modules (which it always called)_
+    handles calling depmod if doing so is appropriate. Packages built with
+    proir versions probably have issues on systems with non-modular
+    kernels, and should be rebuilt. Closes: #71841
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 17 Sep 2000 14:40:45 -0700
+
+debhelper (2.1.8) unstable; urgency=low
+
+  * Fixed a stupid typo. Closes: #69750
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 22 Aug 2000 15:14:48 -0700
+
+debhelper (2.1.7) unstable; urgency=low
+
+  * debian/package.filename.arch is now checked for first, before
+    debian/package.filename. Closes: #69453
+  * Added a section to debhelper(1) about files in debian/ used by
+    debhelper, which documents this. Removed scattered references to
+    debian/filename from all over the man pages.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 20 Aug 2000 18:06:52 -0700
+
+debhelper (2.1.6) unstable; urgency=low
+
+  * dh_strip: now knows about the DEB_BUILD_OPTIONS=nostrip thing.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 20 Aug 2000 16:28:31 -0700
+
+debhelper (2.1.5) unstable; urgency=low
+
+  * dh_installxfonts: corrected a problem during package removal that was
+    silently neglecting to remove the fonts.dir/alias files.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 17 Aug 2000 00:44:25 -0700
+
+debhelper (2.1.4) unstable; urgency=low
+
+  * Whoops, I forgot to add v3 to cvs, so it was missing from a few
+    versions.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  4 Aug 2000 14:27:46 -0700
+
+debhelper (2.1.3) unstable; urgency=low
+
+  * dh_shlibdeps: if it sets LD_LIBRARY_PATH, it now prints out a line
+    showing it is doing that when in verbose mode.
+  * examples/rules.multi: don't use DH_OPTIONS hack. It's too confusing.
+    rules.multi2 still uses it, but it has comments explaining the caveats
+    of the hack.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 21 Jul 2000 13:53:02 -0700
+
+debhelper (2.1.2) unstable; urgency=low
+
+  * Minor man page updates as Overfiend struggles with debhelperizing X
+    4.0.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 21 Jul 2000 00:25:32 -0700
+
+debhelper (2.1.1) unstable; urgency=low
+
+  * Never refer to root, always uid/gid "0". Closes: #67508
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 20 Jul 2000 16:56:24 -0700
+
+debhelper (2.1.0) unstable; urgency=low
+
+  * I started work on debhelper v2 over a year ago, with a long list of
+    changes I hoped to get in that broke backwards compatability. That
+    development stalled after only the most important change was made,
+    although I did get out over 100 releases in the debhelper 2.0.x tree.
+    In the meantime, lots of packages have switched to using v2, despite my
+    warnings that doing so leaves packages open to being broken without
+    notice until v2 is complete.
+  * Therefore, I am calling v2 complete, as it is. Future non-compatabile
+    changes will happen in v3, which will be started soon. This means that
+    by using debhelper v2, one major thing changes: debhelper uses
+    debian/<package> as the temporary directory for *all* packages;
+    debian/tmp is no longer used to build binary packages out of. This is
+    very useful for multi-binary packages, and I reccommend everyone
+    switch to v2.
+  * Updated example rules files to use v2 by default.
+  * Updated all documentation to assume that v2 is being used.
+  * Added a few notes for people still using v1.
+  * Moved all of the README into debhelper(1).
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 18 Jul 2000 15:48:41 -0700
+
+debhelper (2.0.104) unstable; urgency=low
+
+  * Put dh_installogrotate in the examples, Closes: #66986
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Jul 2000 16:16:37 -0700
+
+debhelper (2.0.103) unstable; urgency=low
+
+  * Added dh_installlogrotate. Yuck, 3 l's, but I want to folow my
+    standard..
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  9 Jul 2000 00:51:03 -0700
+
+debhelper (2.0.102) unstable; urgency=low
+
+  * Documented the full list of extra files dh_clean deletes, since people
+    are for some reason adverse to using -v to find it. Closes: #66883
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  7 Jul 2000 12:40:43 -0700
+
+debhelper (2.0.101) unstable; urgency=low
+
+  * Killed the fixlinks stuff, since there are no longer any symlinks in
+    the source package.
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  5 Jul 2000 19:14:10 -0700
+
+debhelper (2.0.100) unstable; urgency=low
+
+  * Modified all postinst script fragments to only run when called with
+    "configure". I looked at the other possibilities, and I don't think any
+    of the supported stuff should be called if the postist is called for
+    error unwinds. Closes: #66673
+  * Implemented dh_clean -X, to allow specification of files to not delete,
+    Closes: #66670
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  5 Jul 2000 17:02:40 -0700
+
+debhelper (2.0.99) unstable; urgency=low
+
+  * dh_installmodules will now install modiles even if etc/modutils already
+    exists (wasn't because of a logic error). Closes: #66289
+  * dh_movefiles now uses debian/movelist, rather than just movelist. This
+    is to fix an unlikely edge case involving a symlinked debian directory.
+    Closes: #66278
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 26 Jun 2000 14:24:12 -0700
+
+debhelper (2.0.98) unstable; urgency=low
+
+  * dh_installdebconf: Automatically merge localized template
+    files. If you use this feature, you should build-depend on
+    debconf-utils to get debconf-mergetemplate.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 19 May 2000 14:24:24 -0700
+
+debhelper (2.0.97) unstable; urgency=low
+
+  * dh_installinfo: changed test to see if an info file is the head file to
+    just skip files that end in -\d+.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 11 May 2000 14:11:04 -0700
+
+debhelper (2.0.96) unstable; urgency=low
+
+  * dh_installmodules: still add depmod -a calls if run on a package that
+    has no debian/modules file, but does contain modules.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 May 2000 15:32:42 -0700
+
+debhelper (2.0.95) unstable; urgency=low
+
+  * Fixes for perl 5.6.
+  * Spelling fixes.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  1 May 2000 13:35:11 -0700
+
+debhelper (2.0.94) unstable; urgency=low
+
+  * examples/rules.multi2: binary-indep and binary-arch targets need to
+    depend on the build and install targets.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 17 Apr 2000 15:09:26 -0700
+
+debhelper (2.0.93) unstable; urgency=low
+
+  * Patch from Pedro Guerreiro to make install-docs only be called on
+    configure and remove/upgrade. Closes: #62513
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 16 Apr 2000 19:05:52 -0700
+
+debhelper (2.0.92) unstable; urgency=low
+
+  * Detect changelog parse failures and use a better error message. 
+    Closes: #62058
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  8 Apr 2000 20:02:16 -0700
+
+debhelper (2.0.91) unstable; urgency=low
+
+  * Fixed a silly typo in dh_installmanpages, Closes: #60727
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 Mar 2000 23:23:01 -0800
+
+debhelper (2.0.90) unstable; urgency=low
+
+  * Fixed dh_testversion; broken in last release.
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  4 Mar 2000 13:16:58 -0800
+
+debhelper (2.0.89) unstable; urgency=low
+
+  * Patch from Jorgen `forcer' Schaefer <forcer at mindless.com> (much
+    modified)to make dh_installwm use new window manager registration method,
+    update-alternatives. Closes: #52156, #34684 (latter bug is obsolete)
+  * Fixed $dh{flavor} to be upper-case.
+  * Deprecated dh_installemavcsen --number; use --priority instead. Also,
+    the option parser requires the parameter be a number now. And,
+    dh_installwm now accepts --priority, and window manager packages should
+    start using it.
+  * dh_installwm now behaves like a proper debhelper command, and reads
+    debian/<package>.wm too. This is a small behavior change; filenames
+    specified on the command line no longer apply to all packages it acts
+    on. I can't belive this program existed for 2 years with such a glaring
+    problem; I guess most people don't need ot register 5 wm's in 3
+    sub-packages. Anyway, it can handle such things now. :-)
+  * Moved Dh_*.pm to /usr/lib/perl5/Debian/Debhelper. *big* change.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  2 Mar 2000 11:39:56 -0800
+
+debhelper (2.0.88) unstable; urgency=low
+
+  * Copyright update: files in the examples directory are public domain.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Feb 2000 23:16:39 -0800
+
+debhelper (2.0.87) unstable; urgency=low
+
+  * Documented that lynx is used to convert html changelogs. Closes: #54055
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Feb 2000 16:01:19 -0800
+
+debhelper (2.0.86) unstable; urgency=low
+
+  * dh_testroot: don't call init(), so it may be run even if it's not in the
+    right place. Closes: #55065
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 13 Jan 2000 21:40:21 -0800
+
+debhelper (2.0.85) unstable; urgency=low
+
+  * Downgraded fileutils dependancy just a bit for the Hurd foks. 
+    Closes: #54620
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Jan 2000 16:41:29 -0800
+
+debhelper (2.0.84) unstable; urgency=low
+
+  * Make all examples rules files executable.
+  * Copyright date updates.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  6 Jan 2000 15:10:55 -0800
+
+debhelper (2.0.83) unstable; urgency=low
+
+  * Depend on the current unstable fileutils, because I have to use chown
+    --no-dereference. I'm not sure when it started working, but it didn't work
+    in slink.
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  5 Jan 2000 14:22:26 -0800
+
+debhelper (2.0.82) unstable; urgency=low
+
+  * Added dh_installmime calls to examples, Closes: #54056
+
+ -- Joey Hess <joeyh@debian.org>  Tue,  4 Jan 2000 09:35:19 -0800
+
+debhelper (2.0.81) unstable; urgency=low
+
+  * dh_installxaw: Patch from Josip Rodin to update to fhs paths, 
+    Closes: #53029
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 20 Dec 1999 12:21:34 -0800
+
+debhelper (2.0.80) unstable; urgency=low
+
+  * Type fix, Closes: #52652
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 13 Dec 1999 13:47:48 -0800
+
+debhelper (2.0.79) unstable; urgency=low
+
+  * Corrected mispellings, Closes: #52013
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  6 Dec 1999 13:46:18 -0800
+
+debhelper (2.0.78) unstable; urgency=low
+
+  * dh_fixperms: chown symlinks as well as normal files. Closes: #51169.
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  1 Dec 1999 13:34:06 -0800
+
+debhelper (2.0.77) unstable; urgency=low
+
+  * dh_suidregister: Fixed a rather esoteric bug: If a file had multiple
+    hard links, and was suid, suidregister detected all the hard links as
+    files that need to be registered. It looped, registering the first
+    link, and then removing its suid bit. This messed up the registration
+    of the other had links, since their permissions were now changed,
+    leading to unpredictable results. The fix is to just not remove suid
+    bits until all files have been registered. 
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 30 Nov 1999 00:26:42 -0800
+
+debhelper (2.0.76) unstable; urgency=low
+
+  * dh_installmanpages:
+    - Added support for translated man pages, with a patch from Kis Gergely
+      <kisg@lme.linux.hu>. Closes: #51268 
+    - Fixed the undefined value problem in Kis's patch. 
+    - This also Closes: #37092 come to think of it. 
+  * dh_shlibdeps, dh_shlibdeps.1:
+    - Added -X option, which makes it not examine some files. This is
+      useful in rare cases. Closes: #51100 
+    - Always pass "-dDepends" before the list of files, which makes it
+      easier to specify other -d parameters in the uparams, and doesn't
+      otherwise change the result at all. 
+  * doc/TODO:
+     - dh_installdebfiles is no longer a part of debhelper. This affects
+      exactly one package in unstable, biss-awt, which has had a bug filed
+      against it for 200+ days now asking that it stop using the program.
+      dh_installdebfiles has been depreacted for nearly 2 years now.. 
+  * This changelog was automatically generated from CVS commit information.
+    Fear makechangelog.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Nov 1999 21:59:00 -0800
+
+debhelper (2.0.75) unstable; urgency=low
+
+  * Fixed typo in dh_installmenu.1, Closes: #51332
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 Nov 1999 20:40:15 -0800
+
+debhelper (2.0.74) unstable; urgency=low
+
+  * dh_suidregister: Die with understandable error message if asked to
+    act on files that don't exist.
+  * dh_installchangelogs: to comply with policy, if it's told to act on a
+    html changelog, it installs it as changelog.html.gz and dumps a plain
+    text version to changelog.gz. The dumping is done with lynx. 
+    (Closes: #51099)
+  * Dh_Getopt.pm: Modified it so any options specified after -- are added to
+    U_PARAMS. This means that instead of passing '-u"something nasty"' to
+    dh_gencontrol and the like, you can pass '-- something nasty' without
+    fiddling to get the quoting right, etc.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 23 Nov 1999 11:36:15 -0800
+
+debhelper (2.0.73) unstable; urgency=low
+
+  * Actually, debhelper build-depends on perl-5.005.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Nov 1999 21:43:55 -0800
+
+debhelper (2.0.72) unstable; urgency=low
+
+  * Corrected slash substitution problem in dh_installwm.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Nov 1999 21:43:47 -0800
+
+debhelper (2.0.71) unstable; urgency=low
+
+  * Oh, the build dependancies include all of debhelper's regular
+    dependancies as well, since it builds using itself.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  5 Nov 1999 14:14:26 -0800
+
+debhelper (2.0.70) unstable; urgency=low
+
+  * Added build dependancies to this package. That was easy; it just uses
+    perl5 for regression testing, the rest of its build-deps are things
+    in base.
+  * dh_version.1: Added note that this program is quickly becoming obsolete.
+  * doc/README, doc/from-debstd: Added reminders that if you use debhelper,
+    you need to add debhelper to your Build-Depends line.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Nov 1999 21:24:37 -0800
+
+debhelper (2.0.69) unstable; urgency=low
+
+  * dh_shlibdeps: added -l option, which lets you specify a path that
+    LD_LIBRARY_PATH is then set to when dpkg-shlibdeps is run. This
+    should make it easier for library packages that also build binary
+    packages to be built with correct dependancies. Closes: #36751
+  * In honor of Burn all GIFs Day (hi Don!), I added alternative
+    image formats .png, .jpg (and .jpeg) to the list of extensions dh_compress
+    does not compress. Closes: #41733
+  * Also, made all extensions dh_compress skips be looked at case
+    insensitively.
+  * dh_movefiles: force owner and group of installed files to be root.
+    Closes: #46039
+  * Closes: #42650, #47175 -- they've been fixed forever.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Nov 1999 15:05:59 -0800
+
+debhelper (2.0.68) unstable; urgency=low
+
+  * dh_installxfonts: Patch from Anthony Wong to fix directory searching.
+    Closes: #48931
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  1 Nov 1999 14:46:04 -0800
+
+debhelper (2.0.67) unstable; urgency=low
+
+  * dh_installdebconf: Modified to use new confmodule debconf library.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 29 Oct 1999 15:24:47 -0700
+
+debhelper (2.0.66) unstable; urgency=low
+
+  * Fixed some problems with dh_installxfonts font dirs.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 28 Oct 1999 00:46:43 -0700
+
+debhelper (2.0.65) unstable; urgency=low
+
+  * dh_builddeb: -u can be passed to this command now, followed by
+    any extra parameters you want to pass to dpkg-deb (Closes: #48394)
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 26 Oct 1999 10:14:57 -0700
+
+debhelper (2.0.64) unstable; urgency=low
+
+  * Corrected a path name in dh_installxfonts. Closes: #48315
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 25 Oct 1999 14:24:03 -0700
+
+debhelper (2.0.63) unstable; urgency=low
+
+  * Removed install-stamp cruft in all example rules files. Closes: #47175
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 12 Oct 1999 14:23:09 -0700
+
+debhelper (2.0.62) unstable; urgency=low
+
+  * Fixed problem with dh_installemacsen options not working, patch from
+    Rafael Laboissiere <rafael@icp.inpg.fr>, Closes: #47738
+  * Added new dh_installxfonts script by Changwoo Ryu
+    <cwryu@dor17988.kaist.ac.kr>. Closes: #46684
+    I made some changes, though:
+    - I rewrote lots of this script to be more my style of perl.
+    - I removed all the verbisity from the postinst script fragment, since
+      that is a clear violation of policy.
+    - I made the postinst fail if the mkfontdir, etc commands fail, because
+      this really makes more sense. Consider idempotency.
+    - I moved the test to see if the font dir is really a directory into the
+      dh_ script and out of the snippet. If the maintainer plays tricks on
+      us, mkfontdir will blow up satisfactorally anyway.
+    - So, the snippet is 9 lines long now, down from 20-some.
+    - I realize this isn't following the reccommendations made in Brando^Hen's
+      font policy. I'll fight it out with him. :-)
+    - In postrm fragment, used rmdir -p to remove as many parent directories
+      as I can.
+    - s:/usr/lib/X11/:/usr/X11R6/lib/X11/:g
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 24 Oct 1999 15:30:53 -0700
+
+debhelper (2.0.61) unstable; urgency=low
+
+  * Clarified rules.multi2 comment. Closes: #46828
+
+ -- Joey Hess <joeyh@debian.org>  Sat,  9 Oct 1999 18:21:02 -0700
+
+debhelper (2.0.60) unstable; urgency=low
+
+  * dh_compress: After compressing an executable, changes the file mode to
+    644. Executable .gz files are silly. Closes: #46383
+
+ -- Joey Hess <joeyh@debian.org>  Wed,  6 Oct 1999 13:05:14 -0700
+
+debhelper (2.0.59) unstable; urgency=low
+
+  * dh_installdocs: if $TMP/usr/share/doc/$PACKAGE is a broken symlink,
+    leaves it alone, assumming that the maintainer knows what they're doing
+    and is probably linking to the doc dir of another package. 
+    (Closes: #46183)
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  4 Oct 1999 16:27:28 -0700
+
+debhelper (2.0.58) unstable; urgency=low
+
+  * Dh_Lib.pm: fixed bug in xargs() that made boundry words be skipped.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  3 Oct 1999 18:55:29 -0700
+
+debhelper (2.0.57) unstable; urgency=low
+
+  * Added note to man pages of commands that use autoscript to note they are
+    not idempotent.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  1 Oct 1999 13:18:20 -0700
+
+debhelper (2.0.56) unstable; urgency=low
+
+  * Fiddlesticks. The neat make trick I was using in rules.multi2 failed if
+    you try to build binary-indep and binary-arch targets in the same make
+    run. Make tries to be too smart. Modified the file so it will work,
+    though it's now uglier. Closes: 46287
+  * examples/*: It's important that one -not- use a install-stamp target.
+    Install should run every time binary-* calls it. Otherwise if a binary-*
+    target is called twice by hand, you get duplicate entries in the
+    maintainer script fragment files. Closes: #46313
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 30 Sep 1999 12:01:40 -0700
+
+debhelper (2.0.55) unstable; urgency=low
+
+  * Fixed quoting problem in examples/rules.multi (Closes: #46254)
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 29 Sep 1999 12:06:59 -0700
+
+debhelper (2.0.54) unstable; urgency=low
+
+  * Enhanced debconf support -- the database is now cleaned up on package
+    purge.
+  * Broke all debconf support off into a dh_installdebconf script. This
+    seems conceptually a little cleaner.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 28 Sep 1999 16:12:53 -0700
+
+debhelper (2.0.53) unstable; urgency=low
+
+  * Minor changes to rules.multi2.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Sep 1999 13:57:17 -0700
+
+debhelper (2.0.52) unstable; urgency=low
+
+  * dh_movefiles: if the wildcards in the filelist expand to nothing,
+    don't do anything, rather than crashing.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 23 Sep 1999 15:18:00 -0700
+
+debhelper (2.0.51) unstable; urgency=low
+
+  * dh_installdocs: create the compatability symlink before calling
+    install-docs. I'm told this is better in some cases. (Closes: #45608)
+  * examples/rules.multi2: clarified what you have to comment/uncomment.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 20 Sep 1999 12:43:09 -0700
+
+debhelper (2.0.50) unstable; urgency=medium
+
+  * Oops. Fixed dh_shlibdeps so it actually generates dependancies, broke in
+    last version.
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 Sep 1999 19:00:10 -0700
+
+debhelper (2.0.49) unstable; urgency=low
+
+  * dh_shlibdeps: detect statically linked binaries and don't pass them to
+    dpkg-shlibdeps.
+  * dh_installdeb: debconf support.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 17 Sep 1999 00:28:59 -0700
+
+debhelper (2.0.48) unstable; urgency=low
+
+  * 4 whole days without a debhelper upload! Can't let that happen. Let's see..
+  * dh_installperl.1: explain what you have to put in your control file
+    for the dependancies to be generated.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 16 Sep 1999 21:15:05 -0700
+
+debhelper (2.0.47) unstable; urgency=low
+
+  * dh_undocumented: installs links for X11 man pages to the undocumented.7
+    page in /usr/share/man. (Closes: #44909)
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 12 Sep 1999 13:12:34 -0700
+
+debhelper (2.0.46) unstable; urgency=low
+
+  * dh_installemacsen: the script fragments it generates now test for the
+    existance of emacs-package-install/remove before calling them. Though
+    a strict reading of the emacsen policy indicates that such a test
+    shouldn't be needed, there may be edge cases (cf bug 44924), where it
+    is.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 12 Sep 1999 12:54:37 -0700
+
+debhelper (2.0.45) unstable; urgency=low
+
+  * dh_installdocs.1: clarified how the doc-id is determined. Closes: #44864
+  * dh_makeshlibs: will now overwrite existing debian/tmp/DEBIAN/shlibs
+    files, instead of erroring out. (Closes: #44828)
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 11 Sep 1999 13:15:33 -0700
+
+debhelper (2.0.44) unstable; urgency=low
+
+  * dh_compress: fixed #ARGV bug (again) Closes: #44853
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 11 Sep 1999 13:04:15 -0700
+
+debhelper (2.0.43) unstable; urgency=low
+
+  * Corrected example rules files, which had some messed up targets.
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  9 Sep 1999 11:22:09 -0700
+
+debhelper (2.0.42) unstable; urgency=low
+
+  * dh_installinfo: failed pretty miserably if the info file's section
+    contained '/' characters. Doesn't now.
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  6 Sep 1999 16:33:13 -0700
+
+debhelper (2.0.41) unstable; urgency=low
+
+  * dh_installinfo: use FHS info dir. I wonder how I missed that..
+
+ -- Joey Hess <joeyh@debian.org>  Mon,  6 Sep 1999 13:22:08 -0700
+
+debhelper (2.0.40) unstable; urgency=low
+
+  * FHS complience. Patch from Johnie Ingram <johnie@netgod.net>.
+    For the most part, this was a straight-forward substitution,
+    dh_installmanpages needed a non-obvious change though.
+  * Closes: #42489, #42587, #41732.
+  * dh_installdocs: Adds code to postinst and prerm as specified in
+    http://www.debian.org/Lists-Archives/debian-ctte-9908/msg00038.html,
+    to make /usr/doc/<package> a compatability symlink to
+    /usr/share/doc/<package>. Note that currently if something exists in
+    /usr/doc/<package> when the postinst is run, it will silently not make
+    the symlink. I'm considering more intellingent handing of this case.
+  * Note that if you build a package with this version of debhelper, it will
+    use /usr/share/man, /usr/share/doc, and /usr/share/info. You may need to
+    modify other files in your package that reference the old locations.
+
+ -- Joey Hess <joeyh@debian.org>  Sun,  5 Sep 1999 21:06:11 -0700
+
+debhelper (2.0.30) unstable; urgency=low
+
+  * It turns out it's possible to set up make variables that are specific to
+    a single target of a Makefile. This works tremendously well with
+    DH_OPTIONS: no need to put "-i" or "-pfoo" after every debhelper command
+    anymore.
+  * debhelper.1: mentioned above technique.
+  * examples/rules.multi: use the above method to get rid of -i's and -a's.
+  * examples/rules.multi2: new file, example of a multi-binary package that
+    works for arch-indep and arch-dependant packages, and also allows
+    building of single binary packages independntly, via binary-<package>
+    targets. It accomplishes all this using only one list of debhelper
+    commands.
+  * examples/*: removed source and diff targets. They've been obsolete for 2
+    years -- or is it 3? No need for a nice error message on failure anymore.
+
+ -- Joey Hess <joeyh@debian.org>  Fri,  3 Sep 1999 11:28:24 -0700
+
+debhelper (2.0.29) unstable; urgency=low
+
+  * dh_shlibdeps: Fixed quoting problem that made it fail on weird file names.
+    Patch from Devin Carraway <debianbug-debhelper@devin.com>, Closes: #44016
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  2 Sep 1999 13:40:37 -0700
+
+debhelper (2.0.28) unstable; urgency=low
+
+  * Oops, dh_installpam was omitted from the package. Added back. 
+    Closes: #43652
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 27 Aug 1999 19:16:38 -0700
+
+debhelper (2.0.27) unstable; urgency=low
+
+  * No user visible changes. Modified the package to interface better with
+    my new local build system, which auto-updates the home page when a new
+    debhelper is built.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 26 Aug 1999 23:20:40 -0700
+
+debhelper (2.0.25) unstable; urgency=low
+
+  * Corrected debian/fixlinks to make the correct debian/* symlinks needed
+    for building debhelper.
+  * Fixed rules file to create and populate examples and docs dirs. Oops.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 25 Aug 1999 19:46:08 -0700
+
+debhelper (2.0.24) unstable; urgency=low
+
+  * dh_installdocs: Handle trailing whitespace after Document: name. 
+    Closes: #43148.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 18 Aug 1999 10:23:17 -0700
+
+debhelper (2.0.23) unstable; urgency=low
+
+  * Fixed makefile commit target.
+  * Misc changes to make CVS dirs not be copies into package.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Aug 1999 22:43:39 -0700
+
+debhelper (2.0.22) unstable; urgency=low
+
+  * Checked all of debhelper into CVS.
+  * Removed Test.pm (we have perl 5.005 now)
+  * Skip CVS dir when running tests.
+  * Since CVS is so brain dead about symlinks, added a debian/fixlinks script.
+    Modified debian/rules to make sure it's run if any of the symlinks are
+    missing. Also, made Makefile a short file that sources debian/rules so
+    it's always available.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Aug 1999 22:35:12 -0700
+
 debhelper (2.0.21) unstable; urgency=low
 
   * Wow. It turns out dh_installdocs has been doing it wrong and doc-base
@@ -5,7 +2256,7 @@ debhelper (2.0.21) unstable; urgency=low
     Peter Moulder <reiter@netspace.net.au> to make it use those id's instead
     of coming up with it's own. (Closes: #42650)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  8 Aug 1999 10:24:10 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  8 Aug 1999 10:24:10 -0700
 
 debhelper (2.0.20) unstable; urgency=low
 
@@ -13,26 +2264,26 @@ debhelper (2.0.20) unstable; urgency=low
     specification on the command line of alternate paths to search for perl
     modules. (Closes: #42171)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 30 Jul 1999 09:42:08 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 30 Jul 1999 09:42:08 -0700
 
 debhelper (2.0.19) unstable; urgency=low
 
   * dh_installinfo: fixed bug if a info file had no section.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 29 Jul 1999 11:41:11 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 29 Jul 1999 11:41:11 -0700
 
 debhelper (2.0.18) unstable; urgency=low
 
   * dh_installxaw: fixed multiple stanza problem, for real this time (patch
     misapplied last time). (Closes: #41862)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 26 Jul 1999 13:00:09 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 26 Jul 1999 13:00:09 -0700
 
 debhelper (2.0.17) unstable; urgency=low
 
   * dh_clean: compat() wasn't exported.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 21 Jul 1999 12:49:52 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed, 21 Jul 1999 12:49:52 -0700
 
 debhelper (2.0.16) unstable; urgency=low
 
@@ -41,7 +2292,7 @@ debhelper (2.0.16) unstable; urgency=low
     say, 'docs', with a temp dir of debian/docs. I don't anticipate this
     ever happenning, but it pays to be safe.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 20 Jul 1999 21:00:04 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 20 Jul 1999 21:00:04 -0700
 
 debhelper (2.0.15) unstable; urgency=low
 
@@ -49,7 +2300,7 @@ debhelper (2.0.15) unstable; urgency=low
     shouldn't remove it because we may only be acting on a single package.
     (Closes: #41689)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 20 Jul 1999 19:00:15 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 20 Jul 1999 19:00:15 -0700
 
 debhelper (2.0.14) unstable; urgency=low
 
@@ -60,26 +2311,26 @@ debhelper (2.0.14) unstable; urgency=low
   * dh_installxaw: Patch from Josip Rodin <joy@cibalia.gkvk.hr> to fix
     multiple-stanza xaw file support. (Closes: #41173)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 12 Jul 1999 11:49:57 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 12 Jul 1999 11:49:57 -0700
 
 debhelper (2.0.13) unstable; urgency=low
 
   * dh_fixperms: FHS fixes (#41058)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  9 Jul 1999 13:07:49 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  9 Jul 1999 13:07:49 -0700
 
 debhelper (2.0.12) unstable; urgency=low
 
   * dh_installinfo: fixed #SECTION# substitution.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  7 Jul 1999 17:51:59 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed,  7 Jul 1999 17:51:59 -0700
 
 debhelper (2.0.11) unstable; urgency=low
 
   * At long, long last, dh_installinfo is written. It takes a simple list of
     info files and figures out the rest for you. (Closes: #15717)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  7 Jul 1999 17:04:48 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed,  7 Jul 1999 17:04:48 -0700
 
 debhelper (2.0.10) unstable; urgency=low
 
@@ -89,7 +2340,7 @@ debhelper (2.0.10) unstable; urgency=low
     at that name.
   * dh_compress: removed the usr/share/X11R6/man bit. Note part of FHS.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  7 Jul 1999 10:46:03 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed,  7 Jul 1999 10:46:03 -0700
 
 debhelper (2.0.09) unstable; urgency=low
 
@@ -98,27 +2349,27 @@ debhelper (2.0.09) unstable; urgency=low
     decide to not have a clean transiotion), dh_compress now compresses
     various files in /usr/share/{man,doc,info}. (Closes: #40892)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  7 Jul 1999 09:55:03 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed,  7 Jul 1999 09:55:03 -0700
 
 debhelper (2.0.08) unstable; urgency=low
 
   * dh_*: redirect cd output to /den/null, because CD can actually output
     things if CDPATH is set.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  6 Jul 1999 10:14:00 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue,  6 Jul 1999 10:14:00 -0700
 
 debhelper (2.0.07) unstable; urgency=low
 
   * Added dh_perl calls to example rules files.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  4 Jul 1999 15:57:51 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  4 Jul 1999 15:57:51 -0700
 
 debhelper (2.0.06) unstable; urgency=low
 
   * Now depends on perl5 | perl, I'll kill the | perl bit later on, but it
     seems to make sense for the transition.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  4 Jul 1999 10:56:03 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  4 Jul 1999 10:56:03 -0700
 
 debhelper (2.0.05) unstable; urgency=low
 
@@ -126,7 +2377,7 @@ debhelper (2.0.05) unstable; urgency=low
     using dh_movefiles, stuff may well be left in there, and it needs to be
     cleaned up.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  3 Jul 1999 13:23:46 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat,  3 Jul 1999 13:23:46 -0700
 
 debhelper (2.0.04) unstable; urgency=low
 
@@ -134,14 +2385,14 @@ debhelper (2.0.04) unstable; urgency=low
     -d flag that makes it add a dependancy on the sppropriate perl-XXX-base
     package. Few packages will really need this. (Closes: #40631)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  2 Jul 1999 11:22:00 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  2 Jul 1999 11:22:00 -0700
 
 debhelper (2.0.03) unstable; urgency=low
 
   * Depend on file >= 2.23-1, because dh_perl uses file -b, introduced at
     that version. (Closes: #40589)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 14:41:12 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 14:41:12 -0700
 
 debhelper (2.0.02) unstable; urgency=low
 
@@ -151,13 +2402,13 @@ debhelper (2.0.02) unstable; urgency=low
     supported compatability level is specified, abort with an error. Perhaps
     there will be a debhelper v3 some day...
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 14:08:14 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 14:08:14 -0700
 
 debhelper (2.0.01) unstable; urgency=low
 
   * Actually include doc/v2 this time round.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 14:01:55 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 14:01:55 -0700
 
 debhelper (2.0.00) unstable; urgency=low
 
@@ -174,7 +2425,7 @@ debhelper (2.0.00) unstable; urgency=low
   * dh_debstd forces DH_COMPAT=1, because it needs to stay compatable with
     debstd after all.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 13:37:58 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 13:37:58 -0700
 
 debhelper (1.9.00) unstable; urgency=low
 
@@ -184,14 +2435,14 @@ debhelper (1.9.00) unstable; urgency=low
   * debhelper.1: docuimented DH_COMPAT
   * examples/*: added DH_COMAPT=1 to top of rules files
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 13:16:41 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 13:16:41 -0700
 
 debhelper (1.2.83) unstable; urgency=medium
 
   * dh_perl: fixed substvars typo. Urgency medium since a lot of people will
     be using this script RSN.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Jul 1999 11:44:05 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Jul 1999 11:44:05 -0700
 
 debhelper (1.2.82) unstable; urgency=low
 
@@ -200,21 +2451,21 @@ debhelper (1.2.82) unstable; urgency=low
     This is only useful if, like Yann, you have packages that need to install
     more than 1 init script.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 25 Jun 1999 11:38:05 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 25 Jun 1999 11:38:05 -0700
 
 debhelper (1.2.81) unstable; urgency=low
 
   * dh_link: fixed bug #40159 and added a regression test for it. It was
     failing if it was given absolute filenames.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 25 Jun 1999 10:12:44 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 25 Jun 1999 10:12:44 -0700
 
 debhelper (1.2.80) unstable; urgency=low
 
   * Changed perl version detection.
   * Changed call to find.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 24 Jun 1999 16:48:53 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 24 Jun 1999 16:48:53 -0700
 
 debhelper (1.2.79) unstable; urgency=low
 
@@ -224,20 +2475,20 @@ debhelper (1.2.79) unstable; urgency=low
   * I don't think dh_perl is going to be useful until the new version of
     perl comes out.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 24 Jun 1999 14:47:55 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 24 Jun 1999 14:47:55 -0700
 
 debhelper (1.2.78) unstable; urgency=low
 
   * Really include dh_installpam.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 15 Jun 1999 09:00:36 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 15 Jun 1999 09:00:36 -0700
 
 debhelper (1.2.77) unstable; urgency=low
 
   * dh_installpam: new program by Sean <shaleh@foo.livenet.net>
   * Wrote man page for same.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 11 Jun 1999 13:08:04 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 11 Jun 1999 13:08:04 -0700
 
 debhelper (1.2.76) unstable; urgency=low
 
@@ -246,14 +2497,14 @@ debhelper (1.2.76) unstable; urgency=low
     happyily attempt to chown a dangling symlink, which makes them fail.
     (Closes: #38911)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  7 Jun 1999 20:20:01 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Jun 1999 20:20:01 -0700
 
 debhelper (1.2.75) unstable; urgency=low
 
   * dh_installemacsen: fixed perms of install, remove scripts.
     (closes: #39082)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  7 Jun 1999 14:42:12 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Jun 1999 14:42:12 -0700
 
 debhelper (1.2.74) unstable; urgency=low
 
@@ -263,7 +2514,7 @@ debhelper (1.2.74) unstable; urgency=low
   * The previous fix to dh_installemacsen was actually quite necessary - the
     x bit was being set!
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  3 Jun 1999 15:14:27 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jun 1999 15:14:27 -0700
 
 debhelper (1.2.73) unstable; urgency=low
 
@@ -271,7 +2522,7 @@ debhelper (1.2.73) unstable; urgency=low
     necessary since dh_fixperms fixes them if you have a wacky umask, but oh
     well. (Closes: 38900)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  3 Jun 1999 14:50:42 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jun 1999 14:50:42 -0700
 
 debhelper (1.2.72) unstable; urgency=low
 
@@ -279,26 +2530,26 @@ debhelper (1.2.72) unstable; urgency=low
     debian/package.emacsen-init. The former has always been documented to
     work on the man page (closes: #38898).
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  3 Jun 1999 14:16:57 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jun 1999 14:16:57 -0700
 
 debhelper (1.2.71) unstable; urgency=low
 
   * Fixed a typo (closes: #38881)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  3 Jun 1999 13:23:23 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Jun 1999 13:23:23 -0700
 
 debhelper (1.2.70) unstable; urgency=low
 
   * dh_installmanpages: Properly quoted metacharacters in $dir in regexp.
     (#38263).
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 25 May 1999 14:12:30 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 25 May 1999 14:12:30 -0700
 
 debhelper (1.2.69) unstable; urgency=low
 
   * Don't include Test.pm in the binary package.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 23 May 1999 19:29:27 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 23 May 1999 19:29:27 -0700
 
 debhelper (1.2.68) unstable; urgency=low
 
@@ -313,78 +2564,78 @@ debhelper (1.2.68) unstable; urgency=low
   * dh_installchangelogs: force all installed files to be owned by root
     (#37655).
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 16 May 1999 17:18:44 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 16 May 1999 17:18:44 -0700
 
 debhelper (1.2.67) unstable; urgency=low
 
   * dh_installmodules: fixed type that made the program not work.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 12 May 1999 00:25:05 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed, 12 May 1999 00:25:05 -0700
 
 debhelper (1.2.66) unstable; urgency=low
 
   * examples/rules.multi: dh_shlibdeps must be run before dh_gencontrol
     (#37346)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  9 May 1999 14:03:05 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  9 May 1999 14:03:05 -0700
 
 debhelper (1.2.65) unstable; urgency=low
 
   * Added to docs.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  6 May 1999 21:46:03 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  6 May 1999 21:46:03 -0700
 
 debhelper (1.2.64) unstable; urgency=low
 
   * dh_installmime: new command (#37093, #32684).
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  3 May 1999 13:37:34 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  3 May 1999 13:37:34 -0700
 
 debhelper (1.2.63) unstable; urgency=low
 
   * dh_installxaw: updated to work with xaw-wrappers 0.90 and above. It
     actually has to partially parse the xaw-wrappers config files now. 
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  2 May 1999 19:13:34 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  2 May 1999 19:13:34 -0700
 
 debhelper (1.2.62) unstable; urgency=low
 
   * dh_installemacsen: added support for site-start files. Added --flavor
     and --number to control details of installation. (#36832)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  2 May 1999 15:31:58 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  2 May 1999 15:31:58 -0700
 
 debhelper (1.2.61) unstable; urgency=low
 
   * dh_md5sums.1: dh_md5sums is not deprecated, AFAIK, but the manpage has
     somehow been modified to say it was at version 1.2.45.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 26 Apr 1999 19:54:04 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 26 Apr 1999 19:54:04 -0700
 
 debhelper (1.2.60) unstable; urgency=low
 
   * dh_installexamples.1: recycled docs fix.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 26 Apr 1999 17:19:07 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 26 Apr 1999 17:19:07 -0700
 
 debhelper (1.2.59) unstable; urgency=low
 
   * dh_builddeb: added --destdir option, which lets you tell it where
     to put the generated .deb's. Default is .. of course.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 22 Apr 1999 22:02:01 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 22 Apr 1999 22:02:01 -0700
 
 debhelper (1.2.58) unstable; urgency=low
 
   * autoscripts/postinst-suid: use /#FILE# in elif test (#36297).
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 18 Apr 1999 22:33:52 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 18 Apr 1999 22:33:52 -0700
 
 debhelper (1.2.57) unstable; urgency=low
 
   * examples/*: killed trailing spaces after diff: target
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 12 Apr 1999 22:02:32 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 12 Apr 1999 22:02:32 -0700
 
 debhelper (1.2.56) unstable; urgency=low
 
@@ -392,7 +2643,7 @@ debhelper (1.2.56) unstable; urgency=low
     exists. This is useful if you have conffiles that have permissions and
     may be deleted. (#35845)
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 10 Apr 1999 13:35:23 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat, 10 Apr 1999 13:35:23 -0700
 
 debhelper (1.2.55) unstable; urgency=low
 
@@ -400,7 +2651,7 @@ debhelper (1.2.55) unstable; urgency=low
   * dh_md5sums: supports -X to make it skip including files in the
     md5sums (#35819).
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  9 Apr 1999 18:21:58 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  9 Apr 1999 18:21:58 -0700
 
 debhelper (1.2.54) unstable; urgency=low
 
@@ -408,7 +2659,7 @@ debhelper (1.2.54) unstable; urgency=low
   * *.1: the date of each man page is now automatically updated when 
     debhelper is built to be the last modification time of the man page.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  8 Apr 1999 20:28:00 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  8 Apr 1999 20:28:00 -0700
 
 debhelper (1.2.53) unstable; urgency=low
 
@@ -421,25 +2672,25 @@ debhelper (1.2.53) unstable; urgency=low
     suggested starting point if you want to write your own debian/compress
     file.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  7 Apr 1999 02:20:14 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed,  7 Apr 1999 02:20:14 -0700
 
 debhelper (1.2.52) unstable; urgency=low
 
   * dh_installmodules: new program, closes #32546.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Apr 1999 17:25:37 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Apr 1999 17:25:37 -0800
 
 debhelper (1.2.51) unstable; urgency=low
 
   * Another very minor typo fix.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  1 Apr 1999 14:04:02 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu,  1 Apr 1999 14:04:02 -0800
 
 debhelper (1.2.50) unstable; urgency=low
 
   * Very minor typo fix.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 26 Mar 1999 17:27:01 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 26 Mar 1999 17:27:01 -0800
 
 debhelper (1.2.49) unstable; urgency=low
 
@@ -447,13 +2698,13 @@ debhelper (1.2.49) unstable; urgency=low
     even symlinks. This could have even caused it to follow the symlinks and
     modify files on the build system in some cases. Ignores them now. (#35102)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 24 Mar 1999 13:21:49 -0800
+ -- Joey Hess <joeyh@debian.org>  Wed, 24 Mar 1999 13:21:49 -0800
 
 debhelper (1.2.48) unstable; urgency=low
 
   * dh_fixperms.1: improved documentation. (#34968)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 23 Mar 1999 19:11:01 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 23 Mar 1999 19:11:01 -0800
 
 debhelper (1.2.47) unstable; urgency=low
 
@@ -461,13 +2712,13 @@ debhelper (1.2.47) unstable; urgency=low
     fragments inside a perl program -- the old method didn't work with shell
     variables properly (#34850).
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 21 Mar 1999 13:25:33 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 21 Mar 1999 13:25:33 -0800
 
 debhelper (1.2.46) unstable; urgency=low
 
   * doc/README: pointer to maint-guide.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 18 Mar 1999 21:04:57 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 18 Mar 1999 21:04:57 -0800
 
 debhelper (1.2.45) unstable; urgency=low
 
@@ -475,13 +2726,13 @@ debhelper (1.2.45) unstable; urgency=low
   * debhelper.1: list all other debhelper commands with synopses
     (automatically generated by build process).
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 14 Mar 1999 11:33:39 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 14 Mar 1999 11:33:39 -0800
 
 debhelper (1.2.44) unstable; urgency=medium
 
   * dh_fixperms: has been mostly broken when used with -X, corrected this.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 13 Mar 1999 17:25:59 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 13 Mar 1999 17:25:59 -0800
 
 debhelper (1.2.43) unstable; urgency=low
 
@@ -491,39 +2742,39 @@ debhelper (1.2.43) unstable; urgency=low
     (Closes: #33860)
   * Dh_Lib.pm: added xargs() command.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  9 Mar 1999 14:57:09 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue,  9 Mar 1999 14:57:09 -0800
 
 debhelper (1.2.42) unstable; urgency=low
 
   * dh_m5sums: don't generate bogus md5sums file if the package contains no
     files. Yes, someone found a legitimate reason to do that.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 25 Feb 1999 00:03:47 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 25 Feb 1999 00:03:47 -0800
 
 debhelper (1.2.41) unstable; urgency=low
 
   * README: minor typo fix.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 20 Feb 1999 23:30:00 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 20 Feb 1999 23:30:00 -0800
 
 debhelper (1.2.40) unstable; urgency=low
 
   * Let's just say 1.2.39 is not a good version of debhelper to use and
     leave it at that. :-)
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 20 Feb 1999 22:55:27 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 20 Feb 1999 22:55:27 -0800
 
 debhelper (1.2.39) unstable; urgency=low
 
   * dh_installcron: install files in cron.d with correct perms.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 20 Feb 1999 22:28:38 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 20 Feb 1999 22:28:38 -0800
 
 debhelper (1.2.38) unstable; urgency=low
 
   * dh_clean: don't try to delete directories named "core".
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 20 Feb 1999 19:13:40 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 20 Feb 1999 19:13:40 -0800
 
 debhelper (1.2.37) unstable; urgency=low
 
@@ -532,21 +2783,21 @@ debhelper (1.2.37) unstable; urgency=low
     <Daniel.Martin@jhu.edu>, handles xaw-wrappers integration.
   * dh_installxaw.1: wrote man page.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 18 Feb 1999 17:32:53 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 18 Feb 1999 17:32:53 -0800
 
 debhelper (1.2.36) unstable; urgency=low
 
   * dh_compress.1: Fixed typo in man page. (Closes: #33364)
   * autoscripts/postinst-menu-method: fixed typo. (Closes: #33376)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 14 Feb 1999 13:45:18 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 14 Feb 1999 13:45:18 -0800
 
 debhelper (1.2.35) unstable; urgency=low
 
   * Dh_Lib.pm filearray(): Deal with multiple spaces and spaces at the 
     beginning of lines in files. (closes: #33161)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  9 Feb 1999 21:01:07 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue,  9 Feb 1999 21:01:07 -0800
 
 debhelper (1.2.34) unstable; urgency=low
 
@@ -556,7 +2807,7 @@ debhelper (1.2.34) unstable; urgency=low
     will now look for debian/<package>.doc-base.<doc-id>.
   * dh_compress: removed warning message (harmless).
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  6 Feb 1999 17:48:33 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat,  6 Feb 1999 17:48:33 -0800
 
 debhelper (1.2.33) unstable; urgency=low
 
@@ -565,7 +2816,7 @@ debhelper (1.2.33) unstable; urgency=low
     dh_compress fail on multi-binary packages that had harlinks. Thanks to
     Craig Small for spotting this.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  4 Feb 1999 20:19:37 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Feb 1999 20:19:37 -0800
 
 debhelper (1.2.32) unstable; urgency=low
 
@@ -573,20 +2824,20 @@ debhelper (1.2.32) unstable; urgency=low
     the uid or gid, it will pass the uid or gid to suidmanager. This should
     probably never happen, but it's good to be safe.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  4 Feb 1999 16:00:35 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Feb 1999 16:00:35 -0800
 
 debhelper (1.2.31) unstable; urgency=low
 
   * dh_installinit.1: minor typo fix (closes: #32753)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  2 Feb 1999 14:32:46 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue,  2 Feb 1999 14:32:46 -0800
 
 debhelper (1.2.30) unstable; urgency=low
 
   * dh_fixperms: cut down the number of chmod commands that are executed
     from 3 to 1, no change in functionality.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  1 Feb 1999 17:05:29 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  1 Feb 1999 17:05:29 -0800
 
 debhelper (1.2.29) unstable; urgency=high
 
@@ -594,27 +2845,27 @@ debhelper (1.2.29) unstable; urgency=high
     These were acidentially left in after dh_link testing I did as I was
     working on the last version of debhelper.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 25 Jan 1999 20:26:46 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 25 Jan 1999 20:26:46 -0800
 
 debhelper (1.2.28) unstable; urgency=low
 
   * dh_link: fixed bug that prevent multiple links to the same source from
     being made. (#23255)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 24 Jan 1999 19:46:33 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 24 Jan 1999 19:46:33 -0800
 
 debhelper (1.2.27) unstable; urgency=low
 
   * autoscripts/*menu*: "test", not "text"!
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 19 Jan 1999 15:18:52 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 19 Jan 1999 15:18:52 -0800
 
 debhelper (1.2.26) unstable; urgency=low
 
   * dh_installdocs: use prerm-doc-base script fragement. Was using
     postrm-doc-base, for some weird reason.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 18 Jan 1999 13:36:40 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 18 Jan 1999 13:36:40 -0800
 
 debhelper (1.2.25) unstable; urgency=low
 
@@ -624,7 +2875,7 @@ debhelper (1.2.25) unstable; urgency=low
     postinsts that use command fail. Reverted to using test -x. Packages
     built with debhelper >= 1.2.21 that use menus should be rebuilt.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 16 Jan 1999 13:47:16 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 16 Jan 1999 13:47:16 -0800
 
 debhelper (1.2.24) unstable; urgency=low
 
@@ -640,19 +2891,19 @@ debhelper (1.2.24) unstable; urgency=low
   * dh_fixperms.1: cleaned up the docs to mention that those bits are
     cleared.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 15 Jan 1999 16:54:44 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 15 Jan 1999 16:54:44 -0800
 
 debhelper (1.2.23) unstable; urgency=low
 
   * autoscripts/postrm-wm: use "=", not "==" (#31727).
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 11 Jan 1999 13:35:00 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 11 Jan 1999 13:35:00 -0800
 
 debhelper (1.2.22) unstable; urgency=low
 
   * Reversed change in last version; don't clobber mode (#31628).
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  8 Jan 1999 15:01:25 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri,  8 Jan 1999 15:01:25 -0800
 
 debhelper (1.2.21) unstable; urgency=low
 
@@ -666,14 +2917,14 @@ debhelper (1.2.21) unstable; urgency=low
   * autoscripts/*: instead of "text -x", use "command -v" to see if various
     binaries exist. This gets rid of lots of hard-coded paths.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 30 Dec 1998 22:50:04 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 30 Dec 1998 22:50:04 -0500
 
 debhelper (1.2.20) unstable; urgency=low
 
   * dh_compress: handle the hard link stuff properly, it was broken. Also
     faster now.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 23 Dec 1998 19:53:03 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 23 Dec 1998 19:53:03 -0500
 
 debhelper (1.2.19) unstable; urgency=low
 
@@ -686,14 +2937,14 @@ debhelper (1.2.19) unstable; urgency=low
     When possible, will only compress one file, delete the hardlinks, and
     re-make hardlinks to the compressed file, saving some disk space.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 18 Dec 1998 22:26:41 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri, 18 Dec 1998 22:26:41 -0500
 
 debhelper (1.2.18) unstable; urgency=medium
 
   * dh_fixperms: was not fixing permissions of files in usr/doc/ to 644,
     this has been broken since version 1.2.3.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  6 Dec 1998 23:35:35 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun,  6 Dec 1998 23:35:35 -0800
 
 debhelper (1.2.17) unstable; urgency=low
 
@@ -703,7 +2954,7 @@ debhelper (1.2.17) unstable; urgency=low
   * dh_movefiles: added --sourcedir option to make it move files out of 
     some directory besides debian/tmp (#30221)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  4 Dec 1998 13:56:57 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri,  4 Dec 1998 13:56:57 -0800
 
 debhelper (1.2.16) unstable; urgency=low
 
@@ -717,13 +2968,13 @@ debhelper (1.2.16) unstable; urgency=low
     dh_fixperms, and that's the only time this behavior change will have any
     effect, either. (#30118)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  3 Dec 1998 23:31:56 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu,  3 Dec 1998 23:31:56 -0800
 
 debhelper (1.2.15) unstable; urgency=low
 
   * Just a re-upload, last upload failed for some obscure reason.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 29 Nov 1998 13:07:44 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 29 Nov 1998 13:07:44 -0800
 
 debhelper (1.2.14) unstable; urgency=low
 
@@ -731,13 +2982,13 @@ debhelper (1.2.14) unstable; urgency=low
     dh_makeshlibs come before dh_shlibdeps, so the files it generates can
     also be used as a shlibs.local file, which will be used by dh_shlibdeps.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 29 Oct 1998 04:00:14 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 29 Oct 1998 04:00:14 -0800
 
 debhelper (1.2.13) unstable; urgency=low
 
   * Spelling and typo fixes.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 25 Nov 1998 15:23:55 -0800
+ -- Joey Hess <joeyh@debian.org>  Wed, 25 Nov 1998 15:23:55 -0800
 
 debhelper (1.2.12) unstable; urgency=low
 
@@ -747,7 +2998,7 @@ debhelper (1.2.12) unstable; urgency=low
   * dh_suidregister: use names instead of uid's and gid's, at request of
     suidregister maintainer (#29802).
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 21 Nov 1998 13:13:10 -0800
+ -- Joey Hess <joeyh@debian.org>  Sat, 21 Nov 1998 13:13:10 -0800
 
 debhelper (1.2.11) unstable; urgency=low
 
@@ -755,38 +3006,38 @@ debhelper (1.2.11) unstable; urgency=low
     *wrong*), it will move relative files anyway. Related to bug #29761.
   * dh_link: made relative links work right. (I hope!)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 20 Nov 1998 20:21:51 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 20 Nov 1998 20:21:51 -0800
 
 debhelper (1.2.10) unstable; urgency=low
 
   * examples/*: added dh_link calls to example rules files.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 20 Nov 1998 15:43:07 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 20 Nov 1998 15:43:07 -0800
 
 debhelper (1.2.9) unstable; urgency=low
 
   * Added dh_link, which generates policy complient symlinks in binary
     packages, painlessly.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 19 Nov 1998 18:43:36 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 19 Nov 1998 18:43:36 -0800
 
 debhelper (1.2.8) unstable; urgency=low
 
   * Suggest dh-make (#29376).
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 18 Nov 1998 02:29:47 -0800
+ -- Joey Hess <joeyh@debian.org>  Wed, 18 Nov 1998 02:29:47 -0800
 
 debhelper (1.2.7) unstable; urgency=low
 
   * dh_movefiles: Fixed another bug.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 16 Nov 1998 12:53:05 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Nov 1998 12:53:05 -0800
 
 debhelper (1.2.6) unstable; urgency=low
 
   * dh_movefiles: fixed non-integer comparison (#29476)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 15 Nov 1998 13:03:09 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 15 Nov 1998 13:03:09 -0800
 
 debhelper (1.2.5) unstable; urgency=low
 
@@ -799,7 +3050,7 @@ debhelper (1.2.5) unstable; urgency=low
   * doc/PROGRAMMING: removed all documentation of the old shell library
     interface.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 13 Nov 1998 15:36:57 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 13 Nov 1998 15:36:57 -0800
 
 debhelper (1.2.4) unstable; urgency=low
 
@@ -808,7 +3059,7 @@ debhelper (1.2.4) unstable; urgency=low
   * dh_installinit: fixed minor perl -w warning.
   * Only 1 shell script remains! (But it's a doozy..)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 13 Nov 1998 13:29:39 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri, 13 Nov 1998 13:29:39 -0800
 
 debhelper (1.2.3) unstable; urgency=low
 
@@ -820,7 +3071,7 @@ debhelper (1.2.3) unstable; urgency=low
   * Only 3 more to go and it'll be 100% perl.
   * Made $dh{EXCLUDE_FIND} available to perl scripts.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 10 Nov 1998 15:47:43 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 10 Nov 1998 15:47:43 -0800
 
 debhelper (1.2.2) unstable; urgency=low
 
@@ -828,13 +3079,13 @@ debhelper (1.2.2) unstable; urgency=low
   * dh_undocumented: shortened the symlink used for section 7 undocumented
     man pages, since it can link to undocuemented.7.gz in the same directory.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 10 Nov 1998 13:40:22 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 10 Nov 1998 13:40:22 -0800
 
 debhelper (1.2.1) unstable; urgency=low
 
   * dh_strip, dh_installinit: rewrite in perl.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  9 Nov 1998 20:04:12 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Nov 1998 20:04:12 -0800
 
 debhelper (1.2.0) unstable; urgency=low
 
@@ -842,10 +3093,10 @@ debhelper (1.2.0) unstable; urgency=low
     perl.. Since 1.1 has actually stabalized, I've upped this to 1.2.
   * dh_md5sums: rewritten in perl, for large speed gain under some
     circumstances (old version called perl sometimes, once per package.)
-  * dh_installmenu, dh_installwmacsen, dh_installwm: perlized.
+  * dh_installmenu, dh_installemacsen, dh_installwm: perlized.
   * Dh_Lib.pm: made autoscript() really work.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  9 Nov 1998 13:04:16 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Nov 1998 13:04:16 -0800
 
 debhelper (1.1.24) unstable; urgency=low
 
@@ -855,14 +3106,14 @@ debhelper (1.1.24) unstable; urgency=low
     will create a window where it is suid before suidmanager fixes it's
     permissions. This change should be transparent to users and developers.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 27 Oct 1998 18:19:48 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 27 Oct 1998 18:19:48 -0800
 
 debhelper (1.1.23) unstable; urgency=low
 
   * dh_clean: At the suggestion of James Troup <james@nocrew.org> now deletes
     files named *.P in .deps/ subdirectories. They are generated by automake.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 24 Oct 1998 15:14:53 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat, 24 Oct 1998 15:14:53 -0700
 
 debhelper (1.1.22) unstable; urgency=low
 
@@ -876,13 +3127,13 @@ debhelper (1.1.22) unstable; urgency=low
     your wm is installed before a xbase that supports register-window-manager
     is installed, the window manager will never be registered. (#20971)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 14 Oct 1998 23:08:04 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed, 14 Oct 1998 23:08:04 -0700
 
 debhelper (1.1.21) unstable; urgency=low
 
   * Added install to .PHONY target of example rules files.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 11 Oct 1998 22:36:10 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 11 Oct 1998 22:36:10 -0700
 
 debhelper (1.1.20) unstable; urgency=low
 
@@ -892,21 +3143,21 @@ debhelper (1.1.20) unstable; urgency=low
   * Modified dh_installinit -r so it does start the daemon on the initial
     install (#26680).
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  2 Oct 1998 15:55:13 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  2 Oct 1998 15:55:13 -0700
 
 debhelper (1.1.19) unstable; urgency=low
 
   * dh_installmanpages: look at basename of man pacges specified on command
     line to skip, for backwards compatability. 
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 10 Sep 1998 11:31:42 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 10 Sep 1998 11:31:42 -0700
 
 debhelper (1.1.18) unstable; urgency=low
 
   * dh_installemacsen: substitute package name for #PACKAGE# when setting
     up postinst and prerm (#26560).
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  8 Sep 1998 14:24:30 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue,  8 Sep 1998 14:24:30 -0700
 
 debhelper (1.1.17) unstable; urgency=low
 
@@ -921,14 +3172,14 @@ debhelper (1.1.17) unstable; urgency=low
   * Made -N properly exclude packages when no -i, -a, or -p flags are
     present. It didn't before, which was a bug.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  7 Sep 1998 17:33:19 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  7 Sep 1998 17:33:19 -0700
 
 debhelper (1.1.16) unstable; urgency=low
 
   * dh_fixperms: remove execute bits from static libraries as well as 
     shared libraries. (#26414)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  4 Sep 1998 14:46:37 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  4 Sep 1998 14:46:37 -0700
 
 debhelper (1.1.15) unstable; urgency=medium
 
@@ -937,7 +3188,7 @@ debhelper (1.1.15) unstable; urgency=medium
   * dh_installmanpages: the code to exclude searching for man pages in
     debian/tmp directories was broken. Fixed.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 31 Aug 1998 00:05:17 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 31 Aug 1998 00:05:17 -0700
 
 debhelper (1.1.14) unstable; urgency=low
 
@@ -951,14 +3202,14 @@ debhelper (1.1.14) unstable; urgency=low
     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:15:44 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 30 Aug 1998 22:15:44 -0700
 
 debhelper (1.1.13) unstable; urgency=low
 
   * dh_installmanpages: rewritten in perl. Allows me to fix bug #26221 (long
     symlink problem after .so conversion), and is about twice as fast.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 29 Aug 1998 22:06:06 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat, 29 Aug 1998 22:06:06 -0700
 
 debhelper (1.1.12) unstable; urgency=low
 
@@ -967,14 +3218,14 @@ debhelper (1.1.12) unstable; urgency=low
     wrong name, and debhelper would warn of undefined values for some
     packages. Fixed.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 27 Aug 1998 12:35:42 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 27 Aug 1998 12:35:42 -0700
 
 debhelper (1.1.11) unstable; urgency=low
 
   * dh_installchangelogs: added -k flag, that will make it install a symlink
     to the original name of the upstream changelog.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 20 Aug 1998 15:40:40 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 20 Aug 1998 15:40:40 -0700
 
 debhelper (1.1.10) unstable; urgency=low
 
@@ -992,14 +3243,14 @@ debhelper (1.1.10) unstable; urgency=low
     doesn't have to be generated when a new version of debhelper is built.
   * Removed bogus menu file.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 17 Aug 1998 14:15:17 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 17 Aug 1998 14:15:17 -0700
 
 debhelper (1.1.9) unstable; urgency=low
 
   * dh_fixperms: has been removing the +x bits of all doc/*/examples/* files
     since version 0.97 or so. Fixed.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 16 Aug 1998 17:11:48 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 16 Aug 1998 17:11:48 -0700
 
 debhelper (1.1.8) unstable; urgency=low
 
@@ -1011,7 +3262,7 @@ debhelper (1.1.8) unstable; urgency=low
     --update-rcd-params was equivilant to -u for this program. You should
     really use --dpkg-gencontrol-params.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 14 Aug 1998 14:07:35 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 14 Aug 1998 14:07:35 -0700
 
 debhelper (1.1.7) unstable; urgency=low
 
@@ -1021,14 +3272,14 @@ debhelper (1.1.7) unstable; urgency=low
     characters recognized by bash (and ksh). Thanks to Branden Robinson
     <branden@purdue.edu> for looking that up.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 11 Aug 1998 23:32:05 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 11 Aug 1998 23:32:05 -0700
 
 debhelper (1.1.6) unstable; urgency=low
 
   * dh_movefiles: don't die on symlinks (#25642). (Hope I got the fix right
     this time..)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 11 Aug 1998 20:11:13 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 11 Aug 1998 20:11:13 -0700
 
 debhelper (1.1.5) unstable; urgency=low
 
@@ -1043,7 +3294,7 @@ debhelper (1.1.5) unstable; urgency=low
   * dh_installdebfiles: it's been broken forever, I fixed it. Obviously
     nobody uses it anymore, which is good, since it's deprected :-)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 11 Aug 1998 15:23:34 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 11 Aug 1998 15:23:34 -0700
 
 debhelper (1.1.4) unstable; urgency=low
 
@@ -1063,7 +3314,7 @@ debhelper (1.1.4) unstable; urgency=low
     passed any switches.
   * Dh_Getopt.pm: --noscripts was broken.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 11 Aug 1998 12:44:04 -0700
+ -- Joey Hess <joeyh@debian.org>  Tue, 11 Aug 1998 12:44:04 -0700
 
 debhelper (1.1.3) unstable; urgency=low
 
@@ -1078,7 +3329,7 @@ debhelper (1.1.3) unstable; urgency=low
   * dh_installdocs: fixed a bug that installed TODO files mode 655 in native
     debian packages.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 10 Aug 1998 15:01:15 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Aug 1998 15:01:15 -0700
 
 debhelper (1.1.2) unstable; urgency=low
 
@@ -1088,7 +3339,7 @@ debhelper (1.1.2) unstable; urgency=low
   * Preliminary thoughts in TODO about converting entire debhelper programs
     to perl programs.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 10 Aug 1998 13:35:17 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Aug 1998 13:35:17 -0700
 
 debhelper (1.1.1) unstable; urgency=low
 
@@ -1099,7 +3350,7 @@ debhelper (1.1.1) unstable; urgency=low
     additional files to be compressed in the first package acted on.
   * dh_compress: recognize standard -A parameter.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  8 Aug 1998 22:48:01 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat,  8 Aug 1998 22:48:01 -0700
 
 debhelper (1.1.0) unstable; urgency=low
 
@@ -1115,7 +3366,7 @@ debhelper (1.1.0) unstable; urgency=low
   * dh_*: -N option now excludes a package from the list of packages the 
     programs act on. (#25247)
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  8 Aug 1998 17:49:56 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat,  8 Aug 1998 17:49:56 -0700
 
 debhelper (1.0) stable unstable; urgency=low
 
@@ -1129,34 +3380,34 @@ debhelper (1.0) stable unstable; urgency=low
     bug reports, and of course introduce many new bugs, and which will go
     into unstable only.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  8 Aug 1998 17:33:20 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat,  8 Aug 1998 17:33:20 -0700
 
 debhelper (0.99.4) unstable; urgency=low
 
   * dh_debstd: only warn about scripts that actually lack #DEBHELPER#.
     (#25514)
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  7 Aug 1998 12:06:28 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri,  7 Aug 1998 12:06:28 -0700
 
 debhelper (0.99.3) unstable; urgency=low
 
   * dh_movefiles: Fixed a over-eager sanity check introduced in the last
     version.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  3 Aug 1998 18:31:45 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  3 Aug 1998 18:31:45 -0700
 
 debhelper (0.99.2) unstable; urgency=low
 
   * dh_movefiles: allow passing of files to move on the command line. Only
     rarely does this make sense. (#25197)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 30 Jul 1998 10:38:34 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 30 Jul 1998 10:38:34 -0700
 
 debhelper (0.99.1) unstable; urgency=low
 
   * dh_installcron: now supports /etc/cron.d (#25112).
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 27 Jul 1998 20:18:47 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Jul 1998 20:18:47 -0700
 
 debhelper (0.99) unstable; urgency=low
 
@@ -1168,7 +3419,7 @@ debhelper (0.99) unstable; urgency=low
     package by accident.
   * Is version 1.0 next?
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 16 Jul 1998 10:03:21 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu, 16 Jul 1998 10:03:21 -0700
 
 debhelper (0.98) unstable; urgency=low
 
@@ -1176,7 +3427,7 @@ debhelper (0.98) unstable; urgency=low
     odd packages with multiple different debian changelogs.
   * doc/PROGRAMMING: cleaned up the docs on DH_EXCLUDE_FIND.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  6 Jul 1998 12:45:13 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon,  6 Jul 1998 12:45:13 -0700
 
 debhelper (0.97) unstable; urgency=low
 
@@ -1190,7 +3441,7 @@ debhelper (0.97) unstable; urgency=low
   * dh_getopt.pl, doc/PROGRAMMING: added DH_EXCLUDE_FIND, to make the above
     fix work.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  5 Jul 1998 18:09:25 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun,  5 Jul 1998 18:09:25 -0700
 
 debhelper (0.96) unstable; urgency=low
 
@@ -1198,14 +3449,14 @@ debhelper (0.96) unstable; urgency=low
   * dh_movefiles: really order all symlinks last.
   * some minor reorganization of the source tree.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 28 Jun 1998 21:53:45 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Jun 1998 21:53:45 -0700
 
 debhelper (0.95) unstable; urgency=low
 
   * dh_movefiles: move even very strangly named files. (#23775) Unfortunatly,
     I had to use a temporary file. Oh well..
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 22 Jun 1998 17:16:17 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Jun 1998 17:16:17 -0700
 
 debhelper (0.94) unstable; urgency=low
 
@@ -1214,13 +3465,13 @@ debhelper (0.94) unstable; urgency=low
   * As a side effect, got rid of the nasty temporary file dh_md5sums used
     before.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 22 Jun 1998 16:14:42 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Jun 1998 16:14:42 -0700
 
 debhelper (0.93) unstable; urgency=low
 
   * Depend on file, since several dh_*'s use it.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 19 Jun 1998 21:43:51 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 19 Jun 1998 21:43:51 -0700
 
 debhelper (0.92) unstable; urgency=low
 
@@ -1229,13 +3480,13 @@ debhelper (0.92) unstable; urgency=low
     a consensus was reached on debian-devel that it was a good thing for
     -isp to be used.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 19 Jun 1998 16:15:24 -0700
+ -- Joey Hess <joeyh@debian.org>  Fri, 19 Jun 1998 16:15:24 -0700
 
 debhelper (0.91) unstable; urgency=low
 
   * dh_installdocs: support debian/<package>.{README.Debian,TODO}
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 17 Jun 1998 19:09:35 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed, 17 Jun 1998 19:09:35 -0700
 
 debhelper (0.90) unstable; urgency=low
 
@@ -1268,7 +3519,7 @@ debhelper (0.90) unstable; urgency=low
   * dh_compress, dh_installdirs: always cd into $TMP and back out, even if
     --no-act is on. (#23054)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  1 Jun 1998 21:57:45 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon,  1 Jun 1998 21:57:45 -0400
 
 debhelper (0.88) unstable; urgency=low
 
@@ -1280,7 +3531,7 @@ debhelper (0.88) unstable; urgency=low
   * PROGRAMMING, dh_getopt.pl: DH_EXCLUDE is now a variable set by the
     --exclude (-X) switch. -x now sets DH_INCLUDE_CONFFILES.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 17 May 1998 11:26:09 -0700
+ -- Joey Hess <joeyh@debian.org>  Sun, 17 May 1998 11:26:09 -0700
 
 debhelper (0.87) unstable; urgency=low
 
@@ -1288,14 +3539,14 @@ debhelper (0.87) unstable; urgency=low
     elf binaries. This makes for smaller output files. This has always been
     broken in debhelper before! (#22395)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 13 May 1998 11:54:29 -0700
+ -- Joey Hess <joeyh@debian.org>  Wed, 13 May 1998 11:54:29 -0700
 
 debhelper (0.86) unstable; urgency=low
 
   * dh_compress: don't try to re-compress *.gz files. Eliminates warning
     messages in some cases, shouldn't actually change the result at all.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 27 Apr 1998 15:21:33 -0700
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Apr 1998 15:21:33 -0700
 
 debhelper (0.85) unstable; urgency=low
 
@@ -1308,14 +3559,14 @@ debhelper (0.85) unstable; urgency=low
   * So be warned that the example rules files are not currently in good
     shape if you're starting a new package.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 18 Apr 1998 23:30:38 -0700
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 Apr 1998 23:30:38 -0700
 
 debhelper (0.84) unstable; urgency=low
 
   * Applied Che_Fox'x patches to example rules files, which makes them use
     an install target internally to move things into place in debian/tmp.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  9 Apr 1998 12:08:45 -0700
+ -- Joey Hess <joeyh@debian.org>  Thu,  9 Apr 1998 12:08:45 -0700
 
 debhelper (0.83) unstable; urgency=low
 
@@ -1323,13 +3574,13 @@ debhelper (0.83) unstable; urgency=low
     properly. Note that version 0.80 and 0.81 could not build some packages
     because of missing symlinks.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 31 Mar 1998 19:27:29 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 31 Mar 1998 19:27:29 -0800
 
 debhelper (0.81) unstable; urgency=low
 
   * dh_movefiles: empty $tomove (#20495).
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 31 Mar 1998 15:36:32 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 31 Mar 1998 15:36:32 -0800
 
 debhelper (0.80) unstable; urgency=low
 
@@ -1343,7 +3594,7 @@ debhelper (0.80) unstable; urgency=low
   * dh_gencontrol: if debian/package.changelogs files exist, use them.
   * Above 2 changes close #20442.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 30 Mar 1998 20:54:26 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 30 Mar 1998 20:54:26 -0800
 
 debhelper (0.78) frozen unstable; urgency=low
 
@@ -1352,14 +3603,14 @@ debhelper (0.78) frozen unstable; urgency=low
     to be changed after the fact :-)
   * dh_fixperms: remove execute bits from .la files genrated by libtool.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 30 Mar 1998 12:44:42 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 30 Mar 1998 12:44:42 -0800
 
 debhelper (0.77) frozen unstable; urgency=low
 
   * Fixed a nasty bug in dh_makeshlibs when it was called with -V, but with
     no version string after the -V.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 29 Mar 1998 16:08:27 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun, 29 Mar 1998 16:08:27 -0800
 
 debhelper (0.76) frozen unstable; urgency=low
 
@@ -1367,14 +3618,14 @@ debhelper (0.76) frozen unstable; urgency=low
     This is just to get it into frozen. There are no changes except bug
     fixes.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 26 Mar 1998 12:25:47 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 26 Mar 1998 12:25:47 -0800
 
 debhelper (0.75) unstable; urgency=low
 
   * Actually exit if there is an unknown option on the command line (oooops!)
   * Fix .so file conversion to actually work (#19933).
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 19 Mar 1998 11:54:58 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 19 Mar 1998 11:54:58 -0800
 
 debhelper (0.74) unstable; urgency=low
 
@@ -1386,13 +3637,13 @@ debhelper (0.74) unstable; urgency=low
     Life is too short for me to spell check my technical documentation, but
     I always welcome corrections!
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 17 Mar 1998 22:09:07 -0800
+ -- Joey Hess <joeyh@debian.org>  Tue, 17 Mar 1998 22:09:07 -0800
 
 debhelper (0.73) unstable; urgency=low
 
   * Fixed typo in dh_suidregister.1
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 12 Mar 1998 16:30:27 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 12 Mar 1998 16:30:27 -0800
 
 debhelper (0.72) unstable; urgency=low
 
@@ -1400,7 +3651,7 @@ debhelper (0.72) unstable; urgency=low
     --init-script parameter to dh_installinit. (#19227)
   * Documented this new switch.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  9 Mar 1998 17:12:04 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Mar 1998 17:12:04 -0800
 
 debhelper (0.71) unstable; urgency=low
 
@@ -1410,7 +3661,7 @@ debhelper (0.71) unstable; urgency=low
     do not apply to the main package. It's been long enough so I'm 100% sure
     no packages use the old behavior.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  9 Mar 1998 11:46:59 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Mar 1998 11:46:59 -0800
 
 debhelper (0.70) unstable; urgency=low
 
@@ -1418,27 +3669,27 @@ debhelper (0.70) unstable; urgency=low
     comments aurrounding debhelper-added code. I don't think this date was
     gaining us anything, so let's remove it and save some disk space.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  8 Mar 1998 21:15:13 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun,  8 Mar 1998 21:15:13 -0800
 
 debhelper (0.69) unstable; urgency=low
 
   * Refer to suidregister (8), not (1). Bug #19149.
   * Removed junk file from debian/ dir.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  8 Mar 1998 13:04:36 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun,  8 Mar 1998 13:04:36 -0800
 
 debhelper (0.68) unstable; urgency=low
 
   * Document that README.debian files are installed as README.Debian (#19089).
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  6 Mar 1998 17:48:32 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri,  6 Mar 1998 17:48:32 -0800
 
 debhelper (0.67) unstable; urgency=low
 
   * Added PROGRAMMING document that describes the interface of dh_lib, to
     aid others in writing and understanding debhelper programs.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  6 Mar 1998 12:45:08 -0800
+ -- Joey Hess <joeyh@debian.org>  Fri,  6 Mar 1998 12:45:08 -0800
 
 debhelper (0.66) unstable; urgency=low
 
@@ -1447,20 +3698,20 @@ debhelper (0.66) unstable; urgency=low
     moved from one package back into itself, instead, check tmp dir names.
     If you use this behavior, you should use "dh_testversion 0.66".
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  2 Mar 1998 17:50:29 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  2 Mar 1998 17:50:29 -0800
 
 debhelper (0.65) unstable; urgency=low
 
   * dh_installdocs.1, dh_movefiles.1: clarified documentation for Che.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  2 Mar 1998 17:20:39 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  2 Mar 1998 17:20:39 -0800
 
 debhelper (0.64) unstable; urgency=low
 
   * Removed some junk (a whole old debhelper source tree!) that had gotten
     into the source package by accident.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 23 Feb 1998 20:23:34 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 23 Feb 1998 20:23:34 -0800
 
 debhelper (0.63) unstable; urgency=low
 
@@ -1473,7 +3724,7 @@ debhelper (0.63) unstable; urgency=low
     with the correct permissions even if the umask is set to unusual 
     values. (#18283)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 16 Feb 1998 23:34:36 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon, 16 Feb 1998 23:34:36 -0800
 
 debhelper (0.62) unstable; urgency=low
 
@@ -1483,14 +3734,14 @@ debhelper (0.62) unstable; urgency=low
     inspired to implement some of it.
   *  Also added all wishlist bugs to the TODO.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 12 Feb 1998 22:38:53 -0800
+ -- Joey Hess <joeyh@debian.org>  Thu, 12 Feb 1998 22:38:53 -0800
 
 debhelper (0.61) unstable; urgency=low
 
   * dh_installmanpages: Add / to end of egrep -v regexp, fixes it so
     debian/icewm.1 can be found.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 11 Feb 1998 09:09:28 -0800
+ -- Joey Hess <joeyh@debian.org>  Wed, 11 Feb 1998 09:09:28 -0800
 
 debhelper (0.60) unstable; urgency=low
 
@@ -1498,7 +3749,7 @@ debhelper (0.60) unstable; urgency=low
     (policy 3.3.8 paragraph 2).
     Lintian found lots of bugs that will be fixed by this change.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  9 Feb 1998 12:26:13 -0800
+ -- Joey Hess <joeyh@debian.org>  Mon,  9 Feb 1998 12:26:13 -0800
 
 debhelper (0.59) unstable; urgency=low
 
@@ -1506,26 +3757,26 @@ debhelper (0.59) unstable; urgency=low
     actually doing anything. (Combine with -v to see what the command would
     have done.) (#17598)
 
- -- Joey Hess <joeyh@master.debian.org>  Sun,  1 Feb 1998 14:51:08 -0800
+ -- Joey Hess <joeyh@debian.org>  Sun,  1 Feb 1998 14:51:08 -0800
 
 debhelper (0.58) unstable; urgency=low
 
   * Fixed bug #17597 - DH_VERBOSE wasn'talways taking effect.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 28 Jan 1998 17:18:17 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 28 Jan 1998 17:18:17 -0500
 
 debhelper (0.57) unstable; urgency=low
 
   * Depend on perl 5.004 or greater (for Getopt::Long).
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 17 Jan 1998 02:12:06 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 17 Jan 1998 02:12:06 -0500
 
 debhelper (0.56) unstable; urgency=low
 
   * dh_compress: Applied patch from Yann Dirson <ydirson@a2points.com>,
     to make it not abort of one of the find's fails.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 15 Jan 1998 19:16:48 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu, 15 Jan 1998 19:16:48 -0500
 
 debhelper (0.55) unstable; urgency=low
 
@@ -1533,7 +3784,7 @@ debhelper (0.55) unstable; urgency=low
   * Added call to dh_movefiles, and a commented out call to dh_testversion,
     to some of the sample rules files. #17076
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 14 Jan 1998 12:48:43 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 14 Jan 1998 12:48:43 -0500
 
 debhelper (0.54) unstable; urgency=low
 
@@ -1544,7 +3795,7 @@ debhelper (0.54) unstable; urgency=low
     dh_installinit -u"defaults 10")
   * Now depends on perl (needs Getopt::Long).
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 10 Jan 1998 15:44:09 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 10 Jan 1998 15:44:09 -0500
 
 debhelper (0.53) unstable; urgency=low
 
@@ -1558,14 +3809,14 @@ debhelper (0.53) unstable; urgency=low
   * Added dh_movefiles, which moves files out of debian/tmp into subpackages.
     (#16932)
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 10 Jan 1998 11:30:12 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 10 Jan 1998 11:30:12 -0500
 
 debhelper (0.52) unstable; urgency=low
 
   * dh_compress: compress file belongs in debian/. It was looking in ./
     This has been broken since version 0.30.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue,  6 Jan 1998 14:08:31 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue,  6 Jan 1998 14:08:31 -0500
 
 debhelper (0.51) unstable; urgency=low
 
@@ -1578,7 +3829,7 @@ debhelper (0.51) unstable; urgency=low
     command line apply to ALL packages acted on.
   * Updated Standards-Version to latest.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon,  5 Jan 1998 16:15:01 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon,  5 Jan 1998 16:15:01 -0500
 
 debhelper (0.50) unstable; urgency=low
 
@@ -1605,7 +3856,7 @@ debhelper (0.50) unstable; urgency=low
     led to bug report #16229: Any text specified on the command line that is
     not a flag will be presumed to be part of the -u flag. Yuck.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  3 Jan 1998 14:36:15 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat,  3 Jan 1998 14:36:15 -0500
 
 debhelper (0.37) unstable; urgency=low
 
@@ -1614,14 +3865,14 @@ debhelper (0.37) unstable; urgency=low
     slowdown caused by using dpkg-parsechangelog - now it's only called by
     2 dh_* programs.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 28 Dec 1997 20:45:22 -0500
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Dec 1997 20:45:22 -0500
 
 debhelper (0.36) unstable; urgency=low
 
   * dh_undocumented: exit with an error message if the man page specified
     does not have a section.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 27 Dec 1997 14:14:04 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 Dec 1997 14:14:04 -0500
 
 debhelper (0.35) unstable; urgency=low
 
@@ -1630,13 +3881,13 @@ debhelper (0.35) unstable; urgency=low
     I might remove it or optimize it if too many people yell at me. :-)
   * dh_undocumented.1: note that it really links to undocumented.7.gz.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 22 Dec 1997 22:19:39 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Dec 1997 22:19:39 -0500
 
 debhelper (0.34) unstable; urgency=low
 
   * Fixed typo #16215.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 22 Dec 1997 14:41:46 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Dec 1997 14:41:46 -0500
 
 debhelper (0.33) unstable; urgency=low
 
@@ -1648,7 +3899,7 @@ debhelper (0.33) unstable; urgency=low
   * examples/*: use dh_clean -k in the binary targets of all rules files,
     for safety.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu, 11 Dec 1997 19:05:41 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu, 11 Dec 1997 19:05:41 -0500
 
 debhelper (0.32) unstable; urgency=low
 
@@ -1658,19 +3909,19 @@ debhelper (0.32) unstable; urgency=low
   * examples/rules.multi: changed dh_du -a to dh_du -i in binary-indep
     section.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 10 Dec 1997 19:53:13 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 10 Dec 1997 19:53:13 -0500
 
 debhelper (0.31) unstable; urgency=low
 
   * Fixed man page typos #15685.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat,  6 Dec 1997 21:44:58 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat,  6 Dec 1997 21:44:58 -0500
 
 debhelper (0.30) unstable; urgency=low
 
   * dh_md5sumes, dh_installdirs, dh_compress: fixed assorted cd bugs.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  5 Dec 1997 15:08:36 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri,  5 Dec 1997 15:08:36 -0500
 
 debhelper (0.29) unstable; urgency=low
 
@@ -1682,20 +3933,20 @@ debhelper (0.29) unstable; urgency=low
   * dh_makeshlibs, dh_md5sums, dh_installdebfiles, dh_du, dh_clean, 
     dh_installdirs: don't pass complex commands to doit().
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  4 Dec 1997 13:56:14 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu,  4 Dec 1997 13:56:14 -0500
 
 debhelper (0.28) unstable; urgency=low
 
   * dh_makeshlibs: fixes type that caused the program to crash (#15536).
 
- -- Joey Hess <joeyh@master.debian.org>  Wed,  3 Dec 1997 13:22:48 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed,  3 Dec 1997 13:22:48 -0500
 
 debhelper (0.27) unstable; urgency=low
 
   * README: fixed typoes (one serious).
   * Ran ispell on all the documentation.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 30 Nov 1997 18:48:20 -0500
+ -- Joey Hess <joeyh@debian.org>  Sun, 30 Nov 1997 18:48:20 -0500
 
 debhelper (0.26) unstable; urgency=low
 
@@ -1704,53 +3955,53 @@ debhelper (0.26) unstable; urgency=low
     the dh_* programs (#15497).
   * dh_du.1: no, this is not really the dh_md5sums man page (#15499).
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 30 Nov 1997 13:01:40 -0500
+ -- Joey Hess <joeyh@debian.org>  Sun, 30 Nov 1997 13:01:40 -0500
 
 debhelper (0.25) unstable; urgency=low
 
   * dh_compress: was not reading debian/compress file - fixed.
   * examples/*: moved dh_clean call to after make clean is run.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 25 Nov 1997 15:43:58 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue, 25 Nov 1997 15:43:58 -0500
 
 debhelper (0.24) unstable; urgency=low
 
   * dh_clean: no longer clean up empty (0 byte) files (#15240).
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 25 Nov 1997 14:29:37 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue, 25 Nov 1997 14:29:37 -0500
 
 debhelper (0.23) unstable; urgency=low
 
   * Now depends on fileutils (>= 3.16-4), becuase with any earlier version
     of fileutils, install -p will not work (#14680)
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 19 Nov 1997 23:59:43 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 19 Nov 1997 23:59:43 -0500
 
 debhelper (0.22) unstable; urgency=low
 
   * dh_installdocs: Install README.debian as README.Debian (of course,
     README.Debian is installed with the same name..)
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 18 Nov 1997 01:23:53 -0500
+ -- Joey Hess <joeyh@debian.org>  Tue, 18 Nov 1997 01:23:53 -0500
 
 debhelper (0.21) unstable; urgency=low
 
   * dh_installinit: on removal, fixed how update-rc.d is called.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 15 Nov 1997 20:43:14 -0500
+ -- Joey Hess <joeyh@debian.org>  Sat, 15 Nov 1997 20:43:14 -0500
 
 debhelper (0.20) unstable; urgency=low
 
   * Added dh_installinit, which installs an init.d script, and edits the
     postinst, postrm, etc.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 14 Nov 1997 00:45:53 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri, 14 Nov 1997 00:45:53 -0500
 
 debhelper (0.19) unstable; urgency=low
 
   * dh_installmenu.1: menufile is in section 5, not 1.
 
- -- Joey Hess <joeyh@master.debian.org>  Wed, 12 Nov 1997 19:54:48 -0500
+ -- Joey Hess <joeyh@debian.org>  Wed, 12 Nov 1997 19:54:48 -0500
 
 debhelper (0.18) unstable; urgency=low
 
@@ -1761,7 +4012,7 @@ debhelper (0.18) unstable; urgency=low
     them. This lets me clean up several nasty areas where I had to echo the
     commands once, and then run them seperatly.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 10 Nov 1997 19:48:36 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon, 10 Nov 1997 19:48:36 -0500
 
 debhelper (0.17) unstable; urgency=low
 
@@ -1769,14 +4020,14 @@ debhelper (0.17) unstable; urgency=low
     compatability with debstd's debian/dirs file.
   * dh_lib: fixed problem with -P flag.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri,  7 Nov 1997 16:07:11 -0500
+ -- Joey Hess <joeyh@debian.org>  Fri,  7 Nov 1997 16:07:11 -0500
 
 debhelper (0.16) unstable; urgency=low
 
   * dh_compress: always compress changelog and upstream changelog, no 
     matter what their size (#14604) (policy 5.8)
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  6 Nov 1997 19:50:36 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu,  6 Nov 1997 19:50:36 -0500
 
 debhelper (0.15) unstable; urgency=low
 
@@ -1785,7 +4036,7 @@ debhelper (0.15) unstable; urgency=low
   * dh_*: added -P flag, to let a different package build directory be
     specified.
 
- -- Joey Hess <joeyh@master.debian.org>  Thu,  6 Nov 1997 15:51:22 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu,  6 Nov 1997 15:51:22 -0500
 
 debhelper (0.14) unstable; urgency=low
 
@@ -1793,20 +4044,20 @@ debhelper (0.14) unstable; urgency=low
     unchanged.
   * Install examples/rules* executable.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 27 Oct 1997 12:42:33 -0500
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Oct 1997 12:42:33 -0500
 
 debhelper (0.13) unstable; urgency=low
 
   * Added dh_makeshlibs, automatically generates a shlibs file.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 24 Oct 1997 20:33:14 -0400
+ -- Joey Hess <joeyh@debian.org>  Fri, 24 Oct 1997 20:33:14 -0400
 
 debhelper (0.12) unstable; urgency=low
 
   * Fixed mispelling of dh_md5sums in examples rules files and README.
     (#13990) Thanks, Adrian.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 24 Oct 1997 14:35:30 -0400
+ -- Joey Hess <joeyh@debian.org>  Fri, 24 Oct 1997 14:35:30 -0400
 
 debhelper (0.11) unstable; urgency=low
 
@@ -1816,7 +4067,7 @@ debhelper (0.11) unstable; urgency=low
   * Added a "converting from debstd" section to the README.
   * Added dh_du, generates a DEBIAN/du file with disk usage stats (#14048).
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 21 Oct 1997 13:17:28 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 21 Oct 1997 13:17:28 -0400
 
 debhelper (0.10) unstable; urgency=medium
 
@@ -1828,21 +4079,21 @@ debhelper (0.10) unstable; urgency=medium
     should rebuild them with this version.
   * dh_md5sums: show cd commands in verbose mode.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 20 Oct 1997 14:44:30 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 20 Oct 1997 14:44:30 -0400
 
 debhelper (0.9) unstable; urgency=low
 
   * Added dh_suidregister, interfaces to to the suidmanager package.
   * dh_installdebfiles: fixed typo on man page.
 
- -- Joey Hess <joeyh@master.debian.org>  Sat, 18 Oct 1997 20:55:39 -0400
+ -- Joey Hess <joeyh@debian.org>  Sat, 18 Oct 1997 20:55:39 -0400
 
 debhelper (0.8) unstable; urgency=low
 
   * Added dh_md5sum, generates a md5sums file.
   * dh_clean: fixed to echo all commands when verbose mode is on.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 17 Oct 1997 14:18:26 -0400
+ -- Joey Hess <joeyh@debian.org>  Fri, 17 Oct 1997 14:18:26 -0400
 
 debhelper (0.7) unstable; urgency=low
 
@@ -1859,26 +4110,26 @@ debhelper (0.7) unstable; urgency=low
     permissions, and this reorganization makes the file a bit more flexable
     in a few situations.)
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 13 Oct 1997 20:08:05 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 13 Oct 1997 20:08:05 -0400
 
 debhelper (0.6) unstable; urgency=low
 
   * Got rid of bashisms - this package should work now if /bin/sh is ash.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 10 Oct 1997 15:24:40 -0400
+ -- Joey Hess <joeyh@debian.org>  Fri, 10 Oct 1997 15:24:40 -0400
 
 debhelper (0.5) unstable; urgency=low
 
   * Added dh_installcron to install cron jobs.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 30 Sep 1997 19:37:41 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 30 Sep 1997 19:37:41 -0400
 
 debhelper (0.4) unstable; urgency=low
 
   * Added dh_strip to strip binaries and libraries.
   * Fixed several man pages.
 
- -- Joey Hess <joeyh@master.debian.org>  Sun, 28 Sep 1997 20:46:32 -0400
+ -- Joey Hess <joeyh@debian.org>  Sun, 28 Sep 1997 20:46:32 -0400
 
 debhelper (0.3) unstable; urgency=low
 
@@ -1886,7 +4137,7 @@ debhelper (0.3) unstable; urgency=low
     dh_installmenu and dh_installdebfiles and dh_clean.
   * Removed some pointless uses of cat.
 
- -- Joey Hess <joeyh@master.debian.org>  Fri, 26 Sep 1997 21:52:53 -0400
+ -- Joey Hess <joeyh@debian.org>  Fri, 26 Sep 1997 21:52:53 -0400
 
 debhelper (0.2) unstable; urgency=low
 
@@ -1912,11 +4163,11 @@ debhelper (0.2) unstable; urgency=low
     package's debian/rules always use the most up-to-date db_lib.
   * Changed dh_cleantmp commands in the examples rules files to dh_clean.
 
- -- Joey Hess <joeyh@master.debian.org>  Tue, 23 Sep 1997 12:26:12 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue, 23 Sep 1997 12:26:12 -0400
 
 debhelper (0.1) experimental; urgency=low
 
   * First release. This is a snapshot of my work so far, and it not yet
     ready to replace debstd.
 
- -- Joey Hess <joeyh@master.debian.org>  Mon, 22 Sep 1997 15:01:25 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 22 Sep 1997 15:01:25 -0400
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
index 5a5b45b25f53d42d6425808963bb1adf9e60d585..957715314d3b1371da603e0428fa4a4c2e26431b 100644 (file)
@@ -1,16 +1,18 @@
 Source: debhelper
 Section: devel
 Priority: optional
-Maintainer: Joey Hess <joeyh@master.debian.org>
-Standards-Version: 3.0.1.0
+Maintainer: Joey Hess <joeyh@debian.org>
+Build-Depends-Indep: perl (>= 5.6.1), coreutils | fileutils (>= 4.0-2.1), file (>= 3.23-1), dpkg-dev (>= 1.9.0)
+Standards-Version: 3.6.0
 
 Package: debhelper
 Architecture: all
-Depends: perl5 | perl (>= 5.004), fileutils (>= 3.16-4), file (>= 3.23-1)
+Depends: ${perl:Depends}, ${misc:Depends}, coreutils | fileutils (>= 4.0-2.1), file (>= 3.23-1), dpkg-dev (>= 1.7.0), html2text, debconf-utils (>= 1.1.1), binutils, po-debconf
 Suggests: dh-make
 Description: helper programs for debian/rules
  A collection of programs that can be used in a debian/rules file to
- automate common tasks related to building binary debian packages. Programs
- are included to install various files into your package, compress files, fix
- file permissions, integrate your package with the debian menu system,
- suidmanager, doc-base, etc.
+ automate common tasks related to building 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, debconf, doc-base, etc. Most debian packages use debhelper
+ as part of their build process.
index 50256a89ec2c1c79277cfe8b68e74c033365b05b..931864dd764ab26ab0453a6e4c7a08e970fbf19d 100644 (file)
@@ -1,9 +1,24 @@
-Debhelper is written by Joey Hess <joeyh@master.debian.org>.
+Debhelper is written by and copyright 1997-2003 Joey Hess <joeyh@debian.org>.
 
-Parts of the code (and certainly my inspiration from the whole thing) came 
-from debmake, by Christoph Lameter <clameter@debian.org>. 
+Increasinly miniscule parts of the code (and certainly my inspiration from the
+whole thing) came from debmake, by Christoph Lameter <clameter@debian.org>.
 
-Some of the dh_md5sums and dh_du commands is from a program by Charles 
+Some of the dh_md5sums command is from a program by Charles
 Briscoe-Smith <cpb4@ukc.ac.uk>.
 
-The copyright of this package is GPL, version 2 or later.
+dh_perl is by Brendan O'Dea <bod@debian.org>.
+dh_python is by Josselin Mouette <josselin.mouette@ens-lyon.org>.
+dh_installcatalogs is by Adam Di Carlo <aph@debian.org>.
+dh_scrollkeeper is by Ross Burton <ross@burtonini.com>.
+dh_usrlocal is by Andrew Stribblehill <ads@debian.org>.
+dh_installlogcheck is by Jon Middleton <jjm@debian.org>.
+
+The copyright of this package is GPL, version 2 or later. Files in the
+examples/ directory are in the public domain[1]. On Debian systems the
+complete text of the GPL is in /usr/share/common-licenses/GPL
+
+[1] Pendants who belive I cannot legally say that code I have written is in
+    the public domain may consider them instead to be licensed as follows:
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted under any circumstances. No warranty.
diff --git a/debian/cron.d b/debian/cron.d
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/cron.daily b/debian/cron.daily
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/debhelper2.substvars b/debian/debhelper2.substvars
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/debhelperfoo.substvars b/debian/debhelperfoo.substvars
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/dhelp b/debian/dhelp
deleted file mode 100644 (file)
index 31e980b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-hhihihi
diff --git a/debian/docs b/debian/docs
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/debian/emacsen-install b/debian/emacsen-install
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/emacsen-remove b/debian/emacsen-remove
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/init.d b/debian/init.d
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/links b/debian/links
deleted file mode 100644 (file)
index 9a72e0f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/bin/sysdb-wrapper usr/bin/chfn
-usr/bin/sysdb-wrapper usr/bin/chsh
-usr/bin/sysdb-wrapper usr/bin/passwd
-
diff --git a/debian/menu b/debian/menu
deleted file mode 100644 (file)
index e69de29..0000000
index 68d6eb0518580f2d480615a852cc487cd96dc2a8..ffb2c9ba536dcdc8e3b6f47bf0124ebaf6dfd2fd 100755 (executable)
@@ -1,35 +1,64 @@
 #!/usr/bin/make -f
 # Note that I have to refer to debhelper programs with ./, to make sure
-# I run the most current ones. That's also why there is a symlink to the 
-# current Dh_lib.pm and the current Dh_getopt.pm in this debian/ directory.
+# I run the most current ones.
 #
-# This is _not_ a good example of a debhelper rules file.
+# This is _not_ a good example of a debhelper rules file, but I didn't need
+# to tell you that; just see the chunk of inlined perl below.. 
+# See examples/ for some good examples.
+
+# Ensure that builds are self-hosting, which means I have to use the .pm
+# files in this package, not any that may be on the system.
+export PERL5LIB=.
 
 # If any automatic script generation is done in building this package, 
 # be sure to use the new templates from this package.
 export DH_AUTOSCRIPTDIR=autoscripts
 
-# Living dangerously :-)
-export DH_COMPAT=2
-
-# Figure out the current debhelper version.
+# Figure out the `current debhelper version.
 VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
 
-export DH_VERBOSE=1
+PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}')
 
-build:
-       # Run regression tests.
-       $(MAKE) test
+build: test build-stamp
+build-stamp:
+       # Generate the main man page. All the perl cruft is to get a list
+       # of debhelper commands with short descriptions into the man page.
+       pod2man --section=7 -c Debhelper -r "$(VERSION)" debhelper.pod | \
+       perl -e ' \
+               undef $$/; \
+               foreach (@ARGV) { \
+                       open (IN, $$_) or die "$$_: $$!"; \
+                       $$file=<IN>; \
+                       close IN; \
+                       if ($$file=~m/=head1 NAME\n\n(.*?) - (.*?)\n/m) { \
+                               $$collect.=".IP $$1(1)\n$$2\n"; \
+                       } \
+               } \
+               END { \
+                       while (<STDIN>) { \
+                               s/#LIST#/$$collect/; \
+                               print; \
+                       }; \
+               }' `find . -type f -perm +100 -maxdepth 1 -name "dh_*" | sort` > debhelper.7
+       # Turn all executables into man pages.
+       find . -type f -perm +100 -maxdepth 1 -name "dh_*" \
+               -exec pod2man -c Debhelper -r "$(VERSION)" {} {}.1 \;
+       printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
+               Debian/Debhelper/Dh_Version.pm
+
+       touch build-stamp
 
 clean:
        ./dh_testdir
        ./dh_testroot
-       ./dh_clean
+       -./dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
 
-test:
+test: test-stamp
+test-stamp:
        ./dh_clean
-       DH_VERSION=10 perl -MTest::Harness -e 'runtests @ARGV' t/*
+       DH_VERSION=10 perl -MTest::Harness -e 'runtests grep { ! /CVS/ } @ARGV' t/*
        ./dh_clean
+       touch test-stamp
 
 # Build architecture-dependent files here.
 binary-arch: build
@@ -40,81 +69,30 @@ binary-indep: build
        ./dh_testdir
        ./dh_testroot
        ./dh_clean -k
-       ./dh_installdirs usr/bin usr/share/debhelper
-
-       echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > debian/debhelper/usr/share/debhelper/Dh_Version.pm
-       find . -perm +111 -maxdepth 1 -type f -not -name "*.pl" \
-               -exec install -p {} debian/debhelper/usr/bin \;
-       cp -a Dh_*.pm debian/debhelper/usr/share/debhelper
-       cp -a autoscripts debian/debhelper/usr/share/debhelper
-
+       ./dh_install -X .1 dh_* usr/bin
+       ./dh_install Debian/Debhelper/*.pm $(PERLLIBDIR)/Debian/Debhelper/
+       ./dh_install autoscripts usr/share/debhelper
        ./dh_installdocs doc/*
        ./dh_installexamples examples/*
-       ./dh_installmenu
-       ./dh_installmanpages
-       ./dh_installinfo
-       # Fix up all man pages, filling in the modification time for them.
-       # Note this runs beofre the command below so debhelper.1 gets the right
-       # date on it.
-       perl -mPOSIX -e ' \
-               foreach $$f (@ARGV) { \
-               @data=stat($$f); \
-               $$date=POSIX::strftime("%d %B %Y",localtime($$data[9])); \
-               open (IN,$$f); \
-               @lines=<IN>; \
-               close IN; \
-               $$lines[0]=~s/1 ""/1 "$$date"/; \
-               open (OUT,">$$f"); \
-               print OUT @lines; \
-               close OUT; \
-       }' debian/debhelper/usr/man/man1/*.1
-       # Fix up the debhelper.1 man page, substituting in a list of all
-       # debhelper commands. eek!
-       perl -ne ' \
-               s/\\- /(1)\n/; \
-               $$collect.=".TP\n.BR $$_" if $$. eq 3 && /^dh_/; \
-               close(ARGV) if eof; \
-               END { \
-                       open(I,"debian/debhelper/usr/man/man1/debhelper.1"); \
-                       @lines=<I>; \
-                       close I; \
-                       open(O,">debian/debhelper/usr/man/man1/debhelper.1"); \
-                       foreach (@lines) { \
-                               s/#LIST#/$$collect/; \
-                               print O; \
-                       } \
-                       close O; \
-               }' *.1
+       ./dh_installman *.1 *.7
        ./dh_installchangelogs
-#      ./dh_movefiles
+       ./dh_shlibdeps
        ./dh_link
        ./dh_compress
        ./dh_fixperms
-       ./dh_suidregister
+       ./dh_perl
        ./dh_installdeb
        ./dh_gencontrol
        ./dh_md5sums
        ./dh_builddeb
 
-# Install in the proper location on my ftp server and web server. Not intended
-# for use by anyone except the author.
-OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'<debian/changelog)
-dist:
-       dpkg-buildpackage -rfakeroot -tc
-       if [ `hostname` = 'kite' ] ; then \
-               cp ../debhelper_$(VERSION).tar.gz ../../public; \
-               rm /home/ftp/pub/code/debhelper/* || true; \
-               cp debian/changelog /home/pub/programs/debhelper/CHANGES; \
-               echo $(VERSION) > /home/pub/programs/debhelper/LATEST-VERSION-IS; \
-               cd ..; rm -rf debhelper-$(OLD_VER); \
-               [ -f ../public/debhelper_$(OLD_VER).tar.gz ] && \
-               tar zxf ../public/debhelper_$(OLD_VER).tar.gz || \
-               tar zxf ../outdated/debhelper_$(OLD_VER).tar.gz; \
-               diff -r -u --new-file debhelper-$(OLD_VER) debhelper-$(VERSION) > \
-                       /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
-               gzip -9f /home/ftp/pub/code/debhelper/diffs/debhelper-$(VERSION).diff; \
-               cd /tmp; rm -f debhelper-$(OLD-VER); \
-        fi
+# Update the debhelper web page. Not intended for use by anyone except the
+# author.
+DIR=/home/web/kitenet.net/programs/debhelper
+installhook:
+       cp debian/changelog $(DIR)/CHANGES
+       echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary dist
+
diff --git a/debian/subtsvars b/debian/subtsvars
deleted file mode 100644 (file)
index 458d787..0000000
+++ /dev/null
@@ -1 +0,0 @@
-perl:Depends=perl5
index 04c3570a8f31fc3c16aa9ead95c1b66936ec40e8..3d9f9d86e88130aef220002e4edb421eb3f6b252 100755 (executable)
@@ -1,9 +1,48 @@
 #!/usr/bin/perl -w
-#
-# Build the .deb package, assuming all the files are set up.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_builddeb - build debian packages
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--filename=>I<name>] [S<B<--> I<params>>]
+
+=head1 DESCRIPTION
+
+dh_builddeb simply calls L<dpkg-deb(8)> to build a debian package or
+packages.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--destdir=>I<directory>
+
+Use this if you want the generated .deb files to be put in a directory
+other than the default of ".."
+
+=item B<--filename=>I<name>
+
+Use this if you want to force the generated .deb file to have a particular
+file name. Does not work well if more than one .deb is generated!
+
+=item B<-u>I<params>
+
+=item B<--> I<params>
+
+Pass I<params> to L<dpkg-deb(1)> when it is used to build the
+package.
+
+=back
+
+=cut
+
 init();
 
 # Set the default destination directory.
@@ -11,7 +50,30 @@ if (! defined $dh{DESTDIR}) {
        $dh{DESTDIR}='..';
 }
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       doit("dpkg","--build",$TMP,$dh{DESTDIR});
+if (! defined $dh{FILENAME}) {
+       $dh{FILENAME}='';
+}
+else {
+       $dh{FILENAME}="/$dh{FILENAME}";
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
+               complex_doit("find $tmp -name $_ | xargs rm -rf")
+                       foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
+       }
+       doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_builddeb.1 b/dh_builddeb.1
deleted file mode 100644 (file)
index 134cd88..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-.TH DH_BUILDDEB 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_builddeb \- build debian packages
-.SH SYNOPSIS
-.B dh_builddeb
-.I "[debhelper options] [--destdir=directory]"
-.SH "DESCRIPTION"
-dh_builddeb simply calls
-.BR dpkg (8)
-to build a .deb package or packages.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B --destdir=directory
-Use this if you want the generated .deb files to be put in a directory other
-than the default of ".."
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 9c6f4f3d48cf3f135bc604cb52379d42e9e09f77..d4c5943a102437fe211c828d45b297a31d8530d0 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -1,25 +1,77 @@
 #!/usr/bin/perl -w
-#
-# Clean up $TMP and other tepmorary files generated by the
-# build process.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_clean - clean up package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_clean> [S<I<debhelper options>>] [B<-k>] [B<-d>] [B<-X>I<item>] [S<I<file ...>>]
+
+=head1 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
+other files including debian/files, and any detritus left behind by other
+debhelper commands. It also removes common files that should not appear in a
+debian diff:
+  #*# *~ DEADJOE *.orig *.rej *.SUMS TAGS core .deps/* *.P
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-k>, B<--keep>
+
+Do not delete debian/files. When do you want to use this? Anytime you have a
+debian/rules that has 2 binary targets that build different .deb packages;
+for example, one target is binary-arch, and the other is binary-indep, or
+one target builds the shared library, and the other the -dev package. If you
+didn't use -k in these cases, then debian/files would be deleted in the
+middle, and your changes file will only contain the last binary package that
+was built.
+
+=item B<-d>, B<--dirs-only>
+
+Only clean the package build directories, do not clean up any other files
+at all.
+
+=item B<-X>I<item> B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+deleted, even if they would normally be deleted. You may use this option
+multiple times to build up a list of things to exclude.
+
+=item I<file ...>
+
+Delete these files too.
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $EXT=pkgext($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $ext=pkgext($package);
 
        if (! $dh{D_FLAG}) {
-               doit("rm","-f","debian/$EXT\substvars",
-                       "debian/$EXT\postinst.debhelper",
-                       "debian/$EXT\postrm.debhelper",
-                       "debian/$EXT\preinst.debhelper",
-                       "debian/$EXT\prerm.debhelper");
+               doit("rm","-f","debian/${ext}substvars")
+                       unless excludefile("debian/${ext}substvars");
+               
+               # These are all debhelper temp files, and so it is safe to 
+               # wildcard them.
+               complex_doit("rm -f debian/$ext*.debhelper");
        }
        
-       doit ("rm","-rf",$TMP);
+       doit ("rm","-rf",$tmp)
+               unless excludefile($tmp);
 }
 
 if (! $dh{D_FLAG}) {
@@ -28,7 +80,14 @@ if (! $dh{D_FLAG}) {
        }
 
        if (! $dh{K_FLAG}) {
-               doit("rm","-f","debian/files");
+               doit("rm","-f","debian/files")
+                       unless excludefile("debian/files");
+       }
+
+       # See if some files that would normally be deleted are excluded.
+       my $find_options='';
+       if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
+               $find_options="-a ! ( $dh{EXCLUDE_FIND} )";
        }
 
        # Remove other temp files.
@@ -36,11 +95,27 @@ if (! $dh{D_FLAG}) {
        # parameters). Note that you _don't_ quote wildcards used by find
        # in here.
        doit(split(/\s+/,"find . -type f -a
-               ( -name #*# -o -name *~ -o -name DEADJOE
+               ( -name #*# -o -name .*~ -o -name *~ -o -name DEADJOE
                 -o -name *.orig -o -name *.rej -o -name *.bak
                 -o -name .*.orig -o -name .*.rej -o -name .SUMS
                 -o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
-               ) -exec rm -f {} ;"));
+               ) $find_options -exec rm -f {} ;"));
+
+       # Stupid autoconf cache directory.
+       doit("rm", "-rf", "autom4te.cache")
+               unless excludefile("autom4te.cache");
 }
 
-doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! Dh_Lib::compat(1);
+doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1);
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_clean.1 b/dh_clean.1
deleted file mode 100644 (file)
index c2e71bf..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH DH_CLEAN 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_clean \- clean up package build directories
-.SH SYNOPSIS
-.B dh_clean
-.I "[debhelper options] [-k] [-d] [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
-other files, such as debian/substvars, debian/files, DEADJOE, emacs backup 
-files, any detritus left behind by other debhelper commands, etc.
-.SH OPTIONS
-.TP
-.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
-debian/rules that has 2 binary targets that build different .deb packages;
-for example, one target is binary-arch, and the other is binary-indep, or
-one target builds the shared library, and the other the -dev package. If you
-didn't use -k in these cases, then debian/files would be deleted in the
-middle, and your changes file will only contain the last binary package that
-was built.
-.TP
-.B \-d, \--dirs-only
-Only clean the package build directories, do not clean up any other files at
-all.
-.TP
-.B file ...
-Delete these files too.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 040291fba16d1f36ad9f013fc778094c0e7d9b47..9d287af420b6477b2b425ce49f2ae2cddfd6e295 100755 (executable)
@@ -1,28 +1,86 @@
 #!/usr/bin/perl -w
-#
-# Compresses files and makes sure that symlinks pointing to the 
-# compressed files get fixed.
 
+=head1 NAME
+
+dh_compress - compress files and fix symlinks in package build directories
+
+=cut
+
+use strict;
 use Cwd;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_compress> [S<I<debhelper options>>] [B<-X>I<item>] [B<-A>] [S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_compress is a debhelper program that is responsible for compressing
+the files in package build directories, and makes sure that any symlinks
+that pointed to the files before they were compressed are updated to point
+to the new files.
+
+By default, dh_compress compresses files that debian policy mandates should
+be compressed, namely all files in usr/share/info, usr/share/man,
+usr/X11R6/man, files in usr/share/doc that are larger than 4k in size,
+(except the copyright file, .html and .css files, and files that appear to be
+already compressed based on their extensions), and all changelog files. Plus
+PCF fonts underneath usr/X11R6/lib/X11/fonts/
+
+If a debian/package.compress file exists, however, it will be ran as a shell
+script, and all filenames that the shell script outputs will be compressed
+instead of the default files. The shell script will be run from
+inside the package build directory. Note though that using -X is a much
+better idea in general; you should only use a debian/package.compress file
+if you really have to.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+compressed. For example, -X.jpeg will exclude jpeg's from compression.
+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.
+
+=item B<-A>, B<--all>
+
+Compress all files specified by command line parameters in ALL packages
+acted on.
+
+=item I<file ...>
+
+Add these files to the list of files to compress.
+
+=back
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.0
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $compress=pkgfile($PACKAGE,"compress");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $compress=pkgfile($package,"compress");
 
        # Run the file name gathering commands from within the directory
        # structure that will be effected.
-       $olddir=getcwd();
-       verbose_print("cd $TMP");
-       chdir($TMP) || error("Can't cd to $TMP: $!");
+       my $olddir=getcwd();
+       verbose_print("cd $tmp");
+       chdir($tmp) || error("Can't cd to $tmp: $!");
 
        # Figure out what files to compress.
-       @files=();
+       my @files;
        # First of all, deal with any files specified right on the command line.
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-               push @files,#ARGV;
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+               push @files, @ARGV;
        }
        if ($compress) {
                # The config file is a sh script that outputs the files to be compressed
@@ -30,29 +88,31 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                push @files, split(/\n/,`sh $olddir/$compress 2>/dev/null`);
        }
        else {
-               # By default, fall back to what the policy manual says to compress.
-               # Note that all the excludes of odd things like _z are because
-               # gzip refuses to compress such files, assumming they are zip files.
-               # I looked at the gzip source to get the complete list of such
-               # extentions. ".gz", ".z", ".taz", ".tgz", "-gz", "-z", "_z"
-               
+               # Note that all the excludes of odd things like _z 
+               # are because gzip refuses to compress such files, assumming
+               # they are zip files. I looked at the gzip source to get the
+               # complete list of such extensions: ".gz", ".z", ".taz", 
+               # ".tgz", "-gz", "-z", "_z"
                push @files, split(/\n/,`
                        find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null || true;
-                       find usr/doc usr/share/doc -type f \\( -size +4k -or -name "changelog*" \\) \\
-                               \\( -name changelog.html -or ! -name "*.htm*" \\) \\
-                               ! -name "*.gif" ! -iname "*.gz" \\
-                               ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
-                               ! -iname "*-gz" ! -iname "*-z" ! -iname "*_z" \\
-                               ! -name "copyright" 2>/dev/null || true
+                       find usr/share/doc -type f \\( -size +4k -or -name "changelog*" -or -name "NEWS*" \\) \\
+                               \\( -name changelog.html -or ! -iname "*.htm*" \\) \\
+                               ! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" \\
+                               ! -iname "*.jpeg" ! -iname "*.gz" ! -iname "*.taz" \\
+                               ! -iname "*.tgz" ! -iname "*.z" ! -iname "*.bz2" \\
+                               ! -iname "*-gz"  ! -iname "*-z" ! -iname "*_z" \\
+                               ! -iname "*.jar" ! -iname "*.zip" ! -iname "*.css" \\
+                               ! -name "copyright" 2>/dev/null || true;
+                       find usr/X11R6/lib/X11/fonts -type f -name "*.pcf" 2>/dev/null || true;
                `);
        }
 
        # Exclude files from compression.
        if (@files && defined($dh{EXCLUDE}) && $dh{EXCLUDE}) {
-               @new=();
+               my @new=();
                foreach (@files) {
-                       $ok=1;
-                       foreach $x (@{$dh{EXCLUDE}}) {
+                       my $ok=1;
+                       foreach my $x (@{$dh{EXCLUDE}}) {
                                if (/\Q$x\E/) {
                                        $ok='';
                                        last;
@@ -68,8 +128,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        # space in the end.
        my @f=();
        my %hardlinks;
+       my %seen;
        foreach (@files) {
-               ($dev, $inode, undef, $nlink)=stat($_);
+               my ($dev, $inode, undef, $nlink)=stat($_);
                if ($nlink > 1) {
                        if (! $seen{"$inode.$dev"}) {
                                $seen{"$inode.$dev"}=$_;
@@ -86,6 +147,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
 
        if (@f) {
+               # Make executables not be anymore.
+               xargs(\@f,"chmod","a-x");
+               
                xargs(\@f,"gzip","-9f");
        }
        
@@ -98,18 +162,30 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                doit("ln","$hardlinks{$_}.gz","$_.gz");
        }
 
-       verbose_print("cd $olddir");
+       verbose_print("cd '$olddir'");
        chdir($olddir);
 
        # Fix up symlinks that were pointing to the uncompressed files.
-       open (FIND,"find $TMP -type l |");
+       open (FIND,"find $tmp -type l |");
        while (<FIND>) {
                chomp;
-               ($directory)=m:(.*)/:;
-               $linkval=readlink($_);
+               my ($directory)=m:(.*)/:;
+               my $linkval=readlink($_);
                if (! -e "$directory/$linkval" && -e "$directory/$linkval.gz") {
                        doit("rm","-f",$_);
                        doit("ln","-sf","$linkval.gz","$_.gz");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_compress.1 b/dh_compress.1
deleted file mode 100644 (file)
index bab5c19..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-.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 "[debhelper options] [-Xitem] [-A] [file ...]"
-.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
-that pointed to the files before they were compressed are updated to point
-to the new files.
-.P
-By default, dh_compress compresses files that debian policy mandates should
-be compressed, namely all files in usr/info, usr/man, usr/X11R6/man, and
-all files in usr/doc that are larger than 4k in size, except
-the copyright file, .html files and .gif files, and all changelog files. It
-skips any files that appear to be already compressed (based on their
-extentions).
-.P
-If a debian/package.compress file exists (debian/compress may be used for the
-first binary package in debian/control), however, it will be ran as a shell
-script, and all filenames that the shell script outputs will be compressed
-instead of the default files. Note that the shell script will be run from
-inside the package build directory.
-.SH EXAMPLE
-Here is a sample debian/compress file that causes dh_compress to compress
-the same files as it would by default. This is a good starting point for
-customization of what files are compressed:
-.PP
- find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f
- find usr/doc usr/share/doc -type f \\ 
-       \\( -size +4k -or -name "changelog*" \\) \\
-       \\( -name changelog.html -or ! -name "*.htm*" \\) \\
-       ! -name "*.gif" ! -iname "*.gz" \\
-       ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
-       ! -name "copyright"
-.SH OPTIONS
-.TP
-.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
-compressed. For example, -X.jpeg will exclude jpeg's from compression.
-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.
-.TP
-.B \-A, \--all
-Compress all files specified by command line parameters in ALL packages
-acted on.
-.TP
-.B file ...
-Add these files to the list of files to compress.
-.SH NOTES
-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
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH BUGS
-Filenames with spaces in them may not properly be compressed.
-.SH "CONFORMS TO"
-Debian policy, version 3.0.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_debstd b/dh_debstd
deleted file mode 100755 (executable)
index 89cfc18..0000000
--- a/dh_debstd
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Script to be called from debian/rules to setup all the debian specifc
-# required files
-# Christoph Lameter, <clameter@debian.org> October 10, 1996
-#
-# All the parameters are documentation files to be installed.
-# (but doc files can also be listed in debian/docs)
-#
-# This has been gutted and extensively rewritten to function as a debhelper
-# command by Joey Hess. And then completly rewritten in perl.
-
-# Need to stay compatable with debstd, so force use of level 1.
-$ENV{DH_COMAPT}=1;
-
-# Pre-parse command line before we load Dh_lib, becuase we use a
-# different style of arguments.
-@argv=();
-foreach (@ARGV) {
-       if ($_ eq '-p') {
-               $ds{PERMS}=1;
-       }
-       elsif ($_ eq '-u') {
-               $ds{UNDOC}=1;
-       }
-       elsif ($_ eq '-s') {
-               $ds{SUMS}=1;
-       }
-       elsif ($_ eq '-m') {
-               $ds{NOAUTOMAN}=1;
-       }
-       elsif ($_ eq '-c') {
-               $ds{NOCOMPRESS}=1;
-       }
-       else {
-               push @argv,$_;
-       }
-}
-@ARGV=@argv;
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-init();
-
-# Tolerate old style debstd invocations
-if ($ARGV[0] && $dh{FIRSTPACKAGE} eq $ARGV[0]) {
-       shift;
-}
-
-# debinit handles the installation of an init.d script
-sub debinit { my ($script, $filename, $package, @params)=@_;
-       @initparams=();
-       $norestart='';
-       open (IN,$filename) || warn("$filename: $!");
-       while (<IN>) {
-               if (/^FLAGS=(.*)/) {
-                       push @initparams, $1;
-               }
-               if (/NO_RESTART_ON_UPGRADE/) {
-                       $norestart='--no-restart-on-upgrade';
-               }
-       }
-       close IN;
-       $initparams='';
-       if (@initparams) {
-               $initparams="--update-rcd-params='".join(" ",@initparams)."'";
-       }
-
-       doit("dh_installinit",$norestart,"-p$package",$initparams,"--init-script=$script",@params);
-}
-
-# Do package specific things for a package.
-sub do_package { my ($package, $tmp, $prefix)=@_;
-       # Deal with scripts in etc directories
-       if (-d "$prefix/rc.boot") {
-               warning("file $prefix/rc.boot was ignored.");
-       }
-
-       # etc files that could need some tweaking
-       foreach $f ('services','inittab','crontab','protocols','profile',
-               'shells','rpc','syslog.conf','conf.modules','modules',
-               'aliases','diversions','inetd.conf','X11/Xresources',
-               'X11/config','X11/window-managers','X11/xinit','purge') {
-               if ( -f "$prefix$f") {
-                       warning("file $prefix$f was ignored.");
-               }
-       }
-
-       if (-f "${prefix}init.d") {
-               debinit($package,"${prefix}init.d",$package,"");
-       }
-
-       # The case of a daemon without the final d
-       if (-f "${prefix}init") {
-               $p=$package;
-               if ($p=~s/d$//) {
-                       debinit($p,"${prefix}init",$package,"--remove-d");
-               }
-       }
-
-       if (-f "${prefix}info") {
-               warning("debhelper does not yet support info files, so ${prefix}info was ignored.");
-       }
-
-       # Set up undocumented man page symlinks.
-       if (defined($ds{UNDOC}) && $ds{UNDOC}) {
-               open (FIND,"find $tmp -type f -perm +111 2>/dev/null |") || warning("find: $!");
-               while (<FIND>) {
-                       chomp;
-                       ($binpath, $binname)=m:$tmp/(.*)/(.*):;
-       
-                       # Check if manpages exist
-                       $section='';
-                       if ($binpath eq 'sbin' || $binpath eq 'usr/sbin') {
-                               $section=8;
-                       }
-                       elsif ($binpath eq 'usr/X11R6/bin') {
-                               $section='1x';
-                       }
-                       elsif ($binpath eq 'bin' || $binpath eq 'usr/bin') {
-                               $section=1;
-                       }
-                       elsif ($binpath eq 'usr/games') {
-                               $section=6;
-                       }       
-                       if ($section && `find $tmp/usr/man $tmp/usr/X11R6/man -name "$binname.*" 2>/dev/null` eq '') {
-                               doit("dh_undocumented","-p$package","$binname.$section");
-                       }
-               }
-               close FIND;
-       }
-}
-
-# Special case of changelog
-$changelogfile='';
-if ($ARGV[0] && $ARGV[0]=~m/change|news|history/) {
-       $changelogfile=shift;
-}
-
-doit("dh_installdirs"); # here just to make the debian/tmp, etc directories.
-doit("dh_installdocs",@ARGV);
-doit("dh_installexamples");
-if ($changelogfile) {
-       doit("dh_installchangelogs",$changelogfile);
-}
-else {
-       doit("dh_installchangelogs");
-}
-doit("dh_installmenu");
-doit("dh_installcron");
-
-# Manpage scan
-if (! $ds{NOAUTOMAN}) {
-       doit("dh_installmanpages","-p$dh{FIRSTPACKAGE}");
-}
-
-# Per-package stuff:
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       if ($PACKAGE eq $dh{FIRSTPACKAGE}) {
-               if (-f "debian/clean") {
-                       warning("file debian/clean ignored.");
-               }
-               do_package($PACKAGE,"debian/tmp","debian/");
-       }
-       else {
-               do_package($PACKAGE,"debian/$PACKAGE","debian/$PACKAGE.");
-               if ( -x "debian/$PACKAGE.prebuild") {
-                       warning("file debian/$PACKAGE.prebuild ignored.");
-               }
-       }
-}
-
-doit("dh_movefiles");
-doit("dh_strip");
-
-if (! $ds{NOCOMPRESS}) {
-       doit("dh_compress");
-}
-
-doit("dh_fixperms");
-doit("dh_suidregister");
-doit("dh_shlibdeps");
-doit("dh_gencontrol");
-doit("dh_makeshlibs");
-
-# Check to see if the install scripts have #DEBHELPER# in them, if not,
-# warn.
-@filelist=();
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       foreach $file (qw{postinst postrm preinst prerm}) {
-               $f=pkgfile($PACKAGE,$file);
-               if ($f) {
-                       open (IN,$f);
-                       $found=undef;
-                       while (<IN>) {
-                               if (/#DEBHELPER#/) {
-                                       $found=1;
-                                       last;
-                               }
-                       }
-                       if (! $found) {
-                               push @filelist, $f;
-                       }
-               }
-       }
-}
-if (@filelist) {
-       warning("The following scripts do not contain \"#DEBHELPER#\" in them,");
-       warning("and so debhelper will not automatically add commands to them:");
-       warning(join(" ",@filelist));
-}
-
-doit("dh_installdeb");
-
-if (! $ds{SUMS}) {
-       doit("dh_md5sums");
-}
-
-# This causes the main binary package to be built, which
-# real debstd does not do. Shouldn't be a problem though,
-# if that package gets built twice.
-doit("dh_builddeb");
diff --git a/dh_debstd.1 b/dh_debstd.1
deleted file mode 100644 (file)
index e47e64a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-.TH DH_DEBSTD 1
-.SH NAME
-dh_debstd \- mimic debstd with debhelper commands
-.SH SYNOPSIS
-.B dh_debstd
-.I "[-v] [--no-act] [-m] [-c] [-u] [-s] [[changelog] file ...]"
-.SH "DESCRIPTION"
-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
-dh_debstd is not intended to really be used in building an official debian
-package. Instead, it is intended to help you convert your package that uses
-debstd over to debhelper. If you run dh_debstd with the same parameters you
-passed to debstd, and use the --verbose and --no-act flags, you can see what
-debhelper commands dh_debstd runs, and copy those commands into debian/rules
-to get a start on converting to debhelper.
-.P
-See
-.BR debstd (1)
-for a complete description of what this program does.
-.SH "DEBHELPER STYLE 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 this command
-will output a list of what it would have done.
-.SH "DEBSTD STYLE OPTIONS"
-.TP
-.B \-m
-Switch off automatic man page installation.
-.TP
-.B \-c
-Switch off automatic file compression.
-.TP
-.B \-u
-Enable generation of symlinks to undocumented(7) man page.
-.TP
-.B \-s
-Switch off md5sum file generation.
-.TP
-.B changelog
-Install this file as the upstream changelog. Only happens if it's name
-contains "change", "news", or "history" (not case sensative).
-.TP
-.B file ...
-Install these files as documentation.
-.SH NOTES
-Unlike debstd, dh_debstd does not automatically modify maintainer scripts
-such as the postinst, posrm, etc. To get those scripts to be modified, you
-have to place "#DEBHELPER#" in them at the location you want debhelper to
-insert commands. To help you remember to do that, a warning message will be
-generated if dh_debstd notices scripts without "#DEBHELPER#" in them.
-.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/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. 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 b/dh_du
deleted file mode 100755 (executable)
index d035899..0000000
--- a/dh_du
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Generate a DEBIAN/du file, that lists the disk usage of the directories in 
-# the package.
-#
-# No longer - it was decided these files are a bad idea.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-
-warning("this program does nothing and is deprecated. Remove it from debian/rules.");
diff --git a/dh_du.1 b/dh_du.1
deleted file mode 100644 (file)
index aa3849e..0000000
--- a/dh_du.1
+++ /dev/null
@@ -1,16 +0,0 @@
-.TH DH_DU 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_du \- generate DEBIAN/du file (deprecated)
-.SH SYNOPSIS
-.B dh_du
-.SH "DESCRIPTION"
-dh_du is a debhelper program that was responsible for generating
-a DEBIAN/du file, which listed the disk usage of directories in the package.
-.P
-This program is now deprecated, 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 debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index ba4e74d643d982b30b534a0bb17069b0befc157f..1a35c78d0973300c1c844af373a7fe95789a650c 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Do some general file permission fixups.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_fixperms - fix permissions of files in package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_fixperms> [S<I<debhelper options>>] [B<-X>I<item>]
+
+=head1 DESCRIPTION
+
+dh_fixperms is a debhelper program that is responsible for setting the
+permissions of files and directories in package build directories to a
+sane state -- a state that complies with Debian policy.
+
+dh_fixperms makes all files in usr/share/doc in the package build directory
+(excluding files in the examples/ directory) be mode 644. It also changes
+the permissions of all man pages to mode 644. It makes all files be owned by
+root, and it removes group and other write permission from all files.
+It removes execute permissions from any libraries that have it set. It makes
+all files in bin/ directories and etc/init.d executable (v4 only). Finally,
+it removes the setuid and setgid bits from all files in the package.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-X>I<item>, B<--exclude> I<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.
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
-       if (! defined($dh{EXCLUDE_FIND}) || $dh{EXCLUDE_FIND} eq '') {
-               $find_options="";
-       }
-       else {
+       my $find_options='';
+       if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
                $find_options="! \\( $dh{EXCLUDE_FIND} \\)";
        }
 
        # General permissions fixing.
-       complex_doit("find $TMP ! -type l $find_options -print0",
-               "2>/dev/null | xargs -0r chown root.root");
-       complex_doit("find $TMP ! -type l $find_options -print0",
+       complex_doit("find $tmp $find_options -print0",
+               "2>/dev/null | xargs -0r chown --no-dereference 0.0");
+       complex_doit("find $tmp ! -type l $find_options -print0",
                "2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s");
                
-
-       # Fix up premissions in usr/doc, setting everything to not exectable
-       # by default, but leave examples directories alone.
-       complex_doit("find $TMP/usr/share/doc $TMP/usr/doc -type f $find_options ! -regex '.*/examples/.*' -print0",
-               "2>/dev/null | xargs -0r chmod 644");
-       complex_doit("find $TMP/usr/share/doc $TMP/usr/doc -type d $find_options -print0",
-               "2>/dev/null | xargs -0r chmod 755");
+       # Fix up premissions in usr/share/doc, setting everything to not
+       # executable by default, but leave examples directories alone.
+       complex_doit("find $tmp/usr/share/doc -type f $find_options ! -regex '$tmp/usr/share/doc/[^/]*/examples/.*' -print0 2>/dev/null",
+               "| xargs -0r chmod 644");
+       complex_doit("find $tmp/usr/share/doc -type d $find_options -print0 2>/dev/null",
+               "| xargs -0r chmod 755");
 
        # Executable man pages are a bad thing..
-       complex_doit("find $TMP/usr/share/man $TMP/usr/man/ $TMP/usr/X11*/man/ -type f",
+       complex_doit("find $tmp/usr/share/man $tmp/usr/man/ $tmp/usr/X11*/man/ -type f",
                "$find_options -print0 2>/dev/null | xargs -0r chmod 644");
 
        # ..and so are executable shared and static libraries 
-       # (and .la files from libtool)
-       complex_doit("find $TMP -perm -5 -type f",
+       # (and .la files from libtool) ..
+       complex_doit("find $tmp -perm -5 -type f",
                "\\( -name '*.so*' -or -name '*.la' -or -name '*.a' \\) $find_options -print0",
+               "2>/dev/null | xargs -0r chmod 644");
+       
+       # .. and perl modules.
+       complex_doit("find $tmp/usr/lib/perl5 $tmp/usr/share/perl5 -type f",
+               "-perm -5 -name '*.pm' $find_options -print0",
                "2>/dev/null | xargs -0r chmod a-X");
+       
+       # v4 only
+       if (! compat(3)) {
+               # Programs in the bin and init.d dirs should be executable..
+               for my $dir (qw{usr/bin bin usr/sbin sbin etc/init.d}) {
+                       if (-d "$tmp/$dir") {
+                               complex_doit("find $tmp/$dir -type f $find_options -print0 2>/dev/null",
+                                       "| xargs -0r chmod +x");
+                       }
+               }
+       }
+       
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_fixperms.1 b/dh_fixperms.1
deleted file mode 100644 (file)
index 2822e27..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-.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 "[debhelper options] [-Xitem]"
-.SH "DESCRIPTION"
-dh_fixperms is a debhelper program that is responsible for setting the
-permissions of files and directories in package build directories to a
-sane state -- a state that complies with Debian policy.
-.P
-dh_fixperms makes all files in usr/doc in the package build directory
-(excluding files in the examples/ directory) be mode 644. It also changes 
-the permissions of all man pages to mode 644. It makes all files be owned by 
-root, and it removes group and other write permission from all files.
-It removes execute permissions from any libraries that have it set. Finally,
-it removes the setuid and setgid bits from all files in the package.
-.SH OPTIONS
-.TP
-.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 ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index a2d152c432e367613daf7931efeaf19d7c0ae5b2..4e9ff3e892203357b29e6e02448c8fea738480be 100755 (executable)
@@ -1,30 +1,80 @@
 #!/usr/bin/perl -w
-#
-# Generate and install the control file. Simple dpkg-gencontrol wrapper.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_gencontrol - generate and install control file
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_gencontrol> [S<I<debhelper options>>] [S<B<--> I<params>>]
+
+=head1 DESCRIPTION
+
+dh_gencontrol is a debhelper program that is responsible for generating
+control files, and installing them into the DEBIAN directory with the
+proper permissions.
+
+This program is merely a wrapper around L<dpkg-gencontrol(1)>, which calls
+it once for each package being acted on, and passes in some additional
+useful flags including "-isp". 
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-u>I<params>, B<--dpkg-gencontrol-params>I<params>
+
+=item B<--> I<params>
+
+Pass "params" to L<dpkg-gencontrol(1)>.
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $EXT=pkgext($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $ext=pkgext($package);
        
-       $changelog=pkgfile($PACKAGE,'changelog');
+       my $changelog=pkgfile($package,'changelog');
        if (! $changelog) {
                $changelog='debian/changelog';
        }
 
-       if ( ! -d '$TMP/DEBIAN' ) {
-               doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+       if ( ! -d "$tmp/DEBIAN" ) {
+               doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
        }
 
        # Generate and install control file.
-       doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
-               "-Tdebian/$EXT\substvars","-P$TMP",@{$dh{U_PARAMS}});
+       my @command="dpkg-gencontrol";
+       if (GetPackages() > 1) {
+               push @command, "-p$package";
+       }
+       doit(@command, "-l$changelog", "-isp", "-Tdebian/${ext}substvars", 
+               "-P$tmp",@{$dh{U_PARAMS}});
 
-       # This chmod is only necessary if the user sets the umask to something odd.
-       doit("chmod","644","$TMP/DEBIAN/control");
+       # This chmod is only necessary if the user sets the umask to
+       # something odd.
+       doit("chmod","644","$tmp/DEBIAN/control");
        
-       doit("chown","root.root","$TMP/DEBIAN/control");
+       doit("chown","0.0","$tmp/DEBIAN/control");
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_gencontrol.1 b/dh_gencontrol.1
deleted file mode 100644 (file)
index 7918261..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH DH_GENCONTROL 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_gencontrol \- generate and install control file
-.SH SYNOPSIS
-.B dh_gencontrol
-.I "[debhelper options] [-uparams]"
-.SH "DESCRIPTION"
-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 debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B \-uparams, \--dpkg-gencontrol-params=params
-Pass "params" to 
-.BR dpkg-gencontrol (1)
-.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 dpkg-shlibdeps (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_getopt.pl b/dh_getopt.pl
deleted file mode 100755 (executable)
index 4d1d390..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/perl
-#
-# Because the getopt() program is so horribly broken, I wrote my own argument
-# processer that uses the find Getopt::Long module. This is used by all
-# debhelper shell scripts.
-#
-# Joey Hess, GPL copyright 1998.
-
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use strict;
-use Dh_Getopt;
-
-# This is a tricky (and nasty) bit: override the error() function, which
-# comes from Dh_Lib, with one of our own so we print out the list of errors
-# to the shell, which can do what it wants with them.
-sub Dh_Getopt::error { my $message=shift;
-       print "DH_PARSE_ERROR='$message'\n";
-       exit 1;
-}
-
-# Parse options.
-my %options=Dh_Getopt::parseopts();
-
-# Change a few lists in %options into strings,
-# generate some options that only need to be visible to the
-# shell scripts so Dh_Getopt doesn't bother generating.
-$options{DOPACKAGES}=join " ",@{$options{DOPACKAGES}};
-if ($#{$options{EXCLUDE}} > -1) {
-       $options{EXCLUDE_GREP}=join '|', @{$options{EXCLUDE}};
-}
-$options{EXCLUDE}=join " ",@{$options{EXCLUDE}};
-
-# Check to see if DH_VERBOSE environment variable was set, if so,
-# make sure verbose is on.
-if (defined $main::ENV{DH_VERBOSE}) {
-       if ($main::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 (defined $main::ENV{DH_NO_ACT}) {
-       if ($main::ENV{DH_NO_ACT} ne undef) {
-               $options{NO_ACT}=1;
-       }
-}
-
-# Now output everything, in a format suitable for a shell to eval it.
-foreach (keys(%options)) {
-       if (defined $options{$_}) {
-               print "DH_$_='$options{$_}'\n";
-       }
-}
-
-# This sets $@ in the shell to whatever arguements remain.
-print "set -- @ARGV\n"
diff --git a/dh_install b/dh_install
new file mode 100755 (executable)
index 0000000..5dff462
--- /dev/null
@@ -0,0 +1,238 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_install - install files into package build directories
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_install> [B<-X>I<item>] [B<--autodest>] [B<--list-missing>] [B<--sourcedir=>I<dir>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
+
+=head1 DESCRIPTION
+
+dh_install is a debhelper program that handles installing files into package
+build directories. There are many dh_install* commands that handle installing
+specific types of files such as documentation, examples, man pages, and so on,
+and they should be used when possible as they often have extra intelligence for
+those particular tasks. dh_install, then, is useful for installing everything
+else, for which no particular intelligence is needed. It is a replacement for
+the old dh_movefiles command.
+
+Files named debian/package.install list the files to install into each
+package and where they should be installed to. The format is a set of
+lines, where each line lists a file or files to install, and at the end of
+the line tells the directory it should be installed in. The name of the
+files (or directories) to install should be given relative to the current
+directory, while the installation directory is given relative to the
+package build directory. You may use wildcards in the names of the files to
+install (in v3 mode and above).
+
+This program may be used in one of two ways. If you just have a file or two
+that the upstream Makefile does not install for you, you can run dh_install
+on them to move them into place. On the other hand, maybe you have a large
+package that builds multiple binary packages. You can use the upstream Makefile
+to install it all into debian/tmp, and then use dh_install to copy
+directories and files from there into the proper package build directories.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-Xitem>, B<--exclude=item>
+
+Exclude files that contain "item" anywhere in their filename from
+being installed.
+
+=item B<--autodest>
+
+Guess as the destination directory to install things to. If this is
+specified, you should not list destination directories in
+debian/package.install files or on the command line. Instead, dh_install
+will guess as follows:
+
+Strip off debian/tmp (or the sourcedir if one is given) from the front of
+the filename, if it is present, and install into the dirname of the
+filename. So if the filename is debian/tmp/usr/bin, then that directory
+will be copied to debian/package/usr/. If the filename is
+debian/tmp/etc/passwd, it will be copied to debian/package/etc/.
+
+Note that if you list only a filename on a line by itself in a
+debian/package.install file, with no explicit destination, then dh_install
+will automatically guess the destination even if this flag is not set.
+
+=item B<--list-missing>
+
+This option makes dh_install keep track of the files it installs, and then at
+the end, compare that list with the files in the source directory. If any of
+the files (and symlinks) in the source directory were not installed to
+somewhere, it will warn on stderr about that.
+
+This may be useful if you have a large package and want to make sure that
+you don't miss installing newly added files in new upstream releases.
+
+Note that files that are excluded from being moved via the -X option are not
+warned about.
+
+=item B<--sourcedir=dir>
+
+Makes all source files be found under dir. If this is specified, it is
+akin to all the source filenames having "dir/" prepended to them.
+
+To make dh_install behave like the old dh_movefiles, move your
+package.files file to package.install and call dh_install with
+"--sourcedir=debian/tmp" appended to the command. This will
+approximate dh_movefiles behaviour, except it will copy files instead
+of moving them.
+
+=item I<file [...] dest>
+
+Lists files (or directories) to install and where to install them to.
+The files will be installed into the first package dh_install acts on.
+
+=back
+
+=cut
+
+init();
+
+my @installed;
+
+my $srcdir = '.';
+$srcdir = $dh{SOURCEDIR}."/" if defined $dh{SOURCEDIR};
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"install");
+
+       my @install;
+       if ($file) {
+               @install=filedoublearray($file); # no globbing yet
+       }
+       
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+               push @install, [@ARGV];
+       }
+
+       # Support for -X flag.
+       my $exclude = '';
+       if ($dh{EXCLUDE_FIND}) {
+               $exclude = '! \( '.$dh{EXCLUDE_FIND}.' \)';
+       }
+       
+       foreach my $set (@install) {
+               my $dest;
+               my $tmpdest=0;
+               
+               if (! defined $dh{AUTODEST} && @$set > 1) {
+                       $dest=pop @$set;
+               }
+               # glob now, relative to srcdir
+               foreach my $src (map { glob "$srcdir/$_" } @$set) { 
+                       next if excludefile($src);
+               
+                       if (! defined $dest) {
+                               # Guess at destination directory.
+                               $dest=$src;
+                               my $strip=$srcdir;
+                               if ($strip eq '.') {
+                                       $strip = "debian/tmp";
+                               }
+                               $dest=~s/^(.*\/)?\Q$strip\E//;
+                               $dest=dirname($dest);
+                               $tmpdest=1;
+                       }
+                       
+                       # Make sure the destination directory exists.
+                       if (! -e "$tmp/$dest") {
+                               doit("install","-d","$tmp/$dest");
+                       }
+
+                       # Keep track of what's installed.
+                       if ($dh{LIST_MISSING}) {
+                               # Kill any extra slashes. Makes the
+                               # @installed stuff more robust.
+                               $src=~y:/:/:s;
+                               $src=~s:/+$::;
+                               $src=~s:^(\./)*::;
+                               push @installed, "\Q$src\E\/.*|\Q$src\E";
+                       }
+                       
+                       if (-d $src && $exclude) {
+                               my ($dir_basename) = basename($src);
+                               # Pity there's no cp --exclude ..
+                               my $pwd=`pwd`;
+                               chomp $pwd;
+                               complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type f -or -type l \\) -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+                               # cp is annoying so I need a separate pass
+                               # just for empty directories
+                               complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type d -and -empty \\) -exec cp --parents -a {} $pwd/$tmp/$dest/ \\;");
+                       }
+                       else {
+                               doit("cp", "-a", $src, "$tmp/$dest/");
+                       }
+
+                       if ($tmpdest) {
+                               $dest=undef;
+                       }
+               }
+       }
+}
+
+if ($dh{LIST_MISSING}) {
+       
+       # . as srcdir makes no sense, so this is a special case.
+       if ($srcdir eq '.') {
+               $srcdir='debian/tmp';
+       }
+       
+       my @missing;
+       my $installed=join("|", @installed);
+       $installed=qr{^$installed$};
+       find(sub {
+               -f || -l || return;
+               $_="$File::Find::dir/$_";
+               push @missing, $_ unless /$installed/ || excludefile($_);
+       }, $srcdir);
+       if (@missing) {
+               warning "$_ exists in debian/tmp but not installed to anywhere" foreach @missing;
+       }
+}
+
+=head1 EXAMPLE
+
+Suppose your package's upstream Makefile installs a binary, a man page, and
+a library into appropriate subdirectories of debian/tmp. You want to put
+the library into package libfoo, and the rest into package foo. Your rules
+file will run "dh_install --sourcedir=debian/tmp". Make debian/foo.install
+contain:
+
+  usr/bin
+  usr/share/man/man1
+
+While debian/libfoo.install contains:
+
+  usr/libfoo*.so.*
+
+If you want a libfoo-dev package too, debian/libfoo-dev.install might contain:
+
+  usr/include
+  usr/lib/libfoo*.so
+  usr/share/man/man3
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installcatalogs b/dh_installcatalogs
new file mode 100755 (executable)
index 0000000..fdaf0fa
--- /dev/null
@@ -0,0 +1,115 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installcatalogs - install and register SGML Catalogs
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+my $sgmlbasever = "1.17";
+
+=head1 SYNOPSIS
+
+B<dh_installcatalogs> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_installcatalog is a debhelper program that installs and
+registers SGML catalogs. (Note: it will be extended for XML catalog
+registration when xml-core is available.)  It complies with the Debian
+XML/SGML policy.
+
+The file F<debian/I<package>.sgmlcatalogs> contains the catalogs to be
+installed per package.  Each line in that file should be of the form
+C<source dest>, where C<source> indicates where the catalog resides in
+the source tree, and C<dest> indicates the destination location for
+the catalog under the package build area.  C<dest> should start with
+F</usr/share/sgml/>.
+
+Catalogs will be registered in a supercatalog, in
+F</etc/sgml/I<package>.cat>.
+
+This command automatically adds maintainer script snippets for
+registering and unregistering the catalogs and "supercatalogs" (unless
+B<-n> is used).  A dependancy on B<sgml-base> will be added to
+C<${misc:Depends}>, so be sure your package uses that variable in
+F<debian/control>.  See L<dh_installdeb(1)> for an explantion of
+Debhelper maintainer script snippets.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify F<postinst>/F<postrm>/F<prerm> scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be
+called between invocations of this command. Otherwise, it may cause
+multiple instances of the same text to be added to maintainer scripts.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmpdir = tmpdir($package);
+       my $sgmlcatlistfile = pkgfile($package, "sgmlcatalogs");
+       my @sgmlinstalled; # catalogs we've installed
+       if ($#ARGV >= 0) {
+               error("extra command-line arguments");
+       }
+       if ($sgmlcatlistfile) {
+               foreach my $line (filedoublearray($sgmlcatlistfile)) {
+                       my $source = $line->[0];
+                       my $dest = $line->[1];
+                       my $fulldest = "$tmpdir/$dest"; 
+                       $fulldest =~ s|//|/|g; # beautification
+       
+                       if (! -d dirname($fulldest)) {
+                               doit("install","-d","-m755",dirname($dest));
+                       }
+
+                       doit("install","-p","-m644",$source,$fulldest);
+       
+                       push(@sgmlinstalled,$dest);
+               }
+       }
+       if (@sgmlinstalled) {
+               addsubstvar($package, "misc:Depends", "sgml-base", ">= $sgmlbasever");
+
+               if (! $dh{NOSCRIPTS}) {
+                       my $ordcats = join(" ", @sgmlinstalled);
+                       my $centralcat = "/etc/sgml/$package.cat";
+                       autoscript($package, "postinst", "postinst-sgmlcatalog",
+                                  "s%#CENTRALCAT#%$centralcat%g; s%#ORDCATS#%$ordcats%g;");
+                       autoscript($package, "prerm", "prerm-sgmlcatalog",
+                                  "s%#CENTRALCAT#%$centralcat%g;");
+                       autoscript($package, "postrm", "postrm-sgmlcatalog",
+                                  "s%#CENTRALCAT#%$centralcat%g;");
+               }
+       }
+       else {
+               # remove the dependency
+               addsubstvar($package, "misc:Depends", "sgml-base", ">= $sgmlbasever", 1);
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+F</usr/share/doc/sgml-base-doc/>
+
+=head1 AUTHOR
+
+Adam Di Carlo <aph@debian.org>
+
+=cut
index 3ebb04ec1920984405f1b8805621b295c288c508..66a02558d87201ab6f252ea5f90ad15bd7e013f2 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Installs debian/changelog. If another filename is passed to it, installs
-# that file as the upstream changelog.
-#
-# Looks at debian/control to determine if this is a native debian package,
-# if so, the debian changelog is just installed as "changelog", and it is an 
-# error to specify an upstream changelog on the command line.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+
+=head1 NAME
+
+dh_installchangelogs - install changelogs into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installchangelogs> [<S<I<debhelper options>>] [B<-k>] [I<upstream>]
+
+=head1 DESCRIPTION
+
+dh_installchangelogs is a debhelper program that is responsible for
+installing changelogs into package build directories.
+
+dh_installchangelogs determines if the package is a debian native package,
+and if so, it installs debian/changelog into usr/share/doc/package/changelog
+in the package build directory. Otherwise, it installs debian/changelog
+into usr/share/doc/package/changelog.Debian in the package build directory. (If
+files named debian/package.changelog exist, they will be used in preference
+to debian/changelog.)
+
+Parallelling the debian changelog handling, this program also takes care of
+NEWS.Debian files. If there is a debian/NEWS file, it is installed as
+usr/share/doc/package/NEWS.Debian. debian/package.NEWS files can also be
+used.
+
+If an upstream changelog file is specified as an option, and the package is
+not a native debian package, then this upstream changelog will be installed
+as usr/share/doc/package/changelog in the package build directory. If the
+changelog is a html file (determined by file extension), it will be
+installed as usr/share/doc/package/changelog.html instead, and will be
+converted to plain text with html2text to generate
+usr/share/doc/package/changelog.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-k>, B<--keep>
+
+Keep the original name of the upstream changelog. This will be accomplished
+by installing the upstream changelog as "changelog", and making a symlink from
+that to the original name of the changelog file. This can be useful if the
+upstream changelog has an unusual name, or if other documentation in the
+package refers to the changelog file.
+
+=item I<upstream>
+
+Install this file as the upstream changelog.
+
+=back
+
+=head1 NOTES
+
+It is an error to specify an upstream changelog file for a debian native
+package.
+
+=cut
+
 init();
 
-$upstream=shift;
+my $upstream=shift;
 
 if (isnative($dh{MAINPACKAGE}) && defined $upstream) {
        error("Cannot specify an upstream changelog for a native debian package.");
 }
 
+my $changelog_name="changelog.Debian";
 if (isnative($dh{MAINPACKAGE})) {
        $changelog_name='changelog';
 }
-else {
-       $changelog_name='changelog.Debian';
-}
+my $news_name="NEWS.Debian";
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $changelog=pkgfile($PACKAGE,"changelog");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $changelog=pkgfile($package,"changelog");
+       my $news=pkgfile($package,"NEWS");
 
        if (!$changelog) {
                $changelog="debian/changelog";
        }
+       if (!$news) {
+               $news="debian/NEWS";
+       }
 
        if (! -e $changelog) {
                error("could not find changelog $changelog");
        }
 
-       if (! -d "$TMP/usr/doc/$PACKAGE") {
-               doit("install","-d","$TMP/usr/doc/$PACKAGE");
+       if (! -d "$tmp/usr/share/doc/$package") {
+               # If it is a dangling symlink, then don't do anything.
+               # Think multi-binary packages that depend on each other and
+               # want to link doc dirs.
+               next if -l "$tmp/usr/share/doc/$package";
+
+               doit("install","-d","$tmp/usr/share/doc/$package");
+       }
+       doit("install","-o",0,"-g",0,"-p","-m644",$changelog,
+               "$tmp/usr/share/doc/$package/$changelog_name");
+       if (-e $news) {
+               doit("install","-o",0,"-g",0,"-p","-m644",$news,
+                       "$tmp/usr/share/doc/$package/$news_name");
        }
-       doit("install","-o","root","-g","root","-p","-m644",$changelog,
-               "$TMP/usr/doc/$PACKAGE/$changelog_name");
 
        if ($upstream) {
+               my $link_to;
                if ($upstream=~m/\.html?$/i) {
                        # HTML changelog
-                       doit("install","-o","root","-g","root","-p","-m644",
-                               $upstream,"$TMP/usr/doc/$PACKAGE/changelog.html");
-                       doit("ln", "-sf", 'changelog.html',
-                               "$TMP/usr/doc/$PACKAGE/changelog");
+                       doit("install","-o",0,"-g",0,"-p","-m644",
+                               $upstream,"$tmp/usr/share/doc/$package/changelog.html");
+                       doit("html2text","-nobs","-o","$tmp/usr/share/doc/$package/changelog",$upstream);
+                       $link_to='changelog.html';
                }
                else {
-                       doit("install","-o","root","-g","root","-p","-m644",
-                               $upstream,"$TMP/usr/doc/$PACKAGE/changelog");
+                       doit("install","-o",0,"-g",0,"-p","-m644",
+                               $upstream,"$tmp/usr/share/doc/$package/changelog");
+                       $link_to='changelog';
                }
                if ($dh{K_FLAG}) {
                        # Install symlink to original name of the upstream changelog file.
                        # Use basename in case original file was in a subdirectory or something.
-                       doit("ln","-sf","changelog","$TMP/usr/doc/$PACKAGE/".Dh_Lib::basename($upstream));
+                       doit("ln","-sf",$link_to,"$tmp/usr/share/doc/$package/".basename($upstream));
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installchangelogs.1 b/dh_installchangelogs.1
deleted file mode 100644 (file)
index b346eef..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-.TH DH_INSTALLCHANGELOGS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installchangelogs \- install changelogs into package build directories
-.SH SYNOPSIS
-.B dh_installchangelogs
-.I "[debhelper options] [-k] [upstream]"
-.SH "DESCRIPTION"
-dh_installchangelogs is a debhelper program that is responsible for installing
-changelogs into package build directories.
-.P
-dh_installchangelogs determines if the package is a debian native package,
-and if so, it installs debian/changelog into usr/doc/package/changelog in
-the package build directory. Otherwise, it installs debian/changelog into
-usr/doc/package/changelog.Debian in the package build directory. (If files
-named debian/package.changelog exist, they will be used in preference to
-debian/changelog.)
-.P
-If an upstream changelog file is specified as an option, and the package is
-not a native debian package, then this upstream changelog will be installed
-as usr/doc/package/changelog in the package build directory. If the
-changelog is a html file (determined by file extention), it will be
-installed as usr/doc/package/changelog.html instead (with a link to
-usr/doc/package/changelog).
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B \-k, \--keep
-Keep the original name of the upstream changelog. This will be accomplished
-by installing the upstream changelog as "changelog", and making a symlink from
-that to the original name of the changelog file. This can be useful if the
-upstream changelog has an unusual name, or if other documentation in the
-package refers to the changelog file.
-.TP
-.B upstream
-Install this file as the upstream changelog.
-.SH NOTES
-It is an error to specify an upstream changelog file for a debian native
-package.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 5b872aca96f6bac3f95ffb3fbf55e0565aa1a937..d28277c57e52565e47f87aab97d2af2500b3aaa2 100755 (executable)
@@ -1,28 +1,58 @@
 #!/usr/bin/perl -w
-#
-# Install cron scripts into the appropriate places.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installcron - install cron scripts into etc/cron.*
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installcron> [S<B<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_installcron is a debhelper program that is responsible for installing
+cron scripts into etc/cron.*/ in package build directories. The files
+debian/package.cron.daily, debian/package.cron.weekly,
+debian/package.cron.monthly, and debian/package.cron.d are installed.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       foreach $type (qw{daily weekly monthly}) {
-               $cron=pkgfile($PACKAGE,"cron.$type");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       foreach my $type (qw{daily weekly monthly}) {
+               my $cron=pkgfile($package,"cron.$type");
                if ($cron) {
-                       if (! -d "$TMP/etc/cron.$type") {
-                               doit("install","-o","root","-g","root","-d","$TMP/etc/cron.$type");
+                       if (! -d "$tmp/etc/cron.$type") {
+                               doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.$type");
                        }
-                       doit("install",$cron,"$TMP/etc/cron.$type/$PACKAGE");
+                       doit("install",$cron,"$tmp/etc/cron.$type/$package");
                }
        }
        # Seperate because this needs to be mode 644.
-       $cron=pkgfile($PACKAGE,"cron.d");
+       my $cron=pkgfile($package,"cron.d");
        if ($cron) {
-               if (! -d "$TMP/etc/cron.d") {
-                       doit("install","-o","root","-g","root","-d","$TMP/etc/cron.d");
+               if (! -d "$tmp/etc/cron.d") {
+                       doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.d");
                }       
-               doit("install","-m",644,$cron,"$TMP/etc/cron.d/$PACKAGE");
+               doit("install","-m",644,$cron,"$tmp/etc/cron.d/$package");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installcron.1 b/dh_installcron.1
deleted file mode 100644 (file)
index a83f040..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH DH_INSTALLCRON 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installcron \- install cron scripts into etc/cron.*
-.SH SYNOPSIS
-.B dh_installcron
-.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
-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 
-debian/package.cron.daily, where "package" is replaced with the name of the 
-binary package this cron script goes into.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index d3eebe762e4cc3c64e3b3b65bb0f829275a291cf..9527ff2e293459e6765351d6abd282ba90c05f3d 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Install files from debian/ into the package's DEBIAN directory.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installdeb - install files into the DEBIAN directory
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installdeb> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_installdeb is a debhelper program that is responsible for installing
+files into the DEBIAN directories in package build directories with the
+correct permissions.
+
+dh_installdeb automatically installs the following files from debian/ into
+the DEBIAN directory:
+  package.postinst
+  package.preinst
+  package.postrm
+  package.prerm
+  package.shlibs
+  package.conffiles
+
+The postinst, preinst, postrm, and prerm are handled specially: If a
+corresponding file named debian/package.script.debhelper exists, the contents
+of that file are merged into the script as follows: If the script exists,
+then anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper
+file is inserted. If the script does not exist, then a script is generated
+from the .debhelper file. The .debhelper files are created by other debhelper
+programs, such as L<dh_installmenu(1)>, and are shell script fragments.
+
+In V3 compatibility mode and higher, all files in the etc/ directory in a
+package will automatically be flagged as conffiles by this program, so
+there is no need to list them manually in package.conffiles.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $EXT=pkgext($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $ext=pkgext($package);
 
-       if (! -d "$TMP/DEBIAN") {
-               doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+       if (! -d "$tmp/DEBIAN") {
+               doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
        }
 
        # Install debian install scripts.
        # If any .debhelper files exist, add them into the scripts.
-       foreach $file (qw{postinst preinst prerm postrm}) {
-               $f=pkgfile($PACKAGE,$file);
+       foreach my $file (qw{postinst preinst prerm postrm}) {
+               my $f=pkgfile($package,$file);
                if ($f) {
-                       if (-f "debian/$EXT$file.debhelper") {
+                       if (-f "debian/$ext$file.debhelper") {
                                # Add this into the script, where it has
                                # #DEBHELPER#
-                               # TODO: do internally, no perl fork?
-                               complex_doit("perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < $f > $TMP/DEBIAN/$file");
+                               complex_doit("perl -pe 's~#DEBHELPER#~qx{cat debian/$ext$file.debhelper}~eg' < $f > $tmp/DEBIAN/$file");
                        }
                        else {
                                # Just get rid of any #DEBHELPER# in the 
                                # script.
-                               complex_doit("sed s/#DEBHELPER#// < $f > $TMP/DEBIAN/$file");
+                               complex_doit("sed s/#DEBHELPER#// < $f > $tmp/DEBIAN/$file");
                        }
-                       doit("chown","root.root","$TMP/DEBIAN/$file");
-                       doit("chmod",755,"$TMP/DEBIAN/$file");
+                       doit("chown","0.0","$tmp/DEBIAN/$file");
+                       doit("chmod",755,"$tmp/DEBIAN/$file");
                }
                else {
                        # Auto-generate script header and add .debhelper
                        # content to it.
-                       if (-f "debian/$EXT$file.debhelper") {
-                               complex_doit("echo '#!/bin/sh -e' > $TMP/DEBIAN/$file");
-                               complex_doit("cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file");
-                               doit("chown","root.root","$TMP/DEBIAN/$file");
-                               doit("chmod",755,"$TMP/DEBIAN/$file");
+                       if (-f "debian/$ext$file.debhelper") {
+                               complex_doit("printf '#!/bin/sh\nset -e\n' > $tmp/DEBIAN/$file");
+                               complex_doit("cat debian/$ext$file.debhelper >> $tmp/DEBIAN/$file");
+                               doit("chown","0.0","$tmp/DEBIAN/$file");
+                               doit("chmod",755,"$tmp/DEBIAN/$file");
                        }
                }
        }
 
        # Install non-executable files
-       foreach $file (qw{shlibs conffiles}) {
-               $f=pkgfile($PACKAGE,$file);
+       foreach my $file (qw{shlibs conffiles}) {
+               my $f=pkgfile($package,$file);
                if ($f) {
-                       doit("install","-o","root","-g","root","-m",644,"-p",$f,"$TMP/DEBIAN/$file");
+                       doit("install","-o",0,"-g",0,"-m",644,"-p",$f,"$tmp/DEBIAN/$file");
+               }
+       }
+
+       # Automatic conffiles registration: If it is in /etc, it is a
+       # conffile.
+       if (! compat(2) && -d "$tmp/etc") {
+               complex_doit("find $tmp/etc -type f -printf '/etc/%P\n' >> $tmp/DEBIAN/conffiles");
+               # Anything found?
+               if (-z "$tmp/DEBIAN/conffiles") {
+                       doit("rm", "-f", "$tmp/DEBIAN/conffiles");
+               }
+               else {
+                       doit("chmod", 644, "$tmp/DEBIAN/conffiles");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installdeb.1 b/dh_installdeb.1
deleted file mode 100644 (file)
index 1d17b96..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-.TH DH_INSTALLDEB 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installdeb \- install files into the DEBIAN directory
-.SH SYNOPSIS
-.B dh_installdeb
-.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
-correct permissions.
-.P
-dh_installdeb automatically installs the following files from debian/ into
-the DEBIAN directory:
-       postinst
-       preinst
-       postrm
-       prerm
-       shlibs
-       conffiles
-.P
-(For packages other than the first binary package listed in debian/control,
-you must prefix these filenames with then name of the "package.", for example,
-"foo.postinst". You can also prefix the filenames the same way for the first
-binary package, for consitency.)
-.P
-The files postinst, preinst, postrm, and prerm are handled specially: If a
-corresponding file named debian/script.debhelper exists, the contents of that 
-file are merged into the script as follows: If the script exists, then 
-anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper file is
-inserted. If the script does not exist, then a script is generated from 
-the .debhelper file. The .debhelper files are created by other debhelper 
-programs, such as 
-.BR dh_installmenu (1)
-, and are shell script fragments.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installdebconf b/dh_installdebconf
new file mode 100755 (executable)
index 0000000..c9c72b2
--- /dev/null
@@ -0,0 +1,139 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installdebconf - install files used by debconf in package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installdebconf> [S<I<debhelper options>>] [B<-n>] [S<B<--> I<params>>]
+
+=head1 DESCRIPTION
+
+dh_installdebconf is a debhelper program that is responsible for installing
+files used by the debconf package into package build directories.
+
+It also automatically generates the postrm commands needed to
+interface with debconf. See L<dh_installdeb(1)> for an explanation of how
+that works.
+
+Files named debian/package.config and debian/package.templates are
+installed into the DEBIAN directory in the package build directory.
+
+Note that if you use debconf, your package probably needs to depend on it
+(it will be added to ${misc:Depends} by this program).
+
+Note that for your config script to be called by dpkg, your postinst
+needs to source debconf's confmodule. dh_installdebconf does not
+install this statement into postinst automatically as it it too hard to
+do it right.
+
+=head1 LOCALIZED TEMPLATE FILES
+
+Debconf also supports localized template files, and this program has some
+support to aid is working with them. It is best to keep the translations in
+.po files under debian/po, and merge them only at build time. See 
+L<po2debconf(1)> and L<debconf-getlang(1)> for details.
+
+This program will look to see if you have a debian/po directory and if so will
+automatically call L<po2debconf(1)> to generate a merged templates file. Or 
+if you have debian/templates.ll files, it will use the older 
+L<debconf-mergetemplate(1)> program to merge those together.
+
+Note that if your package has a debian/po directory it should build-depend on po-debconf.
+
+For example, if you have a German translation,
+strings from debian/po/de.po are merged with debian/package.templates.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postrm script.
+
+=item B<--> I<params>
+
+Pass the params to po2debconf, if it is run or debconf-mergetemplate, if it
+is run.
+
+=back
+
+=cut
+
+init();
+
+my @extraparams;
+if (defined($dh{U_PARAMS})) {
+       @extraparams=@{$dh{U_PARAMS}};
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $config=pkgfile($package,"config");
+       my $templates=pkgfile($package,"templates");
+
+       if (! -d "$tmp/DEBIAN") {
+               doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
+       }
+
+       if ($config ne '') {
+               doit("install", "-o", 0, "-g", 0, "-m", 755, "-p",
+                    $config, "$tmp/DEBIAN/config");
+       }
+       
+       if ($templates ne '') {
+               # Are there old-style translated templates?
+               my @trans=(glob("$templates.??"), glob("$templates.??_??"));
+
+               umask(0022); # since I do a redirect below
+               
+               # Look for po directory.
+               if (-d "debian/po") {
+                       if (@trans) {
+                               warning "ignoring debian/templates.ll files in favour of debian/po directory";
+                       }
+                       complex_doit("po2debconf @extraparams $templates > $tmp/DEBIAN/templates");
+               }
+               elsif (@trans) {
+                       complex_doit("debconf-mergetemplate --drop-old-templates @extraparams @trans $templates > $tmp/DEBIAN/templates");
+                       chmod 0644, "$tmp/DEBIAN/templates";
+                       chown 0, 0, "$tmp/DEBIAN/templates";
+               }
+               else {
+                       doit("install", "-o", 0, "-g", 0, "-m", 644, "-p",
+                            $templates, "$tmp/DEBIAN/templates");
+               }
+       }
+
+       if ($config ne '' || $templates ne '') {
+               # I'm going with debconf 0.5 because it was the first
+               # "modern" one.
+               addsubstvar($package, "misc:Depends", "debconf", ">= 0.5");
+       }
+       else {
+               addsubstvar($package, "misc:Depends", "debconf", ">= 0.5", 1); # remove
+       }
+       
+       if (($config ne '' || $templates ne '') && ! $dh{NOSCRIPTS}) {
+               autoscript($package,"postrm","postrm-debconf");
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installdebfiles b/dh_installdebfiles
deleted file mode 100755 (executable)
index 72c17bc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/perl -w
-#
-# This program is deprecated, but left in the package for backwards
-# compatability. It simply calls the 3 programs that replaced it.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-
-$ENV{PATH}="debian:$ENV{PATH}:/usr/share/debhelper";
-
-warning("use of this program is deprecated, see man page.");
-
-doit("dh_installdeb",@ARGV);
-doit("dh_shlibdeps",@ARGV);
-doit("dh_gencontrol",@ARGV);
diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1
deleted file mode 100644 (file)
index bb66ed5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH DH_INSTALLDEBFILES 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installdebfiles \- install files into the DEBIAN directory (deprecated)
-.SH SYNOPSIS
-.B dh_installdebfiles
-.SH "DESCRIPTION"
-dh_installdebfiles is a debhelper program that is responsible for installing
-files into the DEBIAN directory in package build directories with the
-correct permissions, canculating shared library dependancies, and creating a
-control file.
-.P
-This program is deprecated. It is now merely a wrapper around three other
-programs, and you may replace any calls to this program by:
-.P
-  dh_installdeb
-  dh_shlibdeps
-  dh_gencontrol
-.SH WARNING
-This program will be removed at some time in the future.
-.SH OPTIONS
-Any options passed to this program will be sent to each of the 3 programs
-listed above.
-.SH "SEE ALSO"
-.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 7d5e49c1663185cc594224c7018a1a0206b78eec..3bd4ea8061da50d885c8f90e2b85e9e23ce10d12 100755 (executable)
@@ -1,37 +1,80 @@
 #!/usr/bin/perl -w
-#
-# Reads debian/dirs, creates the directories listed there
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installdirs - create subdirectories in package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installdirs> [S<I<debhelper options>>] [B<-A>] [S<I<dir ...>>]
+
+=head1 DESCRIPTION
+
+dh_installdirs is a debhelper program that is responsible for creating
+subdirectories in package build directories.
+
+Any directory names specified as parameters will be created in the package
+build directory of the first package dh_installdirs is told to act on. By
+default, this is the first binary package in debian/control, but if you use
+-p, -i, or -a flags, it will be the first package specified by those flags.
+
+A file named debian/package.dirs can list other directories to be created.
+Separate the directory names with whitespace.
+
+Be sure to only use directory names relative to the package build
+directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Create any directories specified by command line parameters in ALL packages
+acted on, not just the first.
+
+=item I<dir ...>
+
+Create these directories in the package build directory of the first
+package acted on. (Or in all packages if -A is specified.)
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"dirs");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"dirs");
 
-       if (! -e $TMP) {
-               doit("install","-d",$TMP);
+       if (! -e $tmp) {
+               doit("install","-d",$tmp);
        }
 
-       undef @dirs;
+       my @dirs;
 
        if ($file) {
                @dirs=filearray($file)
        }
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @dirs, @ARGV;
        }       
 
        if (@dirs) {
-               # Stick the $TMP onto the front of all the dirs.
+               # Stick the $tmp onto the front of all the dirs.
                # This is necessary, for 2 reasons, one to make them 
                # be in the right directory, but more importantly, it 
                # protects against the danger of absolute dirs being
                # specified.
                @dirs=map {
-                               $_="$TMP/$_";
+                               $_="$tmp/$_";
                                tr:/:/:s; # just beautification.
                                $_
                          } @dirs;
@@ -40,3 +83,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                doit("install","-d",@dirs);
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installdirs.1 b/dh_installdirs.1
deleted file mode 100644 (file)
index 95be715..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH DH_INSTALLDIRS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installdirs \- create subdirectories in package build directories
-.SH SYNOPSIS
-.B dh_installdirs
-.I "[debhelper options] [-A] [dir ...]"
-.SH "DESCRIPTION"
-dh_installdirs is a debhelper program that is responsible for creating
-subdirectories in package build directories.
-.P
-Any directory names specified as parameters will be created in the package
-build directory of the first package dh_installdirs is told to act on. By
-default, this is the first binary package in debian/control, but if you use 
--p, -i, or -a flags, it will be the first package specified by those flags.
-.P
-A file named debian/package.dirs (debian/dirs may be used for the first
-binary package in debian/control) can list other directories to be created.
-Separate the directory names with whitespace.
-.P
-Be sure to only use directory names relative to the package build
-directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead.
-.SH OPTIONS
-.TP
-.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, 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 ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH BUGS
-It's impossible to specify filenames with spaces or other whitespace in them
-in debian/dirs file. This is more a historical design flaw than a bug.
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 101110da6e2b88dc66d00b46114a752c2571d317..b991162f6787dff90afe432f00fd7774cc28e1a5 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Reads debian/docs, installs all files listed there into /usr/doc/$PACKAGE
-# Also installs the debian/copyright and debian/README.debian and debian/TODO
-# and handles debian/doc-base.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installdocs - install documentation into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installdocs> [S<I<debhelper options>>] [B<-A>] [B<-n>] [B<-X>I<item>] [S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_installdocs is a debhelper program that is responsible for installing
+documentation into usr/share/doc/package in package build directories.
+
+dh_installdocs automatically installs debian/copyright if it exists. If
+dh_installdocs is acting on multiple packages, debian/copyright files will be
+installed into all packages. However, if you need to have seperate copyright
+files for different binary packages, you can use files named
+debian/package.copyright.
+
+Any filenames specified as parameters will be installed into the first
+package dh_installdocs is told to act on. By default, this is the first
+binary package in debian/control, but if you use B<-p>, B<-i>, or B<-a> flags, it
+will be the first package specified by those flags.
+
+Also, debian/README.Debian (or debian/README.debian) and debian/TODO, if
+they exist, will be installed into the first binary package listed in
+debian/control, if dh_installdocs is acting on that package. Note that
+debian/TODO will be installed named TODO.Debian, if the package is not a
+debian native package. Also note that README.debian is installed as
+README.Debian, for consistency. Note that debian/package.README.Debian and
+debian/package.TODO can be used to specify files for subpackages.
+
+Files named debian/package.docs can list other files to be installed.
+
+Files named debian/package.doc-base, will be installed as doc-base control
+files, and will make this program automatically generate the postinst and
+prerm commands needed to interface with the doc-base package. Note that the
+doc-id will be determined from the "Document:" entry in the
+doc-base control file in question.
+
+If your package needs to register more than one document, you need multiple
+files. To accomplish this, you can use files named debian/package.doc-base.*
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Install all files specified by command line parameters in ALL packages
+acted on.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/prerm scripts.
+
+=item B<-Xitem>, B<--exclude=item>
+
+Exclude files that contain "item" anywhere in their filename from
+being installed.
+
+=item I<file ...>
+
+Install these files as documentation into the first package acted on. (Or
+in all packages if B<-A> is specified).
+
+=back
+
+=head1 NOTES
+
+Note that dh_installdocs will happily copy entire directory hierarchies if
+you ask it to (similar to cp -a). If it is asked to install a
+directory, it will install the complete contents of the directory.
+
+Note that this command is not idempotent. "dh_clean B<-k>" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"docs");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"docs");
 
-       if ( ! -d "$TMP/usr/doc/$PACKAGE") {
-               doit("install","-d","$TMP/usr/doc/$PACKAGE");
+       # If this is a symlink, leave it alone.
+       if ( ! -d "$tmp/usr/share/doc/$package" &&
+            ! -l "$tmp/usr/share/doc/$package") {
+               doit("install","-g",0,"-o",0,"-d","$tmp/usr/share/doc/$package");
        }
 
-       undef @docs;
+       my @docs;
 
        if ($file) {
-               @docs=filearray($file);
+               @docs=filearray($file, ".");
        }
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @docs, @ARGV;
        }
 
        if (@docs) {
-               doit("cp","-a",@docs,"$TMP/usr/doc/$PACKAGE/");
-               doit("chmod","-R","go=rX","$TMP/usr/doc");
-               doit("chmod","-R","u+rw","$TMP/usr/doc");
+               my $exclude = '';
+               if ($dh{EXCLUDE_FIND}) {
+                       $exclude = ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+               }
+               foreach my $doc (@docs) {
+                       next if excludefile($doc);
+                       if (-d $doc && $exclude) {
+                           my ($dir_basename) = basename($doc);
+                           # Pity there's no cp --exclude ..
+                           my $pwd=`pwd`;
+                           chomp $pwd;
+                           complex_doit("cd $doc/.. && find $dir_basename -type f$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package \\;");
+                       }
+                       else {
+                               doit("cp","-a",$doc,"$tmp/usr/share/doc/$package");
+                       }
+               }
+               doit("chown","-R","0.0","$tmp/usr/share/doc");
+               doit("chmod","-R","go=rX","$tmp/usr/share/doc");
+               doit("chmod","-R","u+rw","$tmp/usr/share/doc");
        }
 
        # .Debian is correct, according to policy, but I'm easy.
-       $readme_debian=pkgfile($PACKAGE,'README.Debian');
+       my $readme_debian=pkgfile($package,'README.Debian');
        if (! $readme_debian) {
-               $readme_debian=pkgfile($PACKAGE,'README.debian');
+               $readme_debian=pkgfile($package,'README.debian');
        }
-       if ($readme_debian) {
-               doit("install","-m","644","-p","$readme_debian","$TMP/usr/doc/$PACKAGE/README.Debian");
+       if ($readme_debian && ! excludefile($readme_debian)) {
+               doit("install","-g",0,"-o",0,"-m","644","-p","$readme_debian",
+                       "$tmp/usr/share/doc/$package/README.Debian");
        }
 
-       $todo=pkgfile($PACKAGE,'TODO');
-       if ($todo) {
-               if (isnative($PACKAGE)) {
-                       doit("install","-m","644","-p",$todo,"$TMP/usr/doc/$PACKAGE/TODO");
+       my $todo=pkgfile($package,'TODO');
+       if ($todo && ! excludefile($todo)) {
+               if (isnative($package)) {
+                       doit("install","-g",0,"-o",0,"-m","644","-p",$todo,
+                               "$tmp/usr/share/doc/$package/TODO");
                }
                else {
-                       doit("install","-m","644","-p",$todo,"$TMP/usr/doc/$PACKAGE/TODO.Debian");
+                       doit("install","-g",0,"-o",0,"-m","644","-p",$todo,
+                               "$tmp/usr/share/doc/$package/TODO.Debian");
                }
        }
 
-       # Support debian/package.copyright, but if not present, fall back
-       # on debian/copyright for all packages, not just the main binary
-       # package.
-       $copyright=pkgfile($PACKAGE,'copyright');
-       if (! $copyright && -e "debian/copyright") {
-               $copyright="debian/copyright";
-       }
-       if ($copyright) {
-                       doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright");
+       # If the "directory" is a dangling symlink, then don't install
+       # the copyright file. This is useful for multibinary packages 
+       # that share a doc directory.
+       if (-d "$tmp/usr/share/doc/$package") {
+               # Support debian/package.copyright, but if not present, fall
+               # back on debian/copyright for all packages, not just the 
+               # main binary package.
+               my $copyright=pkgfile($package,'copyright');
+               if (! $copyright && -e "debian/copyright") {
+                       $copyright="debian/copyright";
+               }
+               if ($copyright && ! excludefile($copyright)) {
+                               doit("install","-g",0,"-o",0,"-m","644","-p",$copyright,
+                                       "$tmp/usr/share/doc/$package/copyright");
+               }
        }
-       
+
        # Handle doc-base files. There are two filename formats, the usual
        # plus an extended format (debian/package.*).
        my %doc_ids;
@@ -70,15 +177,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        # If this is the main package, we need to handle unprefixed filenames.
        # For all packages, we must support both the usual filename format plus
        # that format with a period an something appended.
-       my $regexp="\Q$PACKAGE\E\.";
-       if ($PACKAGE eq $dh{MAINPACKAGE}) {
+       my $regexp="\Q$package\E\.";
+       if ($package eq $dh{MAINPACKAGE}) {
                $regexp="(|$regexp)";
        }
        foreach my $fn (grep {/^${regexp}doc-base(\..*)?$/} readdir(DEB)) {
                # Parse the file to get the doc id.
                open (IN, "debian/$fn") || die "Cannot read debian/$fn.";
                while (<IN>) {
-                       if (/^Document:\s+(.*)/) {
+                       if (/^Document:\s+(.*)(\s+)?/) {
                                $doc_ids{$fn}=$1;
                                last;
                        }
@@ -88,20 +195,32 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        closedir(DEB);
        
        if (%doc_ids) {
-               if (! -d "$TMP/usr/share/doc-base/") {
-                       doit("install","-d","$TMP/usr/share/doc-base/");
+               if (! -d "$tmp/usr/share/doc-base/") {
+                       doit("install","-g",0,"-o",0,"-d","$tmp/usr/share/doc-base/");
                }
        }
        foreach my $fn (keys %doc_ids) {
-               doit("install","-m644","-p","debian/$fn",
-                    "$TMP/usr/share/doc-base/$doc_ids{$fn}");
+               doit("install","-g",0,"-o",0,"-m644","-p","debian/$fn",
+                    "$tmp/usr/share/doc-base/$doc_ids{$fn}");
                if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-doc-base",
+                       autoscript($package,"postinst","postinst-doc-base",
                                "s/#DOC-ID#/$doc_ids{$fn}/",
                        );
-                       autoscript($PACKAGE,"prerm","prerm-doc-base",
+                       autoscript($package,"prerm","prerm-doc-base",
                                "s/#DOC-ID#/$doc_ids{$fn}/",
                        );
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installdocs.1 b/dh_installdocs.1
deleted file mode 100644 (file)
index e2bc845..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-.TH DH_INSTALLDOCS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installdocs \- install documentation into package build directories
-.SH SYNOPSIS
-.B dh_installdocs
-.I "[debhelper options] [-A] [-n] [file ...]"
-.SH "DESCRIPTION"
-dh_installdocs is a debhelper program that is responsible for installing
-documentation into usr/doc/package in package build directories.
-.P
-dh_installdocs automatically installs debian/copyright if it exists. If
-dh_installdocs is acting on multiple packages, debian/copyright files will be
-installed into all packages. However, if you need to have seperate copyright
-files for different binary packages, you can use files named 
-debian/package.copyright.
-.P
-Any filenames specified as parameters will be installed into the first
-package dh_installdocs is told to act on. By default, this is the first 
-binary package in debian/control, but if you use -p, -i, or -a flags, it 
-will be the first package specified by those flags.
-.P
-Also, debian/README.Debian (or debian/README.debian) and debian/TODO, if 
-they exist, will be installed into the first binary package listed in 
-debian/control, if dh_installdocs is acting on that package. Note that 
-debian/TODO will be installed named TODO.Debian, if the package is not a 
-debian native package. Also note that README.debian is installed as
-README.Debian, for consitency. Note that debian/package.README.Debian and
-debian/package.TODO can be used to specify files for subpackages.
-.P
-A file named debian/package.docs (debian/docs may be used for the first
-binary package in debian/control) can list other files to be installed.
-.P
-A file named debian/package.doc-base (debian/doc-base may be used for the
-first binary package in debian/control), if it exists, will be installed as 
-a doc-base control file, and will make this program automatically generate the
-postinst and prerm commands needed to interface with the doc-base package. See
-.BR dh_installdeb (1)
-for an explanation of how this works.
-Note that the doc-id will be determined from the doc-base control file 
-in question.
-.PP
-If your package needs to register more
-than one document, you need multiple files. To accomplish this, you can use
-files named debian/package.doc-base.*
-.SH OPTIONS
-.TP
-.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
-acted on.
-.TP
-.B \-n, \--noscripts
-Do not modify postinst/prerm scripts.
-.TP
-.B file ...
-Install these files as documentation into the first package acted on. (Or in
-all packages if -A is specified).
-.SH NOTES
-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
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.TP
-.BR install-docs (8)
-.SH BUGS
-It's impossible to specify filenames with spaces or other whitespace in them
-in debian/docs file. This is more a historical design flaw than a bug.
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 3fbaf8ba100e5278f85fb5cc3ec76b1db1889526..80b83e693a206a60a6a76cf61ac6a4b1f16c8730 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Registration with emacsen-common.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installemacsen - register an emacs add on package
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installemacsen> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [B<--flavor=>I<foo>]
+
+=head1 DESCRIPTION
+
+dh_installemacsen is a debhelper program that is responsible for installing
+files used by the debian emacsen-common package into package build
+directories.
+
+It also automatically generates the postinst and prerm commands needed to
+register a package as an emacs add on package. See L<dh_installdeb(1)>
+for an explanation of how this works.
+
+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 . And similarly,
+debian/package.emacsen-startup is installed into
+etc/emacs/site-start.d/50<package>.el (by default).
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/prerm scripts.
+
+=item B<--priority=>I<n>
+
+Sets the priority number of a site-start.d file. Default is 50.
+
+=item B<--flavor=>I<foo>
+
+Sets the flavor a site-start.d file will be installed in. Default is
+"emacs", alternatives include "xemacs" and "emacs20".
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-if (! defined $dh{number}) {
-       $dh{number}=50;
+if (! defined $dh{PRIORITY}) {
+       $dh{PRIORITY}=50;
 }
-if (! defined $dh{flavor}) {
-       $dh{flavor}='emacs';
+if (! defined $dh{FLAVOR}) {
+       $dh{FLAVOR}='emacs';
 }
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
-       $emacsen_install=pkgfile($PACKAGE,"emacsen-install");
-       $emacsen_remove=pkgfile($PACKAGE,"emacsen-remove");
-       $emacsen_startup=pkgfile($PACKAGE,"emacsen-startup");
+       my $emacsen_install=pkgfile($package,"emacsen-install");
+       my $emacsen_remove=pkgfile($package,"emacsen-remove");
+       my $emacsen_startup=pkgfile($package,"emacsen-startup");
 
        if ($emacsen_install ne '') {
-               if (! -d "$TMP/usr/lib/emacsen-common/packages/install") {
-                       doit("install","-d","$TMP/usr/lib/emacsen-common/packages/install");
+               if (! -d "$tmp/usr/lib/emacsen-common/packages/install") {
+                       doit("install","-d","$tmp/usr/lib/emacsen-common/packages/install");
                }
-               doit("install","-m0755",$emacsen_install,"$TMP/usr/lib/emacsen-common/packages/install/$PACKAGE");
+               doit("install","-m0755",$emacsen_install,"$tmp/usr/lib/emacsen-common/packages/install/$package");
        }
 
        if ($emacsen_remove ne '') {
-               if (! -d "$TMP/usr/lib/emacsen-common/packages/remove") {
-                       doit("install","-d","$TMP/usr/lib/emacsen-common/packages/remove");
+               if (! -d "$tmp/usr/lib/emacsen-common/packages/remove") {
+                       doit("install","-d","$tmp/usr/lib/emacsen-common/packages/remove");
                }
-               doit("install","-m0755","$emacsen_remove","$TMP/usr/lib/emacsen-common/packages/remove/$PACKAGE");
+               doit("install","-m0755","$emacsen_remove","$tmp/usr/lib/emacsen-common/packages/remove/$package");
        }
        
        if ($emacsen_startup ne '') {
-               if (! -d "$TMP/etc/$dh{flavor}/site-start.d/") {
-                       doit("install","-d","$TMP/etc/$dh{flavor}/site-start.d/");
+               if (! -d "$tmp/etc/$dh{FLAVOR}/site-start.d/") {
+                       doit("install","-d","$tmp/etc/$dh{FLAVOR}/site-start.d/");
                }
-               doit("install","-m0644",$emacsen_startup,"$TMP/etc/$dh{flavor}/site-start.d/$dh{number}$PACKAGE.el");
+               doit("install","-m0644",$emacsen_startup,"$tmp/etc/$dh{FLAVOR}/site-start.d/$dh{PRIORITY}$package.el");
        }
 
        if ($emacsen_install ne '' || $emacsen_remove ne '') {
                if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-emacsen",
-                               "s/#PACKAGE#/$PACKAGE/");
-                       autoscript($PACKAGE,"prerm","prerm-emacsen",
-                               "s/#PACKAGE#/$PACKAGE/");
+                       autoscript($package,"postinst","postinst-emacsen",
+                               "s/#PACKAGE#/$package/");
+                       autoscript($package,"prerm","prerm-emacsen",
+                               "s/#PACKAGE#/$package/");
                }
        }
-}      
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installemacsen.1 b/dh_installemacsen.1
deleted file mode 100644 (file)
index df1512f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-.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] [--number=n] [--flavor=foo]"
-.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 . And similarly,
-debian/package.emacsen-startup is installed into
-etc/emacs/site-start.d/50<package>.el (by default).
-.P
-For the first first binary package listed in the control file, you may use
-debian/emacsen-install, debian/emacsen-remove, and debian/emacsen-startup 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.
-.TP
-.B \--number=n
-Sets the priority number of a site-start.d file. Default is 50.
-.TP
-.B \--flavor=foo
-Sets the flavor a site-start.d file will be installed in. Default is
-"emacs", alternatives include "xemacs" and "emacs20".
-.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 e8e5e3d64f74849467433a3df9bbf098fb41c9e7..8934e2fb173062697947b17c9b6f13e88182d2ec 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Reads debian/examples, installs all files listed there into
-# /usr/doc/$PACKAGE/examples
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installexamples - install example files into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installexamples> [S<I<debhelper options>>] [B<-A>] [B<-X>I<item>] [S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_installexamples is a debhelper program that is responsible for
+installing examples into usr/share/doc/package/examples in package
+build directories.
+
+Any file names specified as parameters will be installed into the first
+package dh_installexamples is told to act on. By default, this is the first
+binary package in debian/control, but if you use -p, -i, or -a flags, it
+will be the first package specified by those flags.
+
+Files named debian/package.examples can list other files to be installed.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Install any files specified by command line parameters in ALL packages
+acted on.
+
+=item I<file ...>
+
+Install these files as examples into the first package acted on. (Or into
+all packages if -A is specified.)
+
+=item B<-Xitem>, B<--exclude=item>
+
+Exclude files that contain "item" anywhere in their filename from
+being installed.
+
+=back
+
+=head1 NOTES
+
+Note that dh_installexamples will happily copy entire directory hierarchies
+if you ask it to (similar to cp -a). If it is asked to install a
+directory, it will install the complete contents of the directory.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"examples");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"examples");
        
-       undef @examples;
+       my @examples;
        
        if ($file) {
-               @examples=filearray($file);
+               @examples=filearray($file, ".");
        }       
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @examples, @ARGV;
        }
-
+       
        if (@examples) {
-               if (! -d "$TMP/usr/doc/$PACKAGE/examples") {
-                       doit("install","-d","$TMP/usr/doc/$PACKAGE/examples");
+               if (! -d "$tmp/usr/share/doc/$package/examples") {
+                       doit("install","-d","$tmp/usr/share/doc/$package/examples");
+               }
+               
+               my $exclude = '';
+               if ($dh{EXCLUDE_FIND}) {
+                       $exclude = ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';
                }
                
-               doit("cp","-a",@examples,"$TMP/usr/doc/$PACKAGE/examples");
+               foreach my $example (@examples) {
+                       next if excludefile($example);
+                       if (-d $example && $exclude) {
+                               my ($dir_basename) = basename($example);
+                               # Pity there's no cp --exclude ..
+                               my $pwd=`pwd`;
+                               chomp $pwd;
+                               complex_doit("cd $example/.. && find $dir_basename -type f$exclude -exec cp --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples \\;");
+                       }
+                       else {
+                               doit("cp", "-a", $example, "$tmp/usr/share/doc/$package/examples");
+                       }
+               }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installexamples.1 b/dh_installexamples.1
deleted file mode 100644 (file)
index 87ccd1f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-.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 "[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.
-.P
-Any file names specified as parameters will be installed into the first 
-package dh_installexamples is told to act on. By default, this is the first 
-binary package in debian/control, but if you use -p, -i, or -a flags, it
-will be the first package specified by those flags.
-.P
-A file named debian/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 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
-acted on.
-.TP
-.B file ...
-Install these files as examples into the first package acted on. (Or into all
-packages if -A is specified.)
-.SH NOTES
-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
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH BUGS
-It's impossible to specify filenames with spaces or other whitespace in them
-in debian/examples file. This is more a historical design flaw than a bug.
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 2983d28f993c90397c6f6005cb0e33638ecfc505..814c831b58cf1cd0a19c6c64a8929283d23e5f42 100755 (executable)
@@ -1,39 +1,95 @@
 #!/usr/bin/perl -w
-#
-# Reads debian/info, installs all files listed there into /usr/info
-# and puts appropriate commands into the postinst.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installinfo - install and register info files
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installinfo> [S<I<debhelper options>>] [B<-A>] [B<-n>] [S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_installinfo is a debhelper program that is responsible for installing
+info files and registering the files it installs with install-info.
+
+It determines some information about the info files by parsing them, in
+particular, it looks at the INFO-DIR-SECTION line to determine what section
+the info file belongs in.
+
+Any filenames specified as parameters will be installed into the first
+package dh_installinfo is told to act on. By default, this is the first
+binary package in debian/control, but if you use -p, -i, or -a flags, it
+will be the first package specified by those flags.
+
+Files named debian/package.info can list other files to be installed.
+
+dh_installinfo will automatically generate the postinst and prerm commands
+needed to interface with install-info, updating the info . See L<dh_installdeb(1)> for an
+explanation of how this works.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Install all files specified by command line parameters in ALL packages
+acted on.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/prerm scripts.
+
+=item I<file ...>
+
+Install these info files into the first package acted on. (Or in
+all packages if -A is specified).
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"info");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"info");
 
-       undef @info;
+       my @info;
        
        if ($file) {
-               @info=filearray($file);
+               @info=filearray($file, ".");
        }
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @info, @ARGV;
        }
 
        if (@info) {
-               if ( ! -d "$TMP/usr/info") {
-                       doit("install","-d","$TMP/usr/info");
+               if ( ! -d "$tmp/usr/share/info") {
+                       doit("install","-d","$tmp/usr/share/info");
                }
-               doit("cp",@info,"$TMP/usr/info");
-               doit("chmod","-R", "go=rX","$TMP/usr/info/");
-               doit("chmod","-R", "u+rw","$TMP/usr/info/");
+               doit("cp",@info,"$tmp/usr/share/info");
+               doit("chmod","-R", "go=rX","$tmp/usr/share/info/");
+               doit("chmod","-R", "u+rw","$tmp/usr/share/info/");
        }
 
        foreach $file (@info) {
                # Only register with install-info if this is a head file in
                # a tree of info files.
-               if ($file=~/\.info$/ && ! $dh{NOSCRIPTS}) {
+               if ($file !~ /-\d+$/ && ! $dh{NOSCRIPTS}) {
                        # Figure out what section this file goes in.
                        my $section='';
                        open (IN, "<$file") || die "$file: $!";
@@ -45,17 +101,30 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        }
                        close IN;
                        
-                       my $fn="/usr/info/".Dh_Lib::basename($file);
+                       my $fn="/usr/share/info/".basename($file);
                        
                        if ($section ne '') {
-                               autoscript($PACKAGE,"postinst","postinst-info",
+                               $section=~s:/:\\/:g; # allow / in section.
+                               autoscript($package,"postinst","postinst-info",
                                        "s/#SECTION#/$section/g;s:#FILE#:$fn:");
                        }
                        else {
-                               autoscript($PACKAGE,"postinst","postinst-info-nosection",
+                               autoscript($package,"postinst","postinst-info-nosection",
                                        "s:#FILE#:$fn:");
                        }
-                       autoscript($PACKAGE,"prerm","prerm-info", "s:#FILE#:$fn:");
+                       autoscript($package,"prerm","prerm-info", "s:#FILE#:$fn:");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installinfo.1 b/dh_installinfo.1
deleted file mode 100644 (file)
index 33e388a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH DH_INSTALLINFO 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installinfo \- install and register info files
-.SH SYNOPSIS
-.B dh_installinfo
-.I "[debhelper options] [-A] [-n] [file ...]"
-.SH "DESCRIPTION"
-dh_installinfo is a debhelper program that is responsible for installing
-info files and registering them with install-info.
-.P
-Any filenames specified as parameters will be installed into the first
-package dh_installinfo is told to act on. By default, this is the first 
-binary package in debian/control, but if you use -p, -i, or -a flags, it 
-will be the first package specified by those flags.
-.P
-A file named debian/package.info (debian/info may be used for the first
-binary package in debian/control) can list other files to be installed.
-.P
-dh_installinfo will automatically generate the postinst and prerm commands
-needed to interface with install-info. See
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.SH OPTIONS
-.TP
-.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
-acted on.
-.TP
-.B \-n, \--noscripts
-Do not modify postinst/prerm scripts.
-.TP
-.B file ...
-Install these info files into the first package acted on. (Or in
-all packages if -A is specified).
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.TP
-.BR install-info (8)
-.SH BUGS
-It's impossible to specify filenames with spaces or other whitespace in them
-in debian/info file. This is more a historical design flaw than a bug.
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index c43d24d9efe55c7eba82b696f9314969f019b8f3..5e4e1f351fd2e452ffc42245da97f31500a2e663 100755 (executable)
@@ -1,14 +1,92 @@
 #!/usr/bin/perl -w
-#
-# Install debian/init[.d], and set up the postinst and postrm for init
-# scripts.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installinit - install init scripts into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installinit> [S<I<debhelper options>>] [B<--init-script=>I<scriptname>] [B<-n>] [B<-r>] [B<-d>] [S<B<--> I<params>>]
+
+=head1 DESCRIPTION
+
+dh_installinit is a debhelper program that is responsible for installing
+init scripts and associated defaults files into package build directories.
+
+It also automatically generates the postinst and postrm and prerm commands
+needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init
+scripts.
+
+If a file named debian/package.init exists, then it is installed into
+etc/init.d/package in the package build directory, with "package" replaced
+by the package name.
+
+If a file named debian/package.default exists, then it is installed into
+etc/default/package in the package build directory, with "package" replaced
+by the package name.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm/prerm scripts.
+
+=item B<-r>, B<--no-restart-on-upgrade>
+
+Do not restart init script on upgrade.
+
+=item B<--no-start>
+
+Do not start the init script on install or upgrade, or stop it on removal.
+Only call update-rc.d. Useful for rcS scripts.
+
+=item B<-d>, B<--remove-d>
+
+Remove trailing "d" from the name of the package, and use the result for the
+filename the init script is installed as in etc/init.d/ , and the default file
+is installed as in etc/default/ . This may be useful for daemons with names
+ending in "d". (Note: this takes precedence over the --init-script parameter
+described below.)
+
+=item B<-u>I<params> B<--update-rcd-params=>I<params>
+
+=item B<--> I<params>
+
+Pass "params" to L<update-rc.d(8)>. If not specified, "defaults" will be
+passed to L<update-rc.d(8)>.
+
+=item B<--init-script=>I<scriptname>
+
+Use "scriptname" as for the filename the init script is installed as in
+etc/init.d/ (and also use it as the filename for the defaults file, if it
+is installed). This is useful if you need to have an init script with a name
+different from the package's name. Note that if you use this parameter,
+dh_installinit will look to see if a file in the debian/ directory exists
+that looks like "package.scriptname" and if so will install it as the init
+script in preference to the files it normally installs. This feature is really
+only useful if you need a single package to install more than one init script.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
        # Figure out what filename to install it as.
        my $script;
@@ -16,30 +94,38 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                # -d on the command line sets D_FLAG. We will 
                # remove a trailing 'd' from the package name and 
                # use that as the name.
-               $script=$PACKAGE;
+               $script=$package;
                if ($script=~m/(.*)d$/) {
                        $script=$1;
                }
                else {
-                       warning("\"$PACKAGE\" has no final d' in its name, but -d was specified.");
+                       warning("\"$package\" has no final d' in its name, but -d was specified.");
                }
        }       
        elsif ($dh{INIT_SCRIPT}) {
                $script=$dh{INIT_SCRIPT};
        }
        else {
-               $script=$PACKAGE;
+               $script=$package;
        }       
 
-       $init=pkgfile($PACKAGE,$script) || pkgfile($PACKAGE,"init") ||
-             pkgfile($PACKAGE,"init.d");
+       my $init=pkgfile($package,$script) || pkgfile($package,"init") ||
+             pkgfile($package,"init.d");
+       my $default=pkgfile($package,'default');
+
+       if ($default ne '') {
+               if (! -d "$tmp/etc/default") {
+                       doit("install","-d","$tmp/etc/default");
+               }
+               doit("install","-p","-m644",$default,"$tmp/etc/default/$script");
+       }
 
        if ($init ne '') {
-               if (! -d "$TMP/etc/init.d") {
-                       doit("install","-d","$TMP/etc/init.d");
+               if (! -d "$tmp/etc/init.d") {
+                       doit("install","-d","$tmp/etc/init.d");
                }
 
-               doit("install","-p","-m755",$init,"$TMP/etc/init.d/$script");
+               doit("install","-p","-m755",$init,"$tmp/etc/init.d/$script");
 
                # This is set by the -u "foo" command line switch, it's
                # the parameters to pass to update-rc.d. If not set,
@@ -53,22 +139,43 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                }
 
                if (! $dh{NOSCRIPTS}) {
-                       # -r on the command line sets R_FLAG. If it's set, there
-                       # is no restart on upgrade.
-                       if ($dh{R_FLAG}) {
-                               autoscript($PACKAGE,"postinst","postinst-init-norestart",
-                                       "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                               autoscript($PACKAGE,"postrm","postrm-init",
+                       if (! $dh{NO_START}) {
+                               # update-rc.d, and start script
+                               autoscript($package,"postinst", "postinst-init",
                                        "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
+                       
+                               if ($dh{R_FLAG}) {
+                                       # stops script only on remove
+                                       autoscript($package,"prerm","prerm-init-norestart",
+                                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
+                               }
+                               else {
+                                       # always stops script
+                                       autoscript($package,"prerm","prerm-init",
+                                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
+                               }
                        }
                        else {
-                               autoscript($PACKAGE,"postinst","postinst-init",
-                                       "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                               autoscript($PACKAGE,"postrm","postrm-init",
-                                       "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
-                               autoscript($PACKAGE,"prerm","prerm-init",
+                               # just update-rc.d
+                               autoscript($package,"postinst", "postinst-init-nostart",
                                        "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                        }
+
+                       # removes rc.d links
+                       autoscript($package,"postrm","postrm-init",
+                               "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installinit.1 b/dh_installinit.1
deleted file mode 100644 (file)
index cbb4b44..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-.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 "[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. 
-.P
-It also automatically generates the postinst and postrm and prerm commands 
-needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init
-scripts.
-.P
-If a file named debian/package.init (or debian/package.init.d for backwards
-compatibility with debstd) exists, then it is installed into
-etc/init.d/package in the package build directory, with "package" replaced
-by the packagename. (You may use debian/init for the first binary package
-listed in the control file.)
-.SH OPTIONS
-.TP
-.B 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.
-.TP
-.B \-r, \--no-restart-on-upgrade
-Do not restart daemon on upgrade.
-.TP
-.B \-d, \--remove-d
-Remove trailing "d" from the name of the package, and use the result for the
-filename the init script is installed as in etc/init.d/ . This may be useful
-for daemons with names ending in "d". (Note: this takes precedence over
-the --init-script parameter described below.)
-.TP
-.B \-uparams, \--update-rcd-params=params
-Pass "params" to 
-.BR update-rc.d (8)
-If not specified, "defaults" will be passed to
-.BR update-rc.d (8)
-.TP
-.B \--init-script=scriptname
-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. Note that if you use this parameter,
-dh_installinit will look to see if a file in the debian/ directory exists
-that looks like "scriptname" or "package.scriptname" and if so will install
-it as the inist script in preference to the files it normally installs. This
-feature is really only useful if you need a single package to install more
-than one init script.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1),
-.BR update_rc.d (8)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installlogcheck b/dh_installlogcheck
new file mode 100755 (executable)
index 0000000..cea8195
--- /dev/null
@@ -0,0 +1,61 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installlogcheck - install logcheck rulefiles into etc/logcheck/
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installlogcheck> [S<B<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_installlocgheck is a debhelper program that is responsible for
+installing logcheck rule files into subdirectories of etc/logcheck/ in
+package build directories. The files debian/package.logcheck.cracking,
+debian/package.logcheck.violations,
+debian/package.logcheck.violations.ignore,
+debian/package.logcheck.ignore.workstation,
+debian/package.logcheck.ignore.server and
+debian/package.logcheck.ignore.paranoid are installed if present.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+    my $tmp=tmpdir($package);
+
+    foreach my $type (qw{ignore.d.workstation ignore.d.server
+                            ignore.d.paranoid cracking.d
+                            violations.d violations.ignore.d}) {
+       my $typenod=$type;
+       $typenod=~s/\.d//;
+       my $logcheck=pkgfile($package,"logcheck.$typenod");
+       if ($logcheck) {
+           if (! -d "$tmp/etc/logcheck/$type") {
+               doit("install","-o",0,"-g",0,"-d","$tmp/etc/logcheck/$type");
+           }
+           my $packagenodot=$package; # run-parts..
+           $packagenodot=~s/\./_/g;
+           doit("install","-m",600,$logcheck,"$tmp/etc/logcheck/$type/$packagenodot");
+       }
+    }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+    
+=head1 AUTHOR
+
+Jon Middleton <jjm@debian.org>
+
+=cut
diff --git a/dh_installlogrotate b/dh_installlogrotate
new file mode 100755 (executable)
index 0000000..e028bf7
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installlogrotate - install logrotate config files
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installlogrotate> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_installlogrotate is a debhelper program that is responsible for installing
+logrotate config files into etc/logrotate.d in package build directories.
+Files named debian/package.logrotate are installed.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"logrotate");
+
+       if ($file) {
+               if (! -d "$tmp/etc/logrotate.d") {
+                       doit("install","-o",0,"-g",0,"-d","$tmp/etc/logrotate.d");
+               }
+               doit("install","-m",644,$file,"$tmp/etc/logrotate.d/$package");
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installman b/dh_installman
new file mode 100755 (executable)
index 0000000..59db683
--- /dev/null
@@ -0,0 +1,213 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installman - install man pages into package build directories
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installman> [S<I<debhelper options>>] [S<I<manpage ...>>]
+
+=head1 DESCRIPTION
+
+dh_installman is a debhelper program that handles installing
+man pages into the correct locations in package build directories. You tell
+it what man pages go in your packages, and it figures out where to
+install them based on the section field in their .TH line. If you have a
+properly formatted .TH line, your man page will be installed into the right
+directory, with the right name (this includes proper handling of pages
+with a subsection, like "3perl", which are placed in man3, and given an
+extention of ".3perl"). If your .TH line is incorrect or missing, the program
+may guess wrong based on the file extention.
+
+It also supports translated man pages, by looking for extensions
+like .ll.8 and .ll_LL.8
+
+If dh_installman seems to install a man page into the wrong section or with
+the wrong extension, this is because the man page has the wrong section
+listed in its .TH line. Edit the man page and correct the section, and
+dh_installman will follow suit.  See to L<man(7)> for details about the .TH
+section. If dh_installman seems to install a man page into a directory
+like /usr/share/man/pl/man1/, that is because your program has a
+name like "foo.pl", and dh_installman assumes that means it is translated
+into Polish. There is currently no support for resolving this ambiguity;
+programs in debian should proably not have extensions like that anyway.
+
+Any man page filenames specified as parameters will be installed into the
+first package dh_installman is told to act on. By default, this is the
+first binary package in debian/control, but if you use -p, -i, or -a flags,
+it will be the first package specified by those flags.
+
+Files named debian/package.manpages can list other man pages to be
+installed.
+
+After the man page installation step, dh_installman will check to see if
+any of the man pages in the temporary directories of any of the packages it
+is acting on contain ".so" links. If so, it changes them to symlinks.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Install all files specified by command line parameters in ALL packages
+acted on.
+
+=item I<manpage ...>
+
+Install these man pages into the first package acted on. (Or in all
+packages if -A is specified).
+
+=back
+
+=head1 NOTES
+
+An older version of this program, L<dh_installmanpages(1)>, is still used
+by some packages, and so is still included in debhelper.
+It is, however, deprecated, due to its counterintuitive and inconsistent
+interface. Use this program instead.
+
+=cut
+
+init();
+
+my @sofiles;
+my @sodests;
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"manpages");
+       my @manpages;
+
+       if ($file) {
+               @manpages=filearray($file, ".");
+       }
+
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+               push @manpages, @ARGV;
+       }
+
+       foreach my $page (@manpages) {
+               my $basename=basename($page);
+
+               # Support compressed pages.
+               my $gz='';
+               if ($basename=~m/(.*)(\.gz)/) {
+                       $basename=$1;
+                       $gz=$2;
+               }
+
+               my $section;
+               # See if there is a .TH entry in the man page. If so,
+               # we'll pull the section field from that.
+               if ($gz) {
+                       open (IN, "zcat $page|") or die "$page: $!";
+               }
+               else {
+                       open (IN, $page) or die "$page: $!";
+               }
+               while (<IN>) {
+                       if (/^\.TH\s+\S+\s+(\d+\S*)/) {
+                               $section=$1;
+                               last;
+                       }
+               }
+               # Failing that, we can try to get it from the filename.
+               if (! $section) {
+                       ($section)=$basename=~m/.*\.([1-9]\S*)/;
+               }
+
+               # Now get the numeric component of the section.
+               my ($realsection)=$section=~m/^(\d)/ if defined $section;
+               
+               # If there is no numeric section, bail.
+               if (! $realsection) {
+                       error("Could not determine section for $page");
+               }
+               
+               # Get the man page's name -- everything up to the last dot.
+               my ($instname)=$basename=~m/^(.*)\./;
+       
+               my $destdir="$tmp/usr/share/man/man$realsection/";
+               # Translated man pages are typically specified by adding the
+               # language code to the filename, so detect that and
+               # redirect to appropriate directory, stripping the code.
+               my ($langcode)=$basename=~m/.*\.([a-z][a-z](?:_[A-Z][A-Z])?)\.(?:[1-9]|man)/;
+               if (defined $langcode && $langcode ne '') {
+                       $destdir="$tmp/usr/share/man/$langcode/man$realsection/";
+                       # Strip the language code from the instname.
+                       $instname=~s/\.$langcode$//;
+               }
+               $destdir=~tr:/:/:s; # just for looks
+
+               if (! -e "$destdir/$instname.$section" && 
+                   ! -l "$destdir/$instname.$section") {
+                       if (! -d $destdir) {
+                               doit "install","-d",$destdir;
+                       }
+                       doit "install","-p","-m644",$page,
+                               "$destdir$instname.$section$gz";
+               }
+               
+       }
+
+       # Now the .so conversion.
+       @sofiles=@sodests=();
+       foreach my $dir (qw{usr/share/man usr/X11R6/man}) {
+               if (-e "$tmp/$dir") {
+                       find(\&find_so_man, "$tmp/$dir");
+               }
+       }
+       foreach my $sofile (@sofiles) {
+               my $sodest=shift(@sodests);
+               doit "rm","-f",$sofile;
+               doit "ln","-sf",$sodest,$sofile;
+       }
+}
+
+# Check if a file is a .so man page, for use by File::Find.
+sub find_so_man {
+       # The -s test is becuase a .so file tends to be small. We don't want
+       # to open every man page. 1024 is arbitrary.
+       if (! -f $_ || -s $_ > 1024 || -s == 0) {
+               return;
+       }
+
+       # Test first line of file for the .so thing.
+       open (SOTEST,$_) || die "$_: $!";
+       my $l=<SOTEST>;
+       close SOTEST;
+       if ($l=~m/\.so\s+(.*)/) {
+               my $solink=$1;
+               # This test is here to prevent links like ... man8/../man8/foo.8
+               if (basename($File::Find::dir) eq
+                   dirname($solink)) {
+                       $solink=basename($solink);
+               }
+               else {
+                       $solink="../$solink";
+               }
+       
+               push @sofiles,"$File::Find::dir/$_";
+               push @sodests,$solink;
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
index 6d615a16b90a338a9f429424af99d0227c3efe52..39946f6a4f734396d5e5347b1e41c55da84c0863 100755 (executable)
@@ -1,14 +1,66 @@
 #!/usr/bin/perl -w
-#
-# Automatically find and install man pages. However, do not install any man 
-# pages listed on the command line.
-# Also change man pages with .so commands in them into symlinks.
-#
-# This is a little bit (hah!) DWIMish, but still very handy.
 
+=head1 NAME
+
+dh_installmanpages - old-style man page installer
+
+=cut
+
+use strict;
 use File::Find;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installmanpages> [S<I<debhelper options>>] [S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_installmanpages is a debhelper program that is responsible for
+automatically installing man pages into usr/share/man/ and usr/X11R6/man/
+in package build directories.
+
+This is a DWIM-style program, with an interface unlike the rest of
+debhelper. You are encouraged to use L<dh_installman(1)> instead.
+
+dh_installmanpages scans the current directory and all subdirectories for
+filenames that look like man pages. (Note that only real files are looked
+at; symlinks are ignored.) It uses L<file(1)> to verify that the files are
+in the correct format. Then, based on the files' extensions, it installs 
+them into the correct man directory.
+
+All filenames specified as parameters will be skipped by dh_installmanpages.
+This is useful if by default it installs some man pages that you do not
+want to be installed.
+
+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.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<file ...>
+
+Do not install these files as man pages, even if they look like valid man
+pages.
+
+=back
+
+=head1 BUGS
+
+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. This is almost never what you really want (use -p to work
+around this, or use the much better L<dh_installman(1)> program instead).
+
+Files ending in I<.man> will be ignored.
+
+Files specified as parameters that contain spaces in their filenames will
+not be processed properly.
+
+=cut
+
 init();
 
 # Check if a file is a man page, for use by File::Find.
@@ -18,8 +70,8 @@ sub find_man {
        # Does its filename look like a man page?
        # .ex files are examples installed by deb-make,
        # we don't want those, or .in files, which are
-       # from configure.
-       if (! (-f $_ && /^.*\.[1-9].*$/ && ! /\.(ex|in)$/)) {
+       # from configure, nor do we want CVS .#* files.
+       if (! (-f $_ && /^.*\.[1-9].*$/ && ! /\.(ex|in)$/ && ! /^\.#/)) {
                return;
        }
        
@@ -27,7 +79,7 @@ sub find_man {
        if ($File::Find::dir=~m:debian/.*tmp.*:) {
                return;
        }
-       foreach $dir (@allpackages) {
+       foreach my $dir (@allpackages) {
                if ($File::Find::dir=~m:debian/\Q$dir\E:) {
                        return;
                }
@@ -60,8 +112,9 @@ sub find_so_man {
        if ($l=~m/\.so\s+(.*)/) {
                my $solink=$1;
                # This test is here to prevent links like ... man8/../man8/foo.8
-               if (Dh_Lib::basename($File::Find::dir) eq Dh_Lib::dirname($solink)) {
-                       $solink=Dh_Lib::basename($solink);
+               if (basename($File::Find::dir) eq
+                   dirname($solink)) {
+                       $solink=basename($solink);
                }
                else {
                        $solink="../$solink";
@@ -72,32 +125,32 @@ sub find_so_man {
        }
 }
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
        # Find all filenames that look like man pages.
        @manpages=();
        @allpackages=GetPackages('');
        find(\&find_man,'.'); # populates @manpages
        
-       foreach $page (@manpages) {
+       foreach my $page (@manpages) {
                $page=~s:^\./::; # just for looks
                
-               $basename=Dh_Lib::basename($page);
+               my $basename=basename($page);
                
                # Skip all files listed on command line.
                my $install=1;
-               foreach $skip (@ARGV) {
+               foreach my $skip (@ARGV) {
                        # Look at basename of what's on connect line
-                       # for backwards compatability.
-                       if ($basename eq Dh_Lib::basename($skip)) {
+                       # for backwards compatibility.
+                       if ($basename eq basename($skip)) {
                                $install=undef;
                                last;
                        }
                }
                
                if ($install) {
-                       my $extdir="";
+                       my $extdir="share";
                        # Handle X man pages specially.
                        if ($basename=~/x$/) {
                                $extdir="X11R6";
@@ -105,27 +158,49 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        
                        my ($section)=$basename=~m/.*\.([1-9])/;
                        
-                       my $destdir="$TMP/usr/$extdir/man/man$section/";
+                       my $destdir="$tmp/usr/$extdir/man/man$section/";
+                       
+                       # Handle translated man pages.
+                       my $instname=$basename;
+                       my ($langcode)=$basename=~m/.*\.([a-z][a-z])\.([1-9])/;
+                       if (defined $langcode && $langcode ne '') {
+                               $destdir="$tmp/usr/$extdir/man/$langcode/man$section/";
+                               $instname=~s/\.$langcode\./\./;
+                       }
+                       
                        $destdir=~tr:/:/:s; # just for looks
+                       
                        if (! -e "$destdir/$basename" && !-l "$destdir/$basename") {
                                if (! -d $destdir) {
                                        doit "install","-d",$destdir;
                                }
-                               doit "install","-p","-m644",$page,$destdir;
+                               doit "install","-p","-m644",$page,$destdir.$instname;
                        }
                }
        }
        
        # Now the .so conversion.
        @sofiles=@sodests=();
-       foreach $dir (qw{usr/man usr/X11R6/man}) {
-               if (-e "$TMP/$dir") {
-                       find(\&find_so_man, "$TMP/$dir");
+       foreach my $dir (qw{usr/share/man usr/X11R6/man}) {
+               if (-e "$tmp/$dir") {
+                       find(\&find_so_man, "$tmp/$dir");
                }
        }
-       foreach $sofile (@sofiles) {
+       foreach my $sofile (@sofiles) {
                my $sodest=shift(@sodests);
                doit "rm","-f",$sofile;
                doit "ln","-sf",$sodest,$sofile;
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installmanpages.1 b/dh_installmanpages.1
deleted file mode 100644 (file)
index edc37c2..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-.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 "[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
-package build directories.
-.P
-dh_installmanpages scans the current directory and all subdirectories for
-filenames that look like man pages. (Note that only real files are looked
-at; symlinks are ignored.) It uses
-.BR file (1)
-to verify that the files are in the correct format. Then, based on the
-files' extensions, it installs them into the correct man directory.
-.P
-All filenames specified as parameters will be skipped by dh_installmanpages.
-This is useful if by default it installs some man pages that you do not want
-to be installed.
-.P
-After the man page installation step, dh_installmanpages will check to see if
-any of the man pages are ".so" links. If so, it changes them to symlinks.
-.SH OPTIONS
-.TP
-.B 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
-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
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH BUGS
-Man pages with the extension
-.B .man
-are not automatically installed. 
-.P
-Files specified as parameters that contain spaces in their filenames will
-not be processed properly.
-.P
-By default, all man pages are installed into all binary packages, which is
-almost never what you really want (use -p to work around this).
-.P
-This is a "Do what I Mean" type program - you have been warned!
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index c077f21583991547577963e46c04e9b264d21c13..420b2164545c8971a5fa07e48cc7f4ee9f5c4545 100755 (executable)
@@ -1,45 +1,91 @@
 #!/usr/bin/perl -w
-#
-# Integration with debian menu system:
-#
-# If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE
-# If debian/menu-method file exists, save it to 
-# $TMP/etc/menu-methods/$PACKAGE
-#
-# Also, add to postinst and postrm.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+
+=head1 NAME
+
+dh_installmenu - install debian menu files into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installmenu> [S<B<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_installmenu is a debhelper program that is responsible for installing
+files used by the debian menu package into package build directories.
+
+It also automatically generates the postinst and postrm commands needed to
+interface with the debian menu package. See L<dh_installdeb(1)> for an
+explanation of how this works.
+
+If a file named debian/package.menu exists, then it is installed into
+usr/lib/menu/package in the package build directory. This is a debian menu
+file. See L<menufile(5L)> for its format.
+
+If a file named debian/package.menu-method exits, then it is installed into
+etc/menu-methods/package in the package build directory. This is a debian
+menu method file.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $menu=pkgfile($PACKAGE,"menu");
-       $menu_method=pkgfile($PACKAGE,"menu-method");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $menu=pkgfile($package,"menu");
+       my $menu_method=pkgfile($package,"menu-method");
        
        if ($menu ne '') {
-               if (! -d "$TMP/usr/lib/menu") {
-                       doit("install","-d","$TMP/usr/lib/menu");
+               if (! -d "$tmp/usr/lib/menu") {
+                       doit("install","-d","$tmp/usr/lib/menu");
                }
-               doit("install","-p","-m644",$menu,"$TMP/usr/lib/menu/$PACKAGE");
+               doit("install","-p","-m644",$menu,"$tmp/usr/lib/menu/$package");
                
                # Add the scripts if a menu-method file doesn't exist.
                # The scripts for menu-method handle everything these do, too.
                if ($menu_method eq "" && ! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-menu");
-                       autoscript($PACKAGE,"postrm","postrm-menu")
+                       autoscript($package,"postinst","postinst-menu");
+                       autoscript($package,"postrm","postrm-menu")
                }
        }
 
        if ($menu_method ne '') {
-               if (!-d "$TMP/etc/menu-methods") {
-                       doit("install","-d","$TMP/etc/menu-methods");
+               if (!-d "$tmp/etc/menu-methods") {
+                       doit("install","-d","$tmp/etc/menu-methods");
                }
-               doit("install","-p",$menu_method,"$TMP/etc/menu-methods/$PACKAGE");
+               doit("install","-p",$menu_method,"$tmp/etc/menu-methods/$package");
 
                if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-menu-method","s/#PACKAGE#/$PACKAGE/");
-                       autoscript($PACKAGE,"postrm","postrm-menu-method","s/#PACKAGE#/$PACKAGE/");
+                       autoscript($package,"postinst","postinst-menu-method","s/#PACKAGE#/$package/");
+                       autoscript($package,"postrm","postrm-menu-method","s/#PACKAGE#/$package/");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+L<update-menus(1)>
+L<menufile(5)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installmenu.1 b/dh_installmenu.1
deleted file mode 100644 (file)
index d9d8296..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-.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 "[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. 
-.P
-It also automatically generates the postinst and postrm commands needed to 
-interface with the debian menu package. See 
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.P
-If a file named debian/package.menu exists, then it is installed into
-usr/lib/menu/package in the package build directory. This is a debian menu
-file.
-.P
-If a file named debian/package.menu-method exits, then it is installed into
-etc/menu-methods/package in the package build directory. This is a debian
-menu method file.
-.P
-For the first first binary package listed in the control file, you may use
-debian/menu and debian/menu-method 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/postrm 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 menufile (5)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 7cada574762b86b44349556eea2fd0f8e23d796a..8ffd523621e7b756daa69eeff5cfef5649f9dd2f 100755 (executable)
@@ -1,22 +1,75 @@
 #!/usr/bin/perl -w
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installmime - install mime files into package build directories
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installmime> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_installmime is a debhelper program that is responsible for installing
+mime files into package build directories.
+
+It also automatically generates the postinst and postrm commands needed to
+interface with the debian mime-support package. See L<dh_installdeb(1)> for
+an explanation of how this works.
+
+If a file named debian/package.mime exists, then it is installed into
+usr/lib/mime/packages/package in the package build directory.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $mime=pkgfile($PACKAGE,"mime");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $mime=pkgfile($package,"mime");
        
        if ($mime ne '') {
-               if (! -d "$TMP/usr/lib/mime/packages") {
-                       doit("install","-d","$TMP/usr/lib/mime/packages");
+               if (! -d "$tmp/usr/lib/mime/packages") {
+                       doit("install","-d","$tmp/usr/lib/mime/packages");
                }
-               doit("install","-p","-m644",$mime,"$TMP/usr/lib/mime/packages/$PACKAGE");
+               doit("install","-p","-m644",$mime,"$tmp/usr/lib/mime/packages/$package");
 
                if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-mime");
-                       autoscript($PACKAGE,"postrm","postrm-mime")
+                       autoscript($package,"postinst","postinst-mime");
+                       autoscript($package,"postrm","postrm-mime")
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installmime.1 b/dh_installmime.1
deleted file mode 100644 (file)
index 4ace998..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-.TH DH_INSTALLMIME 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installmime \- install mime files into package build directories
-.SH SYNOPSIS
-.B dh_installmime
-.I "[debhelper options] [-n]"
-.SH "DESCRIPTION"
-dh_installmime is a debhelper program that is responsible for installing
-mime files into package build directories. 
-.P
-It also automatically generates the postinst and postrm commands needed to 
-interface with the debian mime-support package. See 
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.P
-If a file named debian/package.mime exists, then it is installed into
-usr/lib/mime/packages/package in the package build directory.
-.P
-For the first first binary package listed in the control file, you may use
-debian/mime 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/postrm 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)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 0ee00dce7c86243bac06d7df6cac2611e7942360..13fd8f5c66651e9e3da23897f581807ca2696cd9 100755 (executable)
@@ -1,28 +1,94 @@
 #!/usr/bin/perl -w
-#
-# Register modules with modutils.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installmodules - register modules with modutils
+
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+use File::Find;
+
+=head1 SYNOPSIS
+
+B<dh_installmodules> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_installmodules is a debhelper program that is responsible for
+registering kernel modules with modutils.
+
+Files named debian/package.modules will be installed as
+etc/modutils/package in the package build directory.
+
+Then postinst and postrm commands are automatically generated to register
+the modules when the package is installed. See L<dh_installdeb(1)> for an
+explanation of how this works. Note that this will be done for any
+package this program acts on which has either the above-mentioned file, or
+has .o files in /lib/modules.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"modules");
+# Returns true if there are any .o files in the passed directory.
+sub find_kernel_modules {
+       my $searchdir=shift;
+       my @results=();
+
+       return unless -d $searchdir;
+       find(sub { push @results, $_ if /\.o$/ }, $searchdir);
+       return @results > 0;
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"modules");
 
-       if (! -e $TMP) {
-               doit("install","-d",$TMP);
+       if (! -e $tmp) {
+               doit("install","-d",$tmp);
        }
 
        if ($file) {
-               if (! -e "$TMP/etc/modutils") {
-                       doit("install","-d","$TMP/etc/modutils");
-                       doit("install","-m","0644",$file,"$TMP/etc/modutils/$PACKAGE");
-               }
-               
-               if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-modules","s/#PACKAGE#/$PACKAGE/");
-                       autoscript($PACKAGE,"postrm","postrm-modules","s/#PACKAGE#/$PACKAGE/");
+               if (! -e "$tmp/etc/modutils") {
+                       doit("install","-d","$tmp/etc/modutils");
                }
+               doit("install","-m","0644",$file,"$tmp/etc/modutils/$package");
+       }
+
+       if (! $dh{NOSCRIPTS} &&
+           ($file || find_kernel_modules("$tmp/lib/modules"))) {
+                       autoscript($package,"postinst","postinst-modules","s/#PACKAGE#/$package/");
+                       autoscript($package,"postrm","postrm-modules","s/#PACKAGE#/$package/");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installmodules.1 b/dh_installmodules.1
deleted file mode 100644 (file)
index 6d9016f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-.TH DH_INSTALLMODULES 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installmodules \- register modules with modutils
-.SH SYNOPSIS
-.B dh_installmodules
-.I "[debhelper options] [-n]"
-.SH "DESCRIPTION"
-dh_installmodules is a debhelper program that is responsible for registering
-kernel modules with modutils.
-.P
-A file named debian/package.modules (debian/modules my be used for the first
-binary package in debian/control) will be installed as etc/modutils/package
-in the package build directory.
-.P
-Then postinst and postrm commands are automatically generated to register
-the modules when the package is installed. See
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.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/postrm scripts.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 897fd7d85e54e729bca84cc21d64372098359d15..0f251798d4e6c918f912e36a5847e2138f339fd5 100755 (executable)
@@ -1,21 +1,50 @@
 #!/usr/bin/perl -w
-#
-# Integration with debian pam system:
-#
-# If debian/pam file exists, save it to $TMP/etc/pam.d/$PACKAGE
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installpam - install pam support files
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installpam> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_installpam is a debhelper program that is responsible for installing
+files used by PAM into package build directories.
+
+If a file named debian/package.pam exists, then it is installed into
+etc/pam.d/package in the package build directory.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $pam=pkgfile($PACKAGE,"pam");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $pam=pkgfile($package,"pam");
        
        if ($pam ne '') {
-               if (! -d "$TMP/etc/pam.d") {
-                       doit("install","-d","$TMP/etc/pam.d");
+               if (! -d "$tmp/etc/pam.d") {
+                       doit("install","-d","$tmp/etc/pam.d");
                }
-               doit("install","-p","-m644",$pam,"$TMP/etc/pam.d/$PACKAGE");
+               doit("install","-p","-m644",$pam,"$tmp/etc/pam.d/$package");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installpam.1 b/dh_installpam.1
deleted file mode 100644 (file)
index bb34a45..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH DH_INSTALLPAM 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installpam \- install pam support files
-.SH SYNOPSIS
-.B dh_installpam
-.I "[debhelper options] [-n]"
-.SH "DESCRIPTION"
-dh_installpam is a debhelper program that is responsible for installing
-files used by PAM into package build directories. 
-.P
-If a file named debian/package.pam exists, then it is installed into
-etc/pam.d/package in the package build directory.
-.P
-For the first first binary package listed in the control file, you may use
-debian/pam instead.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.TP
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 21ee63006968ab55cb7f19dbf0a27d6d873c04b9..31ce63c604733069bff7c9767182613a504b5295 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Add to postinst and postrm to register a window manager.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_installwm - register a window manager
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installwm> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [S<I<wm ...>>]
+
+=head1 DESCRIPTION
+
+dh_installwm is a debhelper program that is responsible for
+generating the postinst and postrm commands that register a window manager
+with L<update-alternatives(8)>
+
+Any window manager programs specified as parameters will be registered in
+the first package dh_installwm is told to act on. By default, this is the
+first binary package in debian/control, but if you use -p, -i, or -a flags,
+it will be the first package specified by those flags.
+
+Files named debian/package.wm can list other window manager programs to
+register.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--priority=>I<n>
+
+Set the priority of the window manager. Default is 20, which is too low for
+most window managers; see the Debian Policy document for instructions on
+calculating the correct value.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts. Turns this command into a no-op.
+
+=item I<wm ...>
+
+The commands used to run the window manager or window managers you want to
+register.
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=back
+
+=cut
+
 init();
 
-$wm=shift;
+if (! defined $dh{PRIORITY}) {
+        $dh{PRIORITY}=20;
+}
 
-if ($wm eq '') {
-       error("No window manager filename was specified.");
+if (@ARGV) {
+       # This is here for backwards compatibility. If the filename doesn't
+       # include a path, assume it's in /usr/X11R6/bin.
+       if ($ARGV[0] !~ m:/:) {
+               $ARGV[0]="/usr/X11R6/bin/$ARGV[0]";
+       }
 }
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#      $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+#      my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"wm");
+
+       my @wm;
+       if ($file) {
+               @wm=filearray($file, '.');
+       }
+
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+               push @wm, @ARGV;
+       }
 
        if (! $dh{NOSCRIPTS}) {
-               autoscript($PACKAGE,"postinst","postinst-wm","s/#WM#/$wm/");
-               autoscript($PACKAGE,"postrm","postrm-wm","s/#WM#/$wm/");
+               foreach (@wm) {
+                       autoscript($package,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
+                       autoscript($package,"prerm","prerm-wm","s:#WM#:$_:");
+               }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_installwm.1 b/dh_installwm.1
deleted file mode 100644 (file)
index d319d75..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-.TH DH_INSTALLWM 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installwm \- register a window manager
-.SH SYNOPSIS
-.B dh_installwm
-.I "[debhelper options] [-n] wmfilename"
-.SH "DESCRIPTION"
-dh_installwm is a debhelper program that is responsible for
-generating the postinst and postrm commands needed to
-interface with the the
-.BR register-window-manager (8)
-command. This results in a window manager being registered when it is
-installed.
-.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/postrm scripts. Turns this command into a no-op.
-.TP
-.B wmfilename
-The filename of the window manager you wish to register. May be either a
-simple filename if the window manager is in /usr/X11R6/bin/, or a complete
-path otherwise.
-.SH NOTES
-Note that this command will set up postinst and postrm scripts for every
-package it acts on. It's wise to limit its action to a single package with,
-for example, the -p switch.
-.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 register-window-manager (8)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installxaw b/dh_installxaw
deleted file mode 100755 (executable)
index d71be54..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Integration with xaw-wrappers
-#
-# If debian/xaw-wrappers file exists, save it to 
-# $TMP/usr/lib/xaw-wrappers/conf/$PACKAGE
-#
-# Also, add calls to postinst and postrm.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-init();
-
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $xaw=pkgfile($PACKAGE,'xaw');
-
-       if ($xaw ne '') {
-               if (! -d "$TMP/usr/lib/xaw-wrappers/config") {
-                       doit("install","-d","$TMP/usr/lib/xaw-wrappers/config");
-               }
-               doit("install","-p","-m644",$xaw,
-                       "$TMP/usr/lib/xaw-wrappers/config/$PACKAGE");
-
-               if (! $dh{NOSCRIPTS}) {
-                       # Parse the xaw conf file to figure out what programs
-                       # and link names are present in it. Have to pass
-                       # those into the scripts.
-                       my %data;
-                       my $install_opts='';
-                       my $remove_opts='';
-                       my $stanza='';
-                       
-                       open (IN,$xaw);
-                       while (<IN>) {
-                               chomp;
-                               s/\s+/ /g;
-                               if (/^#/ eq '') {
-                                       if (/(.*?):\s?(.*)/) {
-                                               $data{lc($1)}=$2;
-                                               $stanza=1;
-                                       }
-                                       elsif ($stanza) {
-                                               $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' ";
-                                               $remove_opts.="'$data{'link-name'} $data{wrapped}' ";
-                                               undef %data;
-                                               $stanza='';
-                                       }
-                               }
-                       }
-                       close IN;
-
-                       if ($stanza) {
-                               $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'";
-                               $remove_opts.="'$data{'link-name'} $data{wrapped}'";
-                       }
-                       
-                       autoscript($PACKAGE,"postinst","postinst-xaw",
-                               "s:#OPTS#:$install_opts:");
-                       autoscript($PACKAGE,"prerm","prerm-xaw",
-                               "s:#OPTS#:$remove_opts:");
-                       autoscript($PACKAGE,"postrm","postrm-xaw");
-               }
-       }
-}
diff --git a/dh_installxaw.1 b/dh_installxaw.1
deleted file mode 100644 (file)
index 4fb9ebf..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-.TH DH_INSTALLXAW 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_installxaw \- install xaw wrappers config files into package build directories
-.SH SYNOPSIS
-.B dh_installxaw
-.I "[debhelper options] [-n]"
-.SH "DESCRIPTION"
-dh_installxaw is a debhelper program that is responsible for installing
-xaw wrappers config files into package build directories. 
-.P
-It also automatically generates the postinst, prerm, and postrm commands needed to 
-interface with the debian xaw-wrappers package. See 
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.P
-If a file named debian/package.xaw exists, then it is installed into
-usr/lib/xaw-wrappers/config/package in the package build directory.
-.P
-For the first first binary package listed in the control file, you may use
-debian/xaw 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/postrm 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 update-xaw-wrappers (8)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_installxfonts b/dh_installxfonts
new file mode 100755 (executable)
index 0000000..984144b
--- /dev/null
@@ -0,0 +1,93 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_installxfonts - register X fonts
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installxfonts> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_installxfonts is a debhelper program that is responsible for
+registering X fonts, so their corresponding fonts.dir, fonts.alias,
+and fonts.scale be rebuilt properly at install time.
+
+Before calling this program, you should have installed any X fonts provided
+by your package into the appropriate location in the package build
+directory, and if you have fonts.alias or fonts.scale files, you should
+install them into the correct location under etc/X11/fonts in your package
+build directory.
+
+Your package should should depend on xutils (>= 4.0.3) so that the
+update-fonts-* commands are available. (This program adds that dependency to
+${misc:Depends}.)
+
+This program automatically generates the postinst and postrm commands needed
+to register X fonts.  See L<dh_installdeb(1)> for an explanation of how this
+works.
+
+=head1 NOTES
+
+See L<update-fonts-alias(8)>, L<update-fonts-scale(8)>, and
+L<update-fonts-dir(8)> for more information about X font installation.
+
+See Debian policy, section 12.8.5. for details about doing fonts the Debian
+way.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $XFONTDIR="$tmp/usr/X11R6/lib/X11/fonts/";
+
+       # Find all font directories in the package build directory.
+       opendir DIR, $XFONTDIR || next;
+       my @fontdirs = grep { -d "$XFONTDIR/$_" && !/^\./ } (readdir DIR);
+       closedir DIR;
+
+       if (@fontdirs) {
+               # Figure out what commands the postinst and postrm will need 
+               # to call.
+               my @cmds;
+               foreach my $f (@fontdirs) {
+                       # This must come before update-fonts-dir.
+                       push @cmds, "update-fonts-scale $f"
+                               if -f "$tmp/etc/X11/fonts/$f/$package.scale";
+                       push @cmds, "update-fonts-dir $f";
+                       push @cmds, "update-fonts-alias $f"
+                               if -f "$tmp/etc/X11/fonts/$f/$package.alias";
+               }
+
+               autoscript($package, "postinst", "postinst-xfonts",
+                       "s:#CMDS#:".join(";", @cmds).":;");
+               autoscript($package, "postrm", "postrm-xfonts",
+                       "s:#CMDS#:".join(";", @cmds).":;");
+
+               addsubstvar($package, "misc:Depends", "xutils", ">= 4.0.3");
+       }
+       else {
+               # remove
+               addsubstvar($package, "misc:Depends", "xutils", ">= 4.0.3", 1);
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_lib b/dh_lib
deleted file mode 100644 (file)
index a0f8bb9..0000000
--- a/dh_lib
+++ /dev/null
@@ -1,188 +0,0 @@
-# Library functions for debhelper programs.
-#
-# Joey Hess, GPL copyright 1997, 1998.
-
-# Run a command, and display the command to stdout if verbose mode is on.
-# All commands that modifiy files in $TMP should be ran via this 
-# function.
-# Note that this cannot handle complex commands, especially anything
-# involving redirection. Use complex_doit instead.
-doit() {
-       verbose_echo "$@"
-       if [ ! "$DH_NO_ACT" ]; then
-               eval '$@'
-       fi
-}
-
-
-# This is an identical command to doit, except the parameter passed to it
-# are evaled with double quotes. This version can handle compound commands.
-complex_doit() {
-       verbose_echo "$@"
-       if [ ! "$DH_NO_ACT" ]; then
-               eval "$@"
-       fi
-}
-
-# Echo something if the verbose flag is on.
-verbose_echo() {
-       if [ "$DH_VERBOSE" ]; then
-               echo "  $@"
-       fi
-}
-
-# Echo an error message and exit.
-error() {
-       echo `basename $0`": $1" >&2
-       exit 1
-}
-
-# Output a warning.
-warning() {
-       echo `basename $0`": $1" >&2
-}
-
-# 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.
-tmpdir() {
-       if [ "$DH_TMPDIR" ]; then
-               echo "$DH_TMPDIR"
-       elif [ "$1" = "$MAINPACKAGE" ]; then
-               echo debian/tmp
-       else
-               echo "debian/$PACKAGE"
-       fi
-}
-
-# 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.
-pkgfile() {
-       if [ -e "debian/$1.$2" ]; then
-               echo "debian/$1.$2"
-       elif [ "$1" = "$MAINPACKAGE" -a -e "debian/$2" ]; then
-               echo "debian/$2"
-       fi
-}
-
-# Pass it a name of a binary package, it returns the name to prefix to files
-# in debian for this package.
-pkgext() {
-       if [ "$1" != "$MAINPACKAGE" ]; then
-       echo "$PACKAGE."
-       fi
-}
-
-# Returns 1 if the package is a native debian package, null otherwise.
-# As a side effect, sets $VERSION to the version of this package.
-# Caches return code so it only needs to run dpkg-parsechangelog once.
-isnative() {
-       if [ -z "$DH_ISNATIVE" ]; then
-               # Make sure we look at the correct changelog.
-               isnative_changelog=`pkgfile $PACKAGE changelog`
-               if [ ! "$isnative_changelog" ]; then
-                       isnative_changelog=debian/changelog
-               fi
-               # Get the package version.
-               # Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it
-               # output a bogus error message to stderr.
-               # If it actually has a real error, then the expr will fail, and this whole
-               # script will come crashing to a halt, which is good enough to inform
-               # the user something's wrong. :-)
-               VERSION=`expr "\`dpkg-parsechangelog -l$isnative_changelog 2>/dev/null\`" : \
-                       '.*Version: \(.*\).*Distribution:'`
-               # Is this a native Debian package?
-               if expr "$VERSION" : '.*-' >/dev/null; then
-                       DH_ISNATIVE=1
-               else
-                       DH_ISNATIVE=0
-               fi
-       fi
-
-       return "$DH_ISNATIVE"
-}
-
-# 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/
-autoscript() {
-       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"
-}
-
-# Argument processing and global variable initialization is below.
-
-# If DH_OPTIONS is set, prepend it to the command line.
-if [ "$DH_OPTIONS" ]; then
-       set -- $DH_OPTIONS $@
-fi
-
-# Check to see if an argument on the command line starts with a dash.
-# if so, we need to pass this off to the resource intensive perl.
-for arg; do
-       if expr "$arg" : '-' >/dev/null ; then
-               parseopt=1
-               break
-       fi
-done
-if [ "$parseopt" ]; then
-       parseopt=""
-       # Parse command line. I wrote a perl program to do this becuase
-       # getopt(1) is so broken. Note: the quotes around $@ are very
-       # important!
-       eval `dh_getopt.pl "$@"`
-       if [ "$DH_PARSE_ERROR" ]; then
-               error "$DH_PARSE_ERROR"
-       fi
-fi
-
-# Get the name of the main binary package (first one listed in
-# debian/control).
-MAINPACKAGE=`grep ^Package: debian/control | cut -d " " -f 2 | head -1`
-
-# Check if packages to build have been specified, if not, fall back to 
-# the default, doing them all.
-if [ ! "$DH_DOPACKAGES" ]; then
-       if [ "$DH_DOINDEP" -o "$DH_DOARCH" -o "$DH_DOSAME" ]; then
-               error "I have no package to build."
-       fi
-       DH_DOPACKAGES=`grep ^Package: debian/control | cut -d " " -f 2 | tr "\n" " "`
-fi
-
-# Check to see if -P was specified. If so, we can only act on a single
-# package.
-if [ "$DH_TMPDIR" ] && echo "$DH_DOPACKAGES" | egrep -q '.+ .+' ; then
-       error "-P was specified, but multiple packages would be acted on."
-fi
-
-# 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 effect it.
-for PACKAGE in $DH_DOPACKAGES ; do
-       DH_FIRSTPACKAGE="$PACKAGE"
-       break
-done
diff --git a/dh_link b/dh_link
index 1f6299aa932feaf4a73eef334ea55f06b14f237e..6cb889cdd79ea3b92132f2f9ee0ca79cdbc51cbb 100755 (executable)
--- a/dh_link
+++ b/dh_link
@@ -1,17 +1,88 @@
 #!/usr/bin/perl -w
-#
-# Generate symlinks in debian packages, reading debian/links. The
-# file contains pairs of files and symlinks.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_link - create symlinks in package build directories
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_link> [S<I<debhelper options>>] [B<-A>] [S<I<source destination ...>>]
+
+=head1 DESCRIPTION
+
+dh_link is a debhelper program that creates symlinks in package build
+directories.
+
+dh_link accepts a list of pairs of source and destination files. The source
+files are the already existing files that will be symlinked from. The
+destination files are the symlinks that will be created. There B<must> be
+an equal number of source and destination files specified.
+
+The list can be specified in two ways. A file named debian/package.links
+can list pairs of files. If you use this file, you should put each pair
+of files on its own line, and separate the files within the pair with
+whitespace. Also, pairs of files can be specified as parameters - these
+pairs will only be created in the package build directory of the first
+package dh_link is told to act on. By default, this is the first binary
+package in debian/control, but if you use -p, -i, or -a flags, it will be
+the first package specified by those flags.
+
+Be sure you B<do> specify the full filename to both the source and
+destination files (unlike you would do if you were using something like
+L<ln(1)>).
+
+dh_link will generate symlinks that comply with debian policy - absolute
+when policy says they should be absolute, and relative links with as short
+a path as possible. It will also create any subdirectories it needs to to put
+the symlinks in.
+
+dh_link also scans the package build tree for existing symlinks which do not
+conform to debian policy, and corrects them (v4 only).
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-A>, B<--all>
+
+Create any links specified by command line parameters in ALL packages
+acted on, not just the first.
+
+=item I<source destination ...>
+
+Create a file named "destination" as a link to a file named "source". Do
+this in the package build directory of the first package acted on.
+(Or in all packages if -A is specified.)
+
+=back
+
+=head1 EXAMPLES
+
+ dh_link usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
+
+Make bar.1 be a symlink to foo.1
+
+ dh_link var/lib/foo usr/lib/foo \
+   usr/X11R6/man/man1/foo.1x usr/share/man/man1/bar.1
+
+Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to
+the X man page foo.1x
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $file=pkgfile($PACKAGE,"links");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $file=pkgfile($package,"links");
 
-       undef @links;
+       my @links;
        if ($file) {
                @links=filearray($file);
        }
@@ -22,7 +93,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                error("$file lists a link without a destination.");
        }
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @links, @ARGV;
        }
 
@@ -31,16 +102,39 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                error("parameters list a link without a destination.");
        }
 
+       # v4 only and only if there is a temp dir already
+       if (! compat(3) && -e $tmp) {
+               # Scan for existing links and add them to @links, so they
+               # are recreated policy conformant.
+               find(
+                       sub {
+                               return unless -l;
+                               my $dir=$File::Find::dir;
+                               $dir=~s/^\Q$tmp\E//;
+                               my $target = readlink($_);
+                               if ($target=~/^\//) {
+                                       push @links, $target;
+                               }
+                               else {
+                                       push @links, "$dir/$target";
+                               }
+                               push @links, "$dir/$_";
+                               doit("rm","-f",$_);
+                               
+                       },
+                       $tmp);
+       }
+       
        while (@links) {
-               $dest=pop @links;
-               $src=pop @links;
+               my $dest=pop @links;
+               my $src=pop @links;
 
-               # Relivatize src and dest.
+               # Relavatize src and dest.
                $src=~s:^/::;
                $dest=~s:^/::;
 
                # Make sure the directory the link will be in exists.
-               $basedir=Dh_Lib::dirname("$TMP/$dest");
+               my $basedir=dirname("$tmp/$dest");
                if (! -e $basedir) {
                        doit("install","-d",$basedir);
                }
@@ -48,11 +142,12 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                # Policy says that if the link is all within one toplevel
                # directory, it should be relative. If it's between
                # top level directories, leave it absolute.
-               @src_dirs=split(m:/+:,$src);
-               @dest_dirs=split(m:/+:,$dest);
+               my @src_dirs=split(m:/+:,$src);
+               my @dest_dirs=split(m:/+:,$dest);
                if ($src_dirs[0] eq $dest_dirs[0]) {
                        # Figure out how much of a path $src and $dest
                        # share in common.
+                       my $x;
                        for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
                        # Build up the new src.
                        $src="";
@@ -69,6 +164,18 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        $src="/$src";
                }
                
-               doit("ln","-sf",$src,"$TMP/$dest");
+               doit("ln","-sf",$src,"$tmp/$dest");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_link.1 b/dh_link.1
deleted file mode 100644 (file)
index eb2cce2..0000000
--- a/dh_link.1
+++ /dev/null
@@ -1,73 +0,0 @@
-.TH DH_LINK 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_link \- create symlinks in package build directories
-.SH SYNOPSIS
-.B dh_link
-.I "[debhelper options] [-A] [source destination ...]"
-.SH "DESCRIPTION"
-dh_link is a debhelper program that creates symlinks in package build 
-directories.
-.P
-dh_link accepts a list of pairs of source and destination files. The source
-files are the already existing files that will be symlinked from. The
-destination files are the symlinks that will be created. There
-.B must
-be an equal number of source and destination files specified.
-.P
-The list can be specified in two ways. A file named debian/package.links
-(debian/links may be used for the first binary package in debian/control)
-can list pairs of files. If you use this file, you should put each pair
-of files on its own line, and separate the files within the pair with
-whitespace. Also, pairs of files can be specified as parameters - these
-pairs will only be created in the package build directory of the first
-ackage dh_link is told to act on. By default, this is the first binary 
-package in debian/control, but if you use -p, -i, or -a flags, it will be 
-the first package specified by those flags.
-.P
-Be sure you
-.B do
-specify the full filename to both the source and destination files (unlike
-you would do if you were using something like
-.BR ln (1)
-).
-.P
-dh_link will generate symlinks that comply with debian policy - absolute
-when policy says they should be absolute, and relative links with as short a
-path as possible. It will also create any subdirectories it needs to to put
-the symlinks in.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B \-A, \--all
-Create any links specified by command line parameters in ALL packages
-acted on, not just the first.
-.TP
-.B source destination ...
-Create a file named "destination" as a link to a file named "source". Do 
-this in the package build directory of the first package acted on. 
-(Or in all packages if -A is specified.)
-.SH EXAMPLES
-.TP
-.B dh_link usr/man/man1/foo.1 usr/man/man1/bar.1
-Make bar.1 be a symlink to foo.1
-.TP
-.B dh_link var/lib/foo usr/lib/foo usr/X11R6/man/man1/foo.1x usr/man/man1/bar.1
-Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to the
-X man page foo.1x
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH BUGS
-It's impossible to specify filenames with spaces or other whitespace in them
-in debian/links file. This is more a historical design flaw than a bug.
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 3ce48e0676d79d2309768256b782e8e83565f4b9..f919ef6262bcc147d40753b8f68ddff513afca82 100755 (executable)
@@ -1,8 +1,38 @@
 #!/usr/bin/perl -w
-#
-# Output a list of all packages debhelper will act on.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_listpackages - list binary packages debhelper will act on
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_listpackages> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_listpackages is a debhelper program that outputs a list of all binary
+packages debhelper commands will act on. If you pass it some options, it
+will change the list to match the packages other debhelper commands would
+act on if passed the same options.
+
+=cut
+
 init();
 print join("\n",@{$dh{DOPACKAGES}})."\n";
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_listpackages.1 b/dh_listpackages.1
deleted file mode 100644 (file)
index aa4e741..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-.TH DH_LISTPACKAGES 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_listpackages \- list binary packages debhelper will act on
-.SH SYNOPSIS
-.B dh_listpackages
-.I "[debhelper options]"
-.SH "DESCRIPTION"
-dh_listpackages is a debhelper program that outputs a list of all binary
-packages debhelper commands will act on. If you pass it some options, it
-will change the list to match the packages other debhelper commands would
-act on if passed the same options.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 41bf161419e397756f35401eda818ad0cb754200..de9f782796f6511440f7544f90225d3e48a07ee6 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Automatically generate shlibs files.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_makeshlibs - automatically create shlibs file
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_makeshlibs> [S<I<debhelper options>>] [B<-m>I<major>] [B<-V>I<[dependancies]>] [B<-n>] [B<-X>I<item>]
+
+=head1 DESCRIPTION
+
+dh_makeshlibs is a debhelper program that automatically scans for shared
+libraries, and generates a shlibs file for the libraries it finds.
+
+It also adds a call to ldconfig in the postinst and postrm scripts (in
+V3 mode and above only) to any packages which it finds shared libraries in.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-m>I<major>, B<--major=>I<major>
+
+Instead of trying to guess the major number of the library with objdump,
+use the major number specified after the -m parameter. This is much less
+useful than it used to be, back in the bad old days when this program
+looked at library filenames rather than using objdump.
+
+=item B<-V>, B<-V>I<dependancies>
+
+=item B<--version-info>, B<--version-info=>I<dependancies>
+
+By default, the shlibs file generated by this program does not make packages
+depend on any particular version of the package containing the shared
+library. It may be necessary for you to add some version dependancy
+information to the shlibs file. If -V is specified with no dependancy
+information, the current version of the package is plugged into a
+dependancy that looks like "packagename (>= packageversion)". If -V is
+specified with parameters, the parameters can be used to specify the exact
+dependancy information needed (be sure to include the package name).
+
+Beware of using -V without any parameters; this is a conservative setting
+that always ensures that other packages' shared library dependencies are at
+least as tight as they need to be, so that if the maintainer screws up then
+they won't break. The flip side is that packages might end up with
+dependencies that are too tight and so find it harder to be upgraded.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename or directory 
+from being treated as shared libraries.
+
+=back
+
+=head1 EXAMPLES
+
+ dh_makeshlibs
+
+Assuming this is a package named libfoobar1, generates a shlibs file that
+looks something like:
+ libfoobar 1 libfoobar1
+
+ dh_makeshlibs -V
+
+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)
+
+ dh_makeshlibs -V 'libfoobar1 (>= 1.0)'
+
+Generates a shlibs file that looks something like:
+  libfoobar 1 libfoobar1 (>= 1.0)
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
-       if (-e "$TMP/DEBIAN/shlibs") {
-               error("$TMP/DEBIAN/shlibs already exists.");
-       }
+       my %seen;
+       my $need_ldconfig = 0;
+
+       doit("rm", "-f", "$tmp/DEBIAN/shlibs");
 
-       open (FIND, "find $TMP -type f -name '*.so.*' |");
+       # So, we look for files or links to existing files with names that
+       # match "*.so*". Matching *.so.* is not good enough because of
+       # broken crap like db3. And we only look at real files not
+       # symlinks, so we don't accidentually add shlibs data to -dev
+       # packages. This may have a few false positives, which is ok,
+       # because only if we can get a library name and a major number from
+       # objdump is anything actually added.
+       my $exclude='';
+       if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
+               $exclude="! \\( $dh{EXCLUDE_FIND} \\) ";
+       }
+       open (FIND, "find $tmp -type f -name '*.so*' $exclude |");
        while (<FIND>) {
-               chomp;
-               ($library, $major)=m#.*/(.*)\.so\.(\d*)\.?#;
+               my ($library, $major);
+               my $objdump=`objdump -p $_`;
+               if ($objdump=~m/\s+SONAME\s+(.+)\.so\.(.+)/) {
+                       # proper soname format
+                       $library=$1;
+                       $major=$2;
+               }
+               elsif ($objdump=~m/\s+SONAME\s+(.+)-(.+)\.so/) {
+                       # idiotic crap soname format
+                       $library=$1;
+                       $major=$2;
+               }
+
                if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') {
                        $major=$dh{M_PARAMS};
                }
-               if (! -d "$TMP/DEBIAN") {
-                       doit("install","-d","$TMP/DEBIAN");
+               
+               if (! -d "$tmp/DEBIAN") {
+                       doit("install","-d","$tmp/DEBIAN");
                }
-               $deps=$PACKAGE;
+               my $deps=$package;
                if ($dh{V_FLAG_SET}) {
                        if ($dh{V_FLAG} ne '') {
                                $deps=$dh{V_FLAG};
@@ -31,19 +134,50 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        else {
                                # Call isnative becuase it sets $dh{VERSION}
                                # as a side effect.
-                               isnative($PACKAGE);
-                               $deps="$PACKAGE (>= $dh{VERSION})";
+                               isnative($package);
+                               my $version = $dh{VERSION};
+                               # Old compatability levels include the
+                               # debian revision, while new do not.
+                               if (! compat(3)) {
+                                       # Remove debian version, if any.
+                                       $version =~ s/-[^-]+$//;
+                               }
+                               $deps="$package (>= $version)";
                        }
                }
-               if (defined($library) && defined($major) && defined($deps) && 
+               if (defined($library) && defined($major) && defined($deps) &&
                    $library ne '' && $major ne '' && $deps ne '') {
-                       complex_doit("echo '$library $major $deps' >>$TMP/DEBIAN/shlibs");
+                       $need_ldconfig=1;
+                       # Prevent duplicate lines from entering the file.
+                       my $line="$library $major $deps";
+                       if (! $seen{$line}) {
+                               $seen{$line}=1;
+                               complex_doit("echo '$line' >>$tmp/DEBIAN/shlibs");
+                       }
                }
        }
        close FIND;
 
-       if (-e "$TMP/DEBIAN/shlibs") {
-               doit("chmod",644,"$TMP/DEBIAN/shlibs");
-               doit("chown","root.root","$TMP/DEBIAN/shlibs");
+       # New as of dh_v3.
+       if (! compat(2) && ! $dh{NOSCRIPTS} && $need_ldconfig) {
+               autoscript($package,"postinst","postinst-makeshlibs");
+               autoscript($package,"postrm","postrm-makeshlibs");
+       }
+
+       if (-e "$tmp/DEBIAN/shlibs") {
+               doit("chmod",644,"$tmp/DEBIAN/shlibs");
+               doit("chown","0.0","$tmp/DEBIAN/shlibs");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1
deleted file mode 100644 (file)
index 282d54f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-.TH DH_MAKESHLIBS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_makeshlibs \- automatically create shlibs file
-.SH SYNOPSIS
-.B dh_makeshlibs
-.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.
-.P
-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 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
-of the library, use the major number specified after the -m parameter.
-.TP
-.B \-V[dependancies], \--version-info, \--version-info=dependancies
-By default, the shlibs file generated by this program does not make packages
-depend on any particular version of the package containing the shared
-library. It may be necessary for you to add some version dependancy
-information to the shlibs file. If -V is specified with no dependancy
-information, the current version of the package is plugged into a dependancy
-that looks like "packagename (>= packageversion)". If -V is specified with
-parameters, the parameters can be used to specify the exact dependancy
-information needed (be sure to include the package name).
-.SH EXAMPLES
-.TP
-.B dh_makeshlibs
-Assuming this is a package named libfoobar1, generates a shlibs file that
-looks something like:
-  libfoobar 1 libfoobar1
-.TP
-.B dh_makeshlibs \-V
-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)'"
-Generates a shlibs file that looks something like:
-  libfoobar 1 libfoobar1 (>= 1.0)
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.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
-cases like these (and perhaps in general, just to be safe), it is better to
-create a debian/shlibs file by hand, or force it to use the correct major
-number by specifying the -m parameter.
-.P
-This is a "do what I Mean" type program - you have been warned!
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 80b5f4794f9f3014af5d4621a40c2722f931ba61..6f794e7f670504266f5babce19ab7bad7dc64ba9 100755 (executable)
@@ -1,25 +1,62 @@
 #!/usr/bin/perl -w
-#
-# Generate a DEBIAN/md5sums file, that lists the md5sums of all files in the
-# package.
 
+=head1 NAME
+
+dh_md5sums - generate DEBIAN/md5sums file
+
+=cut
+
+use strict;
 use Cwd;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_md5sums> [S<I<debhelper options>>] [B<-x>] [B<-X>I<item>] [B<--include-conffiles>]
+
+=head1 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.
+These files are used by the debsums package.
+
+All files in DEBIAN/ are omitted from the md5sums file, as are all
+conffiles (unless you use the --include-conffiles switch).
+
+The md5sums file is installed with proper permissions and ownerships.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-x>, B<--include-conffiles>
+
+Include conffiles in the md5sums list. Note that this information is
+redundant since it is included elsewhere in debian packages.
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from
+being listed in the md5sums file.
+
+=back
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
-       if (! -d "$TMP/DEBIAN") {
-               doit("install","-d","$TMP/DEBIAN");
+       if (! -d "$tmp/DEBIAN") {
+               doit("install","-d","$tmp/DEBIAN");
        }
 
        # Check if we should exclude conffiles.
        my $exclude="";
-       if (! $dh{INCLUDE} && -r "$TMP/DEBIAN/conffiles") {
+       if (! $dh{INCLUDE_CONFFILES} && -r "$tmp/DEBIAN/conffiles") {
                # Generate exclude regexp.
-               open (CONFF,"$TMP/DEBIAN/conffiles");
+               open (CONFF,"$tmp/DEBIAN/conffiles");
                while (<CONFF>) {
                        chomp;
                        s/^\///;
@@ -33,14 +70,26 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                $exclude.="! \\( $dh{EXCLUDE_FIND} \\) ";
        }
        
-       $olddir=getcwd();
-       complex_doit("cd $TMP >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir >/dev/null");
+       my $olddir=getcwd();
+       complex_doit("cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null");
        # If the file's empty, no reason to waste inodes on it.
-       if (-z "$TMP/DEBIAN/md5sums") {
-               doit("rm","-f","$TMP/DEBIAN/md5sums");
+       if (-z "$tmp/DEBIAN/md5sums") {
+               doit("rm","-f","$tmp/DEBIAN/md5sums");
        }
        else {
-               doit("chmod",644,"$TMP/DEBIAN/md5sums");
-               doit("chown","root.root","$TMP/DEBIAN/md5sums");
+               doit("chmod",644,"$tmp/DEBIAN/md5sums");
+               doit("chown","0.0","$tmp/DEBIAN/md5sums");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_md5sums.1 b/dh_md5sums.1
deleted file mode 100644 (file)
index b044077..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH DH_MD5SUMS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_md5sums \- generate DEBIAN/md5sums file
-.SH SYNOPSIS
-.B dh_md5sums
-.I "[debhelper options] [-x] [-Xitem]"
-.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.
-.P
-All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles
-(unless you use the -x switch).
-.P
-The md5sums file is installed with proper permissions and ownerships.
-.SH OPTIONS
-.TP
-.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 information is
-redundant since it is included elsewhere in debian packages.
-.TP
-.B \-Xitem, --exclude=item
-Exclude files that contain "item" anywhere in their filename from
-being listed in the md5sums file.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 7978163ee8d683291d4088e07671e45bdd36568f..2c8a63fd934bbc32f601839caeb331700f765b41 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Move files out of debian/tmp, into subpackages.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_movefiles - move files out of debian/tmp into subpackages
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_movefiles> [S<I<debhelper options>>] [B<--sourcedir=>I<dir>] [B<-X>I<item>] S<I<file ...>>]
+
+=head1 DESCRIPTION
+
+dh_movefiles is a debhelper program that is responsible for moving files
+out of debian/tmp or some other directory and into other package build
+directories. This may be useful if your package has a Makefile that installs
+everything into debian/tmp, and you need to break that up into subpackages.
+
+Files named debian/package.files list the files to be moved, separated by
+whitespace. The filenames listed should be relative to debian/tmp/. You can
+also list directory names, and the whole directory will be moved. If you
+prefer, you can list the files to move on the command line and this will
+apply to the first package dh_movefiles is told to act on.
+
+Note: dh_install is a much better program that can do everything this one can,
+and more.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--sourcedir=>I<dir>
+
+Instead of moving files out of debian/tmp (the default), this option makes
+it move files out of some other directory. Since the entire contents of
+the sourcedir is moved, specifiying something like --sourcedir=/ is very
+unsafe, so to prevent mistakes, the sourcedir must be a relative filename;
+it cannot begin with a `/'.
+
+=item B<-Xitem>, B<--exclude=item>
+
+Exclude files that contain "item" anywhere in their filename from
+being installed.
+
+=item I<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. 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.
+
+=back
+
+=head1 NOTES
+
+Note that files are always moved out of debian/tmp by default (even if you
+have instructed debhelper to use a compatibility level higher than one,
+which does not otherwise use debian/tmp for anything at all). The idea
+behind this is that the package that is being built can be told to install
+into debian/tmp, and then files can be moved by dh_movefiles from that
+directory. Any files or directories that remain are ignored, and get
+deleted by dh_clean later.
+
+=cut
+
 init();
 
-$ret=0;
+my $ret=0;
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $files=pkgfile($PACKAGE,"files");
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $files=pkgfile($package,"files");
 
+       my $sourcedir="debian/tmp";
        if ($dh{SOURCEDIR}) {
                if ($dh{SOURCEDIR}=~m:^/:) {
                        error("The sourcedir must be a relative filename, not starting with `/'.");
                }
                $sourcedir=$dh{SOURCEDIR};
        }
-       else {
-               $sourcedir="debian/tmp";
-       }
 
        if (! -d $sourcedir) {
                error("$sourcedir does not exist.");
        }
 
-       @tomove=();
+       my @tomove;
 
         # debian/files has a different purpose, so ignore it.
-       if ( $files && $files ne "debian/files" ) {
-               @tomove=filearray($files);
+       if ($files && $files ne "debian/files" ) {
+               @tomove=filearray($files, $sourcedir);
        }
        
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @tomove, @ARGV;
        }
 
-       if (@tomove && $TMP eq $sourcedir) {
-               error("I was asked to move files from $sourcedir to $sourcedir.");
+       if (@tomove && $tmp eq $sourcedir) {
+               error("I was asked to move files from $sourcedir to $sourcedir. Perhaps you should set DH_COMPAT=2?");
        }
 
-       if (@tomove) {
-               if (! -d $TMP) {
-                       doit("install","-d",$TMP);
-               }
-               # Now we need to expand wildcards in @tomove.
-               @filelist=();
+       # Now we need to expand wildcards in @tomove.
+       # This is only necessary in pre-v3 land -- as of v3, the
+       # expension is automatically done by filearray().
+       if (@tomove && compat(2)) {
+               my @filelist=();
                foreach (@tomove) {
                        push @filelist, glob("$sourcedir/$_");
                }
-               
-               # Order the files. First all real files, then symlinks. 
-               # Putting symlinks last is a nice thing to do for library 
-               # packages and doesn't affect much of anything else.
-               doit("rm","-f","movelist");
-               foreach (@filelist) {
-                       $file=$_;
-                       $ret=1 if (! -e $file && ! -l $file);
-                       $file=~s:^$sourcedir/+::;
-                       complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and ! -type l -print || true) >> movelist");
+               @tomove=@filelist;
+       }
+       else {
+               # However, filearray() does not add the sourcedir,
+               # which we need.
+               @tomove = map { "$sourcedir/$_" } @tomove;
+       }
+
+       if (@tomove) {
+               if (! -d $tmp) {
+                       doit("install","-d",$tmp);
                }
-               foreach (@filelist) {
-                       $file=$_;
-                       $ret=1 if (! -e $file && ! -l $file);
-                       $file=~s:^$sourcedir/+::;
-                       complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and -type l -print || true) >> movelist");
+
+               doit("rm","-f","debian/movelist");
+               foreach (@tomove) {
+                       my $file=$_;
+                       if (! -e $file && ! -l $file && ! $dh{NO_ACT}) {
+                               $ret=1;
+                               warning("$file not found (supposed to put it in $package)");
+                       }
+                       $file=~s:^\Q$sourcedir\E/+::;
+                       my $cmd="(cd $sourcedir >/dev/null ; find $file ! -type d ";
+                       if ($dh{EXCLUDE_FIND}) {
+                               $cmd.="-a ! \\( $dh{EXCLUDE_FIND} \\) ";
+                       }
+                       $cmd.="-print || true) >> debian/movelist";
+                       complex_doit($cmd);
                }
-               complex_doit("(cd $sourcedir >/dev/null ; tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP >/dev/null ;tar xpf -)");
-               doit("rm","-f","movelist");
+               my $pwd=`pwd`;
+               chomp $pwd;
+               complex_doit("(cd $sourcedir >/dev/null ; tar --create --files-from=$pwd/debian/movelist --file -) | (cd $tmp >/dev/null ;tar xpf -)");
+               # --remove-files is not used above because tar then doesn't
+               # preserve hard links
+               complex_doit("(cd $sourcedir >/dev/null ; cat $pwd/debian/movelist | xargs rm -f)");
+               doit("rm","-f","debian/movelist");
        }
 }
 
@@ -80,3 +156,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
 # packages that arn't always sure exactly which files need
 # to be moved.
 exit $ret;
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_movefiles.1 b/dh_movefiles.1
deleted file mode 100644 (file)
index 45b84a6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-.TH DH_MOVEFILES 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_movefiles \- move files out of debian/tmp into subpackages
-.SH SYNOPSIS
-.B dh_movefiles
-.I "[debhelper options] [--sourcedir=dir] [file ..]"
-.SH "DESCRIPTION"
-dh_movefiles is a debhelper program that is responsible for moving files out
-of debian/tmp or some other directory and into other package build 
-directories. This may be useful if your package has a Makefile that installs
-everything into debian/tmp, and you need to break that up into subpackages.
-.P
-Files named debian/package.files list the files to be moved, separated by
-whitespace. 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. If you prefer, you can list the files to
-move on the command line and this will apply to the first package
-dh_movefiles is told to act on.
-.P
-The files will be moved in a special order: first all normal files, then all
-symlinks. This is done because it tends to be a good thing to have symlinks
-last in debian packages, particularly in shared library packages.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B --sourcedir=dir
-Instead of moveing files out of debian/tmp (the default), this option makes
-it move files out of some other directory. Since the entire contents of
-the sourcedir is moved, specifiying something like --sourcedir=/ is very
-unsafe, so to prevent mistakes, the sourcedir must be a relative filename; it
-cannot begin with a `/'.
-.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 ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_perl b/dh_perl
index fa9c8eb097ab4ff603d79277d0482d89c558f74f..34624d3f38ad3ebd1103fd5dfdb76aee81e03b88 100755 (executable)
--- a/dh_perl
+++ b/dh_perl
@@ -1,21 +1,72 @@
 #!/usr/bin/perl -w
-#
-# Find dependencies on perl stuff
-# Remove .packlist files
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_perl - calculates perl dependencies
+
+=cut
+
+use strict;
+use Config;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_perl> [S<I<debhelper options>>] [B<-d>] [S<I<library dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_perl is a debhelper program that is responsible for generating
+the ${perl:Depends} substitutions and adding them to substvars files.
+
+The program will look at perl scripts and modules in your package,
+and will use this information to generate a dependency on perl or
+perlapi. The dependency will be substituted into your package's control
+file wherever you place the token "${perl:Depends}".
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-d>
+
+In some specific cases you may want to depend on perl-base rather than the
+full perl package. If so, you can pass the -d option to make dh_perl generate
+a dependency on the correct base package. This is only necessary for some
+packages that are included in the base system.
+
+=item B<-V>
+
+By default, scripts and architecture independent modules don't depend
+on any specific version of perl.  The -V option causes the current
+version of the perl (or perl-base with -d) package to be specified.
+
+=item I<library dirs>
+
+If your package installs perl modules in non-standard
+directories, you can make dh_perl check those directories by passing their
+names on the command line. It will only check the vendorlib and vendorarch
+directories by default.
+
+=back
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.0.1
+
+Perl policy, version 1.18
+
+=cut
+
 init();
 
-my $ext = '';
-my $lib_dir = 'usr/lib/perl5';
+my $vendorlib = substr $Config{vendorlib}, 1;
+my $vendorarch = substr $Config{vendorarch}, 1;
 
-# Figure out the version of perl. If $ENV{PERL} is set, query the perl binary
-# it points to, otherwise query perl directly.
-my $version=sprintf("%.3f", $]);
-if (defined $ENV{PERL}) {
-       $version=`$ENV{PERL} -e 'printf "%.3f", \$]'`;
-}
+# the installation dir for arch-indep modules changed to
+# /usr/share/perl5 in this version:
+my $min_version = '5.6.0-16';
 
 # Cleaning the paths given on the command line
 foreach (@ARGV) {
@@ -23,136 +74,74 @@ foreach (@ARGV) {
        s#^/##;
 }
 
-# If -d is given, then we'll try to depend on one of the perl-5.00X-base 
-# package instead of perl-5.00X
-$ext='-base' if ($dh{'D_FLAG'});
+my $perl = 'perl';
+# If -d is given, then the dependency is on perl-base rather than perl.
+$perl .= '-base' if $dh{D_FLAG};
+my $version;
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $EXT=pkgext($PACKAGE);
+# dependency types
+use constant PROGRAM   => 1;
+use constant PM_MODULE => 2;
+use constant XS_MODULE => 4;
 
-       my ($file, $v, $arch);
-       my $dep_arch = '';
-       my $dep = '';
-       my $found = 0;
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp = tmpdir($package);
+       my $ext = pkgext($package);
 
+       delsubstvar($package, "perl:Depends"); # for idempotency
+       
        # Check also for alternate locations given on the command line
-       my $dirs = '';
-       foreach ($lib_dir, @ARGV) {
-               $dirs .= "$TMP/$_ " if (-d "$TMP/$_");
-       }
-       my $re = '(?:' . join('|', ($lib_dir, @ARGV)) . ')';
+       my @dirs = grep -d, map "$tmp/$_", $vendorlib, $vendorarch, @ARGV;
 
        # Look for perl modules and check where they are installed
-       if ($dirs) {
-           foreach $file (split(/\n/,`find $dirs -type f \\( -name "*.pm" -or -name "*.so" \\)`)) {
-               $found++;
-               if ($file =~ m<^$TMP/$re/(\d\.\d{3})/([^/]+)/>) {
-                       $v = $1;
-                       $arch = $2;
-                       check_module_version ($v, $version);
-                       $v .= '-thread' if ($arch =~ /-thread/); 
-                       $dep_arch = add_deps ($dep_arch, "perl-$v");
-               } elsif ($file =~ m<^$TMP/$re/(\d.\d{3})/>) {
-                       $v = $1;
-                       check_module_version ($v, $version);
-                       $dep_arch = add_deps ($dep_arch, "perl-$v");
+       my $deps = 0;
+       find sub {
+               return unless -f;
+               $deps |= PM_MODULE if /\.pm$/;
+               $deps |= XS_MODULE if /\.so$/;
+       }, @dirs if @dirs;
+
+       # find scripts
+       find sub {
+               return unless -f and (-x or /\.pl$/);
+               local *F;
+               return unless open F, $_;
+               if (read F, local $_, 32 and m%^#!\s*(/usr/bin/perl|/usr/bin/env\s+perl)\s%) {
+                       $deps |= PROGRAM;
                }
-           }
-       }
-
-       if ($found and not $dep_arch) {
-               $dep = "perl5$ext";
-       } elsif ($dep_arch) {
-               $dep = $dep_arch;
-       }
-
-       # Look for perl scripts
-       my ($ff, $newdep);
-       foreach $file (split(/\n/,`find $TMP -type f \\( -name "*.pl" -or -perm +111 \\)`)) {
-               $ff=`file -b $file`;
-               if ($ff =~ /perl/) {
-                       $newdep = dep_from_script ($file);
-                       $dep = add_deps ($dep, $newdep) if $newdep;
+               close F;
+       }, $tmp;
+
+       if ($deps) {
+               my $version="";
+               if ($deps & XS_MODULE or $dh{V_FLAG_SET}) {
+                       ($version) = `dpkg -s $perl` =~ /^Version:\s*(\S+)/m
+                               unless $version;
+                       $version = ">= $version";
                }
-       }
-
-       # Remove .packlist files and eventually some empty directories
-       if (not $dh{'K_FLAG'}) {
-               foreach $file (split(/\n/,`find $TMP -type f -name .packlist`))
-               {
-                       unlink($file);
-                       # Get the directory name
-                       while ($file =~ s#/[^/]+$##){
-                               last if (not -d $file);
-                               last if (not rmdir $file);
-                       }
+               elsif ($deps & PM_MODULE) {
+                       $version = ">= $min_version";
                }
+               
+               # no need to depend on an un-versioned perl-base -- it's
+               # essential
+               addsubstvar($package, "perl:Depends", $perl, $version)
+                       unless $perl eq 'perl-base' && ! length($version);
+
+               # add perlapi-<ver> for XS modules
+               addsubstvar($package, "perl:Depends", "perlapi-$Config{version}")
+                       if $deps & XS_MODULE;
        }
+}
 
-       next unless $dep;
+=head1 SEE ALSO
 
-       if (-e "debian/$EXT\substvars") {
-               open (IN, "<debian/$EXT\substvars");
-               my @lines=grep { ! /^perl:Depends=/ } <IN>;
-               close IN;
-               open (OUT, ">debian/$EXT\substvars");
-               print OUT @lines;
-       } else {
-               open (OUT, ">debian/$EXT\substvars");
-       }
-       print OUT "perl:Depends=$dep\n";
-       close OUT;
-}
+L<debhelper(7)>
 
-sub add_deps {
-       my ($dep, $new) = @_;
-       
-        # If the $new-base package can exist then add $ext to $new
-       $new = "$new$ext" if ($new =~ m/^(?:perl5|perl-\d\.\d{3})$/);
-       
-       # If $new = perl5 or perl5-thread check if perl-X.XXX(-thread)?
-       # is not already in the dependencies
-       if ($new eq "perl5") {
-               return $dep if ($dep =~ m/(^|\s)perl-5\.\d{3}(\s|,|$)/);
-       } elsif ($new eq "perl5-thread") {
-               return $dep if ($dep =~ m/(^|\s)perl-5\.\d{3}-thread(\s|,|$)/);
-       }
-       
-       if (not $dep) {
-               $dep = $new;
-       } else {
-               $dep .= ", $new" unless ($dep =~ m/(^|\s)$new(\s|,|$)/);
-       }
+This program is a part of debhelper.
 
-       return $dep;
-}
+=head1 AUTHOR
 
-sub check_module_version {
-       my ($v1, $v2) = @_;
-       unless ($v1 eq $v2) {
-               warning("A module has been found in perl-$v1 arch directory. But perl-$v2 is the perl currently used ...\n");
-       }
-}
+Brendan O'Dea <bod@debian.org>
 
-sub dep_from_script {
-       my $file = shift;
-       my ($line, $perl, $dep);
-       open (SCRIPT, "<$file") || die "Can't open $file: $!\n";
-       $line = <SCRIPT>;
-       close (SCRIPT);
-       if ($line =~ m<^#!\s*/usr/bin/(perl\S*)(?:\s+|$)>) {
-               $perl = $1;
-               if ($perl eq "perl") {
-                       $dep = "perl5";
-               } elsif ($perl eq "perl-thread") {
-                       $dep = "perl5-thread";
-               } elsif ($perl =~ m/^perl-\d\.\d{3}(?:-thread)?$/) {
-                       $dep = $perl;
-               } elsif ($perl =~ m/^perl(\d\.\d{3})(\d\d)$/) {
-                       # Should never happen but ...
-                       $dep = "perl-$1 (=$1.$2)";
-               }
-       }
-       return $dep;
-}
+=cut
diff --git a/dh_perl.1 b/dh_perl.1
deleted file mode 100644 (file)
index cc2bb50..0000000
--- a/dh_perl.1
+++ /dev/null
@@ -1,60 +0,0 @@
-.TH DH_PERL 1 "22 June 1999" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_perl \- calculates perl scripts & modules dependencies
-.SH SYNOPSIS
-.B dh_perl
-.I "[debhelper options] [-k] [-d] [library dirs ...]"
-.SH "DESCRIPTION"
-dh_perl is a debhelper program that is responsible for generating
-the perl:Depends substitutions and adding them to substvars files. 
-.P
-The program will look for the location of installed modules and will
-use this information to generate a dependency (at the present time
-it can only be perl5, perl5-thread, perl-5.00X or perl-5.00X-thread).
-.P
-It will also look at #! lines of perl scripts in order to be able
-to calculate a dependency for perl scripts and not only perl modules.
-.P
-In addition it will automatically remove .packlist file and will
-remove the directory in which it was if it's empty. You can
-switch off this option by passing -k.
-.SH OPTIONS
-.TP
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.TP
-.B -k
-Keep .packlist files.
-.TP
-.B -d
-In some specific cases you may want to depend on a -base package
-(ie perl-5.00X-base or perl5-base). If so, you can pass
-the -d option to make
-.BR dh_perl 
-generate a dependency on the correct base package. This is only necessary
-for some modules that are included in the base system.
-.TP
-.B library dirs
-If your package does install perl modules in non-standard 
-directories, you can make
-.BR dh_perl
-check those directories by passing their names on the command line.
-.BR dh_perl
-will only check usr/lib/perl5 by default.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.TP
-.BR debhelper (1)
-.SH "CONFORMS TO"
-.P
-Debian policy, version 2.5.0.0
-.P
-Perl policy, version 1.0
-.SH AUTHOR
-Raphaël Hertzog <hertzog@debian.org>
diff --git a/dh_python b/dh_python
new file mode 100755 (executable)
index 0000000..81da6da
--- /dev/null
+++ b/dh_python
@@ -0,0 +1,213 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_python - calculates python dependencies and adds postinst and prerm python scripts
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_python> [S<I<debhelper options>>] [B<-n>] [S<I<module dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_python is a debhelper program that is responsible for generating the
+${python:Depends} substitutions and adding them to substvars files. It
+will also add a postinst and a prerm script if required.
+
+The program will look at python scripts and modules in your package, and
+will use this information to generate a dependency on python, with the
+current major version, or on pythonX.Y if your scripts or modules need a
+specific python version. The dependency will be substituted into your
+package's control file wherever you place the token "${python:Depends}".
+
+If some modules need to be byte-compiled at install time, appropriate
+postinst and prerm scripts will be generated.
+
+If you use this program, your package should build-depend on python.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<module dirs>
+
+If your package installs python modules in non-standard directories, you
+can make dh_python check those directories by passing their names on the
+command line. By default, it will check /usr/lib/site-python,
+/usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
+/usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.5.7
+
+Python policy, version 0.3.7
+
+=cut
+
+init();
+
+my $python = 'python';
+
+# The current python major version
+my $python_major;
+my $python_version = `$python -V 2>&1`;
+if ("$python_version" eq "") {
+       error("Python is not installed, aborting. (Probably forgot to Build-Depend on python.)");
+}
+elsif ($python_version =~ m/^Python\s+(\d+)\.(\d+)\.\d+/) {
+       $python_version = "$1.$2" ;
+       $python_major = $1 ;
+} else { 
+       error("Unable to parse python version out of \"$python_version\".");
+}
+
+# The next python version
+my $python_nextversion = $python_version + 0.1;
+my $python_nextmajor = $python_major + 1;
+
+my @python_allversions = ('1.5','2.1','2.2','2.3');
+foreach (@python_allversions) {
+       s/^/python/;
+}
+
+# Cleaning the paths given on the command line
+foreach (@ARGV) {
+       s#/$##;
+       s#^/##;
+}
+
+# dependency types
+use constant PROGRAM   => 1;
+use constant PY_MODULE => 2;
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp = tmpdir($package);
+
+       delsubstvar($package, "python:Depends");
+
+       # Check for current python dependencies
+       my @dirs = ("usr/lib/site-python", "usr/lib/$package", "usr/share/$package", "usr/lib/games/$package", "usr/share/games/$package", @ARGV );
+       @dirs = grep -d, map "$tmp/$_", @dirs;
+
+       my $deps = 0;
+       my %verdeps = ();
+       foreach (@python_allversions) {
+               $verdeps{$_} = 0;
+       }
+
+       # Find scripts
+       find sub {
+               return unless -f and (-x or /\.py$/);
+               local *F;
+               return unless open F, $_;
+               if (read F, local $_, 32 and m%^#!\s*/usr/bin/(env\s+)?(python(\d+\.\d+)?)\s%) {
+                       if ( "python" eq $2 ) {
+                               $deps |= PROGRAM;
+                       } elsif(defined $verdeps{$2}) {
+                               $verdeps{$2} |= PROGRAM;
+                       }
+               }
+               close F;
+       }, $tmp;
+
+       # Look for python modules
+       my $dirlist="";
+       if (@dirs) {
+               foreach my $curdir (@dirs) {
+                       my $has_module = 0;
+                       $curdir =~ s%^$tmp/%%;
+                       find sub {
+                               return unless -f;
+                               $has_module = 1 if /\.py$/;
+                       }, "$tmp/$curdir" ;
+                       if ($has_module) {
+                               $deps |= PY_MODULE;
+                               $dirlist="$dirlist /$curdir";
+                       }
+               }
+       }
+
+       # Dependencies on current python
+       my $dep_on_python = 0;
+       my $strong_dep = 0;
+       $dep_on_python = 1 if $deps;
+       $strong_dep = 1 if($deps & PY_MODULE);
+       if ($package =~ /^python-/) {
+               my $pack = $package;
+               $pack =~ s/^python/python$python_version/;
+               if (grep { "$_" eq "$pack" } GetPackages()) {
+                       addsubstvar($package, "python:Depends", $pack);
+                       $dep_on_python = 1;
+                       $strong_dep = 1;
+               }
+       }
+       if ($dep_on_python) {
+               addsubstvar($package, "python:Depends", $python, ">= $python_version");
+               if ($strong_dep) {
+                       addsubstvar($package, "python:Depends", $python, "<< $python_nextversion");
+               } else {
+                       addsubstvar($package, "python:Depends", $python, "<< $python_nextmajor");
+               }
+       }
+
+       my $need_prerm = 0;
+
+       # Look for specific pythonX.Y modules
+       foreach my $pyver (@python_allversions) {
+               my $pydir="/usr/lib/$pyver/site-packages";
+               if (grep -d,"$tmp$pydir") {
+                       find sub {
+                               return unless -f;
+                               $verdeps{$pyver} |= PY_MODULE if /\.py$/;
+                       }, "$tmp$pydir";
+               }
+               
+               # Go for the dependencies
+               addsubstvar($package, "python:Depends", $pyver) if $verdeps{$pyver};
+
+               # And now, the postinst and prerm stuff
+               if ($pyver eq "python$python_version") {
+                       if ($verdeps{$pyver} & PY_MODULE) {
+                               $pydir = $pydir.$dirlist;
+                       } else {
+                               $pydir = $dirlist;
+                       }
+                       $verdeps{$pyver} |= PY_MODULE if($deps & PY_MODULE);
+               }
+               if ($verdeps{$pyver} & PY_MODULE && ! $dh{NOSCRIPTS}) {
+                       autoscript($package,"postinst","postinst-python","s%#PYVER#%$pyver%;s%#DIRLIST#%$pydir%");
+                       $need_prerm = 1;
+               }
+       }
+       if ($need_prerm && ! $dh{NOSCRIPTS}) {
+               autoscript($package,"prerm","prerm-python","s%#PACKAGE#%$package%");
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Josselin Mouette <joss@debian.org>
+
+most ideas stolen from Brendan O'Dea <bod@debian.org>
+
+=cut
+
diff --git a/dh_scrollkeeper b/dh_scrollkeeper
new file mode 100755 (executable)
index 0000000..2346532
--- /dev/null
@@ -0,0 +1,108 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_scrollkeeper - generate ScrollKeeper registration scripts
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_scrollkeeper> [S<I<debhelper options>>] [B<-n>] [S<I<directory>>]
+
+=head1 DESCRIPTION
+
+B<dh_scrollkeeper> is a debhelper program that handles correctly
+registering OMF files that it finds in package build trees with
+ScrollKeeper.
+
+This command automatically adds maintainer script snippets for registering
+and unregistering files with ScrollKeeper (unless B<-n> is used). A
+dependency on scrollkeeper will be added to C<${misc:Depends}>, so be sure
+your package uses that variable in F<debian/control>. See
+L<dh_installdeb(1)> for an explantion of Debhelper maintainer script
+snippets.
+
+It will also change any DTD declarations in the OMF and DocBook files
+to refer to local files instead of remote URLs. This change does not
+modify the source files, but the files in the package build tree.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify F<postinst>/F<postrm> scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be
+called between invocations of this command. Otherwise, it may cause
+multiple instances of the same text to be added to maintainer scripts.
+
+=cut
+
+init();
+
+# This is a list of paths where DocBook files might be stored.
+my @xml_paths = (
+       'usr/share/gnome/help' # GNOME Help
+);
+
+# Append the remaining command line arguments
+push @xml_paths, @ARGV if @ARGV;
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       
+       # Only run if there have been OMF files installed
+       if (-d "$tmp/usr/share/omf") {
+               # Get a list of the OMF files
+               my @omf_files = `find $tmp/usr/share/omf -type f -printf '%p\n'`;
+               if (@omf_files) {
+                       # Change any remote DTDs into local DTDs. We only
+                       # look at the first 10 lines to avoid changing any
+                       # of the content. First, the OMF files
+                       foreach my $file (@omf_files) {
+                               chomp $file;
+                               doit("perl", "-i", "-pe", 's,http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd,/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd, if $. < 10', $file);
+                       }
+                       # I could be cunning and parse the OMF for the DocBook
+                       # files. That is far too much effort. Find to the
+                       # rescue! Look for .xml files in the list of
+                       # directories we think they might be in.
+                       foreach my $xmlpath (@xml_paths) {
+                               foreach my $file (`find $tmp/$xmlpath -type f -name \*.xml -printf '%p\n'`) {
+                                       chomp $file;
+                                       doit("perl", "-i", "-pe", 's,http://www.oasis-open.org/docbook/xml/([^/]+)/docbookx.dtd,/usr/share/sgml/docbook/dtd/xml/\\1/docbookx.dtd, if $. < 10', $file);
+                               }
+                       }
+               
+                       if (! $dh{NOSCRIPTS}) {
+                               autoscript($package,"postinst","postinst-scrollkeeper");
+                               autoscript($package,"postrm","postrm-scrollkeeper");
+                       }
+                       # The scripts use scrollkeeper-update with the -q
+                       # option, so we require 0.3.8+.
+                       addsubstvar($package, "misc:Depends", "scrollkeeper", ">= 0.3.8");
+               }
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Ross Burton <ross@burtonini.com>
+
+=cut
index 69047dc0a714a348bfb0c54e204d5bc54d094bea..3fae6a6660bd22570254cead4013090c1a8f2553 100755 (executable)
 #!/usr/bin/perl -w
-#
-# Find dependancies. Simple dpkg-shlibdeps wrapper.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_shlibdeps - calculate shared library dependancies
+
+=cut
+
+use strict;
+use Cwd;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_shlibdeps> [S<I<debhelper options>>] [B<-L>I<package>] [B<-l>I<directory>] [B<-X>I<item>] [S<B<--> I<params>>]
+
+=head1 DESCRIPTION
+
+dh_shlibdeps is a debhelper program that is responsible for calculating
+shared library dependancies for packages.
+
+This program is merely a wrapper around L<dpkg-shlibdeps(1)> that calls it
+once for each package listed in the control file, passing it
+a list of ELF executables and shared libraries it has found.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-u>I<params>, B<--dpkg-shlibdeps-params=>I<params>
+
+=item B<--> I<params>
+
+Pass "params" to L<dpkg-shlibdeps(1)>.
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+passed to dpkg-shlibdeps. This will make their dependancies be ignored.
+This may be useful in some situations, but use it with caution. This option
+may be used more than once to exclude more than one thing.
+
+=item B<-l>I<directory>[:directory:directory:..]
+
+Before dpkg-shlibdeps is run, LD_LIBRARY_PATH will have added to it the 
+specified directory (or directories -- separate with colons). This is
+useful for multi-binary packages where a library is built in one
+package and another package contains binaries linked against said
+library. Relative paths will be made absolute for the benefit of
+dpkg-shlibdeps.
+
+Note that the directory given should be the complete or relative path to
+a directory that contains the library. See example below.
+
+=item B<-L>I<package>, B<--libpackage=>I<package>
+
+Use the shlibs file automatically generated by dh_makeshlibs for the named
+package as a kind of automatically generated shlibs.local file. You can us
+this switch in concert with the -l switch to make dpkg-shlibdeps find a
+library built as part of the current package, and get the shlibs information.
+See example below.
+
+=back
+
+=head1 EXAMPLES
+
+Suppose that your source package produces libfoo1, libfoo-dev, and
+libfoo-bin binary packages. libfoo-bin links against libfoo1, and should
+depend on it. In your rules file, first run dh_makeshlibs, then dh_shlibdeps:
+
+       dh_makeshlibs
+       dh_shlibdeps -L libfoo1 -l debian/libfoo1/usr/lib
+
+This will have the effect of generating automatically a shlibs file for
+libfoo1, and using that file and the libfoo1 library in the
+debian/libfoo1/usr/lib directory to calculate shared library dependency
+information.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $EXT=pkgext($PACKAGE);
+# Add directory to library search path.
+if ($dh{L_PARAMS}) {
+       my @paths=();
+       # Add to existing paths, if set.
+       push @paths, $ENV{'LD_LIBRARY_PATH'}
+               if exists $ENV{'LD_LIBRARY_PATH'};
+       foreach (split(/:/, $dh{L_PARAMS})) {
+               # Force the path absolute.
+               if (m:^/:) {
+                       push @paths, $_;
+               }
+               else {
+                       push @paths, getcwd()."/$_";
+               }
+       }
+       $dh{L_PARAMS}=join(':', @paths);
+       $ENV{'LD_LIBRARY_PATH'}=$dh{L_PARAMS};
+       verbose_print("LD_LIBRARY_PATH=$dh{L_PARAMS}");
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $ext=pkgext($package);
 
        my @filelist;
        my $ff;
 
-       # Generate a list of all ELF binaries in the package.
-       foreach $file (split(/\n/,`find $TMP -type f \\( -perm +111 -or -name "*.so*" \\)`)) {
-               # TODO: this is slow, optimize. Ie, file can run once on multiple files..
-               $ff=`file $file`;
-               if ($ff=~m/ELF/) {
+       # Generate a list of ELF binaries in the package, ignoring any
+       # we were told to exclude.
+       my $find_options='';
+       if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
+               $find_options="! \\( $dh{EXCLUDE_FIND} \\)";
+       }
+       foreach my $file (split(/\n/,`find $tmp -type f \\( -perm +111 -or -name "*.so*" \\) $find_options`)) {
+               # TODO this is slow, optimize. Ie, file can run once on
+               # multiple files..
+               $ff=`file "$file"`;
+               if ($ff=~m/ELF/ && $ff!~/statically linked/) {
                        push @filelist,$file;
                }
        }
 
        if (@filelist) {
-               doit("dpkg-shlibdeps","-Tdebian/$EXT\substvars",@{$dh{U_PARAMS}},@filelist);
+               my @opts;
+               if (defined $dh{LIBPACKAGE} && length $dh{LIBPACKAGE}) {
+                       @opts=("-L".tmpdir($dh{LIBPACKAGE}."/DEBIAN/shlibs"));
+               }
+               doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",
+                       @opts,@{$dh{U_PARAMS}},@filelist);
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1
deleted file mode 100644 (file)
index b414965..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH DH_SHLIBDEPS 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_shlibdeps \- calculate shared library dependancies
-.SH SYNOPSIS
-.B dh_shlibdeps
-.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
-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.
-.SH OPTIONS
-.TP
-.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 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 dpkg-shlibdeps (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 9d6ab050fde217db979de2c5ed5e562fb0cbf7c4..9e107f46ba867603317fdd61709ddd2e11495450 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -1,12 +1,78 @@
 #!/usr/bin/perl -w
-#
-# Strip files.
 
+=head1 NAME
+
+dh_strip - strip executables, shared libraries, and some static libraries
+
+=cut
+
+use strict;
 use File::Find;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>]
+
+=head1 DESCRIPTION
+
+dh_strip is a debhelper program that is responsible for stripping
+executables, shared libraries, and static libraries that are not used for
+debugging.
+
+This program examines your package build directories and works out what
+to strip on its own. It uses L<file(1)> and file permisions and filenames
+to figure out what files are shared libraries (*.so), executable binaries,
+and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and
+strips each as much as is possible. (Which is not at all for debugging
+libraries.) In general it seems to make very good guesses, and will do the
+right thing in almost all cases.
+
+Since it is very hard to automatically guess if a file is a
+module, and hard to determine how to strip a module, dh_strip does not
+currently deal with stripping binary modules such as .o files.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+stripped. You may use this option multiple times to build up a list of
+things to exclude.
+
+=back
+
+=head1 NOTES
+
+If the DEB_BUILD_OPTIONS environment variable contains "nostrip", nothing
+will be stripped, in accordance with Debian policy.
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.0.1
+
+=cut
+
 init();
 
+# This variable can be used to turn off stripping (see Policy).
+if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~ /nostrip/) {
+       exit;
+}
+
+# I could just use `file $_[0]`, but this is safer
+sub get_file_type {
+       my $file=shift;
+       open (FILE, '-|') # handle all filenames safely
+               || exec('file', $file)
+               || die "can't exec file: $!";
+       my $type=<FILE>;
+       close FILE;
+       return $type;
+}
+
 # Check if a file is an elf binary, shared library, or static library,
 # for use by File::Find. It'll fill the following 3 arrays with anything
 # it finds:
@@ -16,15 +82,18 @@ sub testfile {
 
        # See if we were asked to exclude this file.
        # Note that we have to test on the full filename, including directory.
-       $fn="$File::Find::dir/$_";
-       foreach $f (@{$dh{EXCLUDE}}) {
+       my $fn="$File::Find::dir/$_";
+       foreach my $f (@{$dh{EXCLUDE}}) {
                return if ($fn=~m/\Q$f\E/);
        }
 
+       # Is it a debug library in a debug subdir?
+       return if $fn=~m/debug\/.*\.so/;
+
        # Does its filename look like a shared library?
        if (m/.*\.so.*?/) {
                # Ok, do the expensive test.
-               my $type=`file $_`;
+               my $type=get_file_type($_);
                if ($type=~m/.*ELF.*shared.*/) {
                        push @shared_libs, $fn;
                        return;
@@ -32,40 +101,54 @@ sub testfile {
        }
        
        # Is it executable? -x isn't good enough, so we need to use stat.
-       (undef,undef,$mode,undef)=stat(_);
+       my (undef,undef,$mode,undef)=stat(_);
        if ($mode & 0111) {
                # Ok, expensive test.
-               my $type=`file $_`;
-               if ($type=~m/.*ELF.*executable.*/) {
+               my $type=get_file_type($_);
+               if ($type=~m/.*ELF.*(executable|shared).*/) {
                        push @executables, $fn;
                        return;
                }
        }
        
        # Is it a static library, and not a debug library?
-       if (m/lib.*\.a/ && ! m/.*_g\.a/) {
+       if (m/lib.*\.a$/ && ! m/.*_g\.a$/) {
                push @static_libs, $fn;
                return;
        }
 }
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
 
        @shared_libs=@executables=@static_libs=();
-       find(\&testfile,$TMP);
+       find(\&testfile,$tmp);
 
        foreach (@shared_libs) {
                # Note that all calls to strip on shared libs
                # *must* inclde the --strip-unneeded.
-               doit("strip","--remove-section=.comment","--remove-section=.note","--strip-unneeded",$_);
+               doit("strip","--remove-section=.comment",
+                       "--remove-section=.note","--strip-unneeded",$_);
        }
        
        foreach (@executables) {
-               doit("strip","--remove-section=.comment","--remove-section=.note",$_);
+               doit("strip","--remove-section=.comment",
+                       "--remove-section=.note",$_);
        }
 
        foreach (@static_libs) {
                doit("strip","--strip-debug",$_);
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_strip.1 b/dh_strip.1
deleted file mode 100644 (file)
index 683de57..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-.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 "[debhelper options] [-Xitem]"
-.SH "DESCRIPTION"
-dh_strip is a debhelper program that is responsible for stripping
-executables, shared libraries, and static libraries that are not used for
-debugging.
-.P
-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 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
-stripped. You may use this option multiple times to build up a list of
-things to exclude.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index dd01c2ce4fadc12168aa7c3007d672ee0273d7cd..3bc9bd98ce858320b21406948b23c48ca0517561 100755 (executable)
@@ -1,36 +1,62 @@
 #!/usr/bin/perl -w
-#
-# If no parameters are given, and no debian/suid files exists, scan for 
-# suid/sgid files and suidregister them. 
-#
-# If there are parameters, or there is a debian/suid, register the files
-# listed there.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+
+=head1 NAME
+
+dh_suidregister - obsolete suid registration program
+
+=head1 SYNOPSIS
+
+Do not run!
+
+=head1 DESCRIPTION
+
+This program used to register suid and sgid files with L<suidregister(1)>,
+but with the introduction of L<dpkg-statoverride(8)>, registration of files
+in this way is unnecessary, and even harmful, so this program should not be
+used.
+
+=head1 CONVERTING TO STATOVERRIDE
+
+Converting a package that uses this program to use the new statoverride
+mechanism is easy. Just remove the call to dh_suidregister from
+debian/rules, and add a versioned conflicts into your control file, as
+follows:
+
+  Conflicts: suidmanager (<< 0.50)
+
+The conflicts is only necessary if your package used to register things
+with suidmanager; if it did not, you can just remove the call to this
+program from your rules file.
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $suid=pkgfile($PACKAGE,"suid");
+my $notused=1;
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $suid=pkgfile($package,"suid");
+       my $tostrip='';
 
-       @files=();
+       my @files;
        if ($suid) {
-               @files=filearray($suid);
+               @files=filearray($suid, $tmp);
        }
 
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+       if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
                push @files, @ARGV;
        }
 
        if (! @files && ! $suid) {
                # No files specified (and no empty debian/suid file), so
                # guess what files to process.
-               @files=split(/\n/,`find $TMP -type f -perm +6000`);
+               @files=split(/\n/,`find $tmp -type f -perm +6000`);
 
-               # We will strip the debian working directory off of the
-               # filenames.
-               $tostrip="$TMP/";
+               # Strip the debian working directory off of the filenames.
+               $tostrip="$tmp/";
        }
        else {
                # We will strip leading /'s, so the user can feed this
@@ -39,34 +65,63 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                $tostrip="/";
        }
 
-       foreach $file (@files) {
+       # Register files with suidregister.
+       foreach my $file (@files) {
                # Strip leading $tostrip from $file.
                $file=~s/^$tostrip//;
 
-               # Create the sed string that will be used to 
+               # Create the sed string that will be used to
                # fill in the blanks in the autoscript files.
                # Fill with the owner, group, and perms of the file.
-               (undef,undef,$mode,undef,$uid,$gid,undef) = stat("$TMP/$file");
-               # Now come up with the user and group names for the uid and gid.
-               $user=getpwuid($uid);
+               my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$tmp/$file");
+               # Now come up with the user and group names for the uid and
+               # gid.
+               my $user=getpwuid($uid);
                if (! defined $user) {
                        warning("$file has odd uid $uid, not in /etc/passwd");
                        $user=$uid;
                }
-               $group=getgrgid($gid);
+               my $group=getgrgid($gid);
                if (! defined $group) {
                        warning("$file has odd gid $gid not in /etc/group");
                        $group=$gid;
                }
-               # Note that I have to print mode in ocal, stripping file type.
-               $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
-                               $mode & 07777);
-
-               autoscript($PACKAGE,"postinst","postinst-suid",$sedstr);
-               autoscript($PACKAGE,"postrm","postrm-suid","$sedstr");
-               
-               if ( -e "$TMP/$file") {
-                       doit("chmod","a-s","$TMP/$file");
+               # Note that I have to print mode in ocal, stripping file
+               # type.
+               my $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$package/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/",
+                                   $mode & 07777);
+               autoscript($package,"postinst","postinst-suid",$sedstr);
+               autoscript($package,"postrm","postrm-suid","$sedstr");
+       }
+
+       # Remove suid bits from files. This is delayed to this point, because
+       # of a situation with hard linked files if it is done earlier.
+       # See changelog for 2.0.77.
+       foreach my $file (@files) {
+               if ( -e "$tmp/$file") {
+                       doit("chmod","a-s","$tmp/$file");
                }
        }
+
+       if (@files) {
+               warning("This program should no longer be used. Please read the dh_suidregister(1) man page.");
+               $notused=0;
+       }
+}
+
+# Although they called it, it's not going to do anything.
+if ($notused) {
+       warning("This program is obsolete, does nothing, and may be safely removed from your rules file.");
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_suidregister.1 b/dh_suidregister.1
deleted file mode 100644 (file)
index 4e0984b..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-.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 "[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
-with 
-.BR suidregister (1)
-when it is installed.
-.P
-Any filenames specified as parameters will be registered in the first 
-package dh_suidregister is told to act on. By default, this is the first 
-binary package in debian/control, but if you use -p, -i, or -a flags, 
-it will be the first package specified by those flags.
-.P
-Files named debian/package.suid (or debian/suid for the first binary package
-in debian/control) can list other files to be registered.
-.P
-If neither of these methods is used to specify files, dh_suidregister will
-scan the package build directory for files that have suid permissions, and
-will automatically register all files it finds.
-.P
-Note that this program modifies your postinst and postrm files. See
-.BR dh_installdeb (1)
-for an explanation of how this works.
-.P
-Also note that all files registered by this program will *not* be suid in the
-resulting .deb file. The postinst of the package will set their permissions
-(even if the user doesn't have suidmanager installed).
-.SH OPTIONS
-.TP
-.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
-acted on. I doubt anyone will find this useful, it's here for consitency
-with other debhelper programs.
-.TP
-.B file ...
-Register these files in the first package acted on. (Or in all packages if
--A is specified.)
-.SH NOTES
-dh_suidregister does not make anything suid. It merely records the
-permissions binaries already have. If you need to make something suid, you
-must do so manually before calling dh_suidregister.
-.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 suidregister (8)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 6d9258db66e7e50b5272153b0f0c5d888e14c57e..451b9aebcca223e3a54c12d8cde0cabbd1746fb4 100755 (executable)
@@ -1,15 +1,53 @@
 #!/usr/bin/perl -w
-#
-# Checks to make sure we are building the package in the right directory.
-# Tests for the existance of debian/control, and for the existance
-# of any other files you specify on the command line.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+=head1 NAME
+
+dh_testdir - test directory before building debian package
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_testdir> [S<I<debhelper options>>] [S<I<file ...>>]
+
+=head1 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
+exists, as well as any other files you specify. If not,
+it exits with an error.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<file ...>
+
+Test for the existence of these files too.
+
+=back
+
+=cut
+
 init();
 
-foreach $file ('debian/control',@ARGV) {
+foreach my $file ('debian/control', @ARGV) {
        if (! -e $file) {
                error("\"$file\" not found. Are you sure you are in the correct directory?");
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_testdir.1 b/dh_testdir.1
deleted file mode 100644 (file)
index 43c7439..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-.TH DH_TESTDIR 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_testdir \- test directory before building debian package
-.SH SYNOPSIS
-.B dh_testdir
-.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
-exists, as well as any other files you specify. If not,
-it exits with an error.
-.SH OPTIONS
-.TP
-.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
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 6ce2a1345c336634a5d15b30050ff1768076dab2..346847688d02033e9cab336aa4b3d9d5287629f3 100755 (executable)
@@ -1,13 +1,36 @@
 #!/usr/bin/perl -w
-#
-# Checks to make sure you are root.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-init();
+=head1 NAME
+
+dh_testroot - ensure that a package is built as root
+
+=head1 SYNOPSIS
+
+B<dh_testroot> [S<I<debhelper options>>]
+
+=head1 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 
+L<fakeroot(1)>
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
 
-# Test for uid = 0, not username of root, becuase
-# some people rename root.
 if ($< != 0) {
-       error("You must run this as root.");
+       error("You must run this as root (or use fakeroot).");
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_testroot.1 b/dh_testroot.1
deleted file mode 100644 (file)
index 6fcdf4f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-.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 "[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
-.BR fakeroot (1)
-to work around this.
-.SH OPTIONS
-.TP
-.B debhelper options
-See
-.BR debhelper (1)
-for a list of options common to all debhelper commands.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
index 096aa9e1f136b31a72b23d6bd3be45393663b98a..a17f22e9ffe7f7add9a9f13be7c544bfc10af331 100755 (executable)
@@ -1,10 +1,55 @@
 #!/usr/bin/perl -w
-#
-# Debhelper version check.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-use Dh_Version; # contains the version number of debhelper.
+=head1 NAME
+
+dh_testversion - ensure that the correct version of debhelper is installed
+
+=cut
+
+use Debian::Debhelper::Dh_Lib;
+use Debian::Debhelper::Dh_Version; # contains the version number of debhelper.
+
+=head1 SYNOPSIS
+
+B<dh_testversion> [S<I<debhelper options>>] [I<operator>] [I<version>]
+
+=head1 DESCRIPTION
+
+Note: This program is deprecated. You should use build dependencies
+instead.
+
+dh_testversion compares the version of debhelper against the version you
+specify, and if the condition is not met, exits with an error message.
+
+You can use this in your debian/rules files if a new debhelper feature is
+introduced, and your package requires that feature to build correctly. Use
+debhelper's changelog to figure out the version you need.
+
+Be sure not to overuse dh_testversion. If debhelper version 9.5
+introduces a new dh_autofixbugs command, and your package uses it, then if
+someone tries to build it with debhelper 1.0, the build will fail anyway when
+dh_autofixbugs cannot be found, so there is no need for you to use
+dh_testversion.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<operator>
+
+Optional comparison operator used in comparing the versions. If not 
+specified, ">=" is used. For descriptions of the comparison operators, see 
+dpkg --help.
+
+=item I<version>
+
+Version number to compare against the current version of debhelper. If not
+specified, dh_testversion does nothing.
+
+=back
+
+=cut
+
 init();
 
 my($compare, $ver);
@@ -18,7 +63,22 @@ elsif ($#ARGV eq 0) {
        $ver=shift;
 }
 
+warning("This program is deprecated, you should use build dependencies instead.");
+
 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.");
+       warning("Something like: \"Build-Depends: debhelper ($compare $ver)\"");
+       system('dpkg','--compare-versions',$Debian::Debhelper::Dh_Version::version,$compare,$ver) == 0 ||
+               error("debhelper version $Debian::Debhelper::Dh_Version::version is installed, but a version $compare $ver is needed to build this package.");
 }
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut
diff --git a/dh_testversion.1 b/dh_testversion.1
deleted file mode 100644 (file)
index 19ded26..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-.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 [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.
-.P
-You should use this in your debian/rules files if a new debhelper feature is
-introduced, and your package requires that feature to build correctly. Use
-debhelper's changelog to figure out the version you need.
-.P
-Be sure not to overuse dh_testversion. If debhelper version 9.5
-introduces a new dh_autofixbugs command, and your package uses it, then if
-someone tries to build it with debhelper 1.0, the build will fail anyway when
-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 
-dpkg --help.
-.TP
-.B version
-Version number to compare against the current version of debhelper. If not
-specified, dh_testversion does nothing.
-.SH EXAMPLES
-.TP
-.I dh_testversion 1.0
-Make sure debhelper version 1.0 or higher is installed.
-.TP
-.I dh_testversion ge 1.0
-Another way to make sure debhelper version 1.0 or higher is installed.
-.TP
-.I dh_testversion lt 1.0
-Make sure a version of debhelper less than version 1.0 is installed.
-.SH ENVIRONMENT
-See
-.BR debhelper (1)
-for a list of environment variables that affect all debhelper commands.
-.SH "SEE ALSO"
-.BR debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_testversion.in b/dh_testversion.in
deleted file mode 100644 (file)
index 9e2f14e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh -e
-#
-# Debhelper version check.
-
-# Current version of debhelper is:
-DH_VERSION=#DEBHELPER_VERSION#
-
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
-
-if [ "$1" -a "$2" ]; then
-       compare=$1
-       ver=$2
-elif [ "$1" ]; then
-       compare=">="
-       ver=$1
-fi
-
-if [ "$compare" -a "$ver" ] ; then
-       if ! dpkg --compare-versions $DH_VERSION $compare $ver; then
-               error "debhelper version $DH_VERSION is installed, but a version $compare $ver is needed to build this package."
-       fi
-fi
index 77ee3f585a120550d1cbd8ca454baaaac62ce3ed..5596485c11b43f5ccedecf2a829f33b5140684d2 100755 (executable)
@@ -1,54 +1,38 @@
 #!/usr/bin/perl -w
-#
-# Passed a list of undocumented man pages, generates symlinks to
-# undocumented.7.gz for those man pages.
-#
-# Also, it looks for debian/undocumented files for more lists of
-# undocumented man pages.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+
+=head1 NAME
+
+dh_undocumented - obsolete undocumented.7 symlink program
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+Do not run!
+
+=head1 DESCRIPTION
+
+This program used to make symlinks to the undocumented.7 man page for man
+pages not present in a package. Debian policy now frowns on use of the
+undocumented.7 man page, and so this program does nothing, and should not
+be used.
+
+=cut
+
 init();
+warning("This program does nothing and should no longer be used.");
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $undocumented=pkgfile($PACKAGE,"undocumented");
-
-       @undoc=();
-       if ($undocumented) {
-               @undoc=filearray($undocumented);
-       }
-
-       if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-               push @undoc, @ARGV;
-       }       
-
-       foreach $file (@undoc) {
-               $file=~s/.gz$//; # .gz extention is optional in input.
-
-               # Determine what directory the file belongs in,
-               # /usr/man, or /usr/X11R6/man, and how the link to
-               # the undocuemtned.7 man page will look.
-               ($section)=$file=~m/^.*\.(\d)/;
-               if (!$section) {
-                       error("\"$file\" does not have an extention.");
-               }       
-               if ($file=~/.*\.\dx/) {
-                       $dir="usr/X11R6/man/man$section";
-                       $reldir="../../../man/man7/";
-               }
-               elsif ($section != 7) {
-                       $dir="usr/man/man$section";
-                       $reldir="../man7/";
-               }
-               else {
-                       $dir="usr/man/man$section";
-                       $reldir="";
-               }
-
-               if (! -d "$TMP/$dir") {
-                       doit("install","-d","$TMP/$dir");
-               }
-               doit("ln","-sf","${reldir}undocumented.7.gz","$TMP/$dir/$file.gz");
-       }
-}
+=cut
diff --git a/dh_undocumented.1 b/dh_undocumented.1
deleted file mode 100644 (file)
index 63a8397..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-.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 "[debhelper options [-A] [manpage ...]"
-.SH "DESCRIPTION"
-dh_undocumented is a debhelper program that is responsible for making
-symlinks to the
-.BR undocumented (7)
-man page for man pages that are not present in your package.
-.P
-The program takes a list of man pages that should be symlinked to
-.BR undocumented (7)
-It determines what directory the man pages should be placed in by examining
-their extensions - pages ending in "x" go into /usr/X11R6/man/, while pages
-that end in anything else go in /usr/man/. It also examines the extention to
-see what section the man page belongs in. After figuring this out, it
-generates the necessary symlinks to
-.BR undocumented (7)
-, placing the sylinks in the package build directory.
-.P
-The lists of man pages that need 
-.BR undocumented (7)
-symlinks can be specified in two ways. Any man page names specified as
-parameters will be set up in the first package dh_undocumented is told
-to act on. By default, this is the first binary package in debian/control, 
-but if you use -p, -i, or -a flags, it will be the first package specified 
-by those flags.
-Also, a file named debian/package.undocumented (or debian/undocumented, for 
-the first binary package in debian/control) can list other man page names to
-set up.
-.SH OPTIONS
-.TP
-.TP
-.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 
-command line parameters in ALL packages acted on. I doubt anyone will find
-this useful, it's here for consitency with other debhelper programs.
-.TP
-.B manpage ...
-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 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 undocumented (7)
-.SH "CONFORMS TO"
-Debian policy, version 2.5.0.0
-.SH AUTHOR
-Joey Hess <joeyh@master.debian.org>
diff --git a/dh_usrlocal b/dh_usrlocal
new file mode 100755 (executable)
index 0000000..603c37c
--- /dev/null
@@ -0,0 +1,122 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+dh_usrlocal - migrate usr/local directories to maintainer scripts
+
+=cut
+
+use warnings;
+use strict;
+use Debian::Debhelper::Dh_Lib;
+use File::Find;
+use File::stat;
+
+=head1 SYNOPSIS
+
+B<dh_usrlocal> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+dh_usrlocal is a debhelper program that can be used for building packages
+that will provide a subdirectory in /usr/local when installed.
+
+It finds subdirectories of usr/local in the package build directory, and
+removes them, replacing them with maintainer script snippets (unless B<-n>
+is used) to create the directories at install time, and remove them when
+the package is removed, in a manner compliant with Debian policy. See
+L<dh_installdeb(1)> for an explantion of Debhelper maintainer script
+snippets.
+
+If the directories found in the build tree have unusual owners, groups, or
+permisions, then those values will be preserved in the directories made by
+the postinst script. However, as a special exception, if a directory is owned
+by root.root, it will be treated as if it is owned by root.staff and is mode
+2775. This is useful, since that is the group and mode policy recommends for
+directories in /usr/local.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify F<postinst>/F<prerm> scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=head1 CONFORMS TO
+
+Debian policy, version 2.2
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp = tmpdir($package);
+
+       if (-d "$tmp/usr/local") {
+               my (@dirs, @justdirs);
+               find({bydepth => 1,
+                     no_chdir => 1,
+                     wanted => sub {
+                       my $fn = $File::Find::name;
+                       if (-d $fn) {
+                               my $stat = stat $fn;
+                               my $user = getpwuid $stat->uid;
+                               my $group = getgrgid $stat->gid;
+                               my $mode = sprintf "%04lo", ($stat->mode & 07777);
+
+                               if ($stat->uid == 0 && $stat->gid == 0) {
+                                       $group = 'staff';
+                                       $mode = '2775';
+                               }
+
+                               $fn =~ s!^\Q$tmp\E!!;
+                               return if $fn eq '/usr/local';
+                               
+                               # @dirs is in parents-first order for dir creation...
+                               unshift @dirs, "$fn $mode $user $group";
+                               # ...whereas @justdirs is depth-first for removal.
+                               push @justdirs, $fn;
+                               doit("rmdir $_");
+                       }
+                       else {
+                               warning("$fn is not a directory");
+                       }
+                     }}, "$tmp/usr/local");
+               doit("rmdir $tmp/usr/local");
+       
+               my $bs = "\\";     # A single plain backslash
+               my $ebs = $bs x 2; # Escape the backslash from the shell
+               # This constructs the body of a 'sed' c\ expression which
+               # is parsed by the shell in double-quotes
+               my $dirs = join("$ebs\n", @dirs);
+               my $justdirs = join("$ebs\n", @justdirs);
+               if (! $dh{NOSCRIPTS}) { 
+                       autoscript($package,"postinst", "postinst-usrlocal",
+                                  "/#DIRS#/ c${ebs}\n${dirs}");
+                       autoscript($package,"prerm", "prerm-usrlocal",
+                                  "/#JUSTDIRS#/ c${ebs}\n${justdirs}");
+               }
+       }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Andrew Stribblehill <ads@debian.org>
+
+=cut
index 891d31b0d60e8e7c691476900e1acb6add9e2ac2..6cae08a5c78ed3fb558fa3e53092e4e01c233d5c 100644 (file)
@@ -1,4 +1,6 @@
 This file documents things you should know to write a new debhelper program.
+Any program with a name that begins with dh_ should conform to these
+guidelines (with the historical exception of dh_make).
 
 Standardization:
 ---------------
@@ -11,14 +13,14 @@ pollute the name space too much.
 
 Debhelper programs should never output anything to standard output except
 error messages, important warnings, and the actual commands they run that
-modify files under debian/ and debian/tmp, etc (this last only if they are
-passed -v, and if you output the commands, you should indent them with 1 tab). 
-This is so we don't have a lot of noise output when all the debhelper commands
-in a debian/rules are run, so the important stuff is clearly visible.
+modify files under debian/ (this last only if they are passed -v, and if you
+output the commands, you should indent them with 1 tab). This is so we don't
+have a lot of noise output when all the debhelper commands in a debian/rules
+are run, so the important stuff is clearly visible.
 
-Debhelper programs should accept the options, -v, -i, -a, -p, --no-act, and
--P, and any long forms of these options, like --verbose . If necessary, the
-options may be ignored.
+Debhelper programs should accept all options listed in the "SHARED
+DEBHELPER OPTIONS" section of debhelper(7), including any long forms of
+these options, like --verbose . If necessary, the options may be ignored.
 
 If debhelper commands need config files, they should use
 debian/package.filename as the name of the config file (replace filename
@@ -29,19 +31,25 @@ information that appears in the config files, on their command lines, if
 possible, and apply that information to the first package they act on.
 
 Debhelper programs should never modify the debian/postinst, debian/prerm,
-etc scripts, instead, they can add lines to debian/postinst.debhelper, etc. 
+etc scripts. Instead, they can add lines to debian/postinst.debhelper, etc. 
 The autoscript() function (see below) is one easy way to do this.
 dh_installdeb is an exception, it will run after the other commands and
 merge these modifications into the actual postinst scripts.
 
+In general, files named debian/*.debhelper are internal to debhelper, and
+their existence or use should not be relied on by external programs such as
+the build process of a package.
+
+Debhelper programs should default to doing exactly what policy says to do.
+
 There are always exceptions. Just ask me.
 
 Introducing Dh_Lib.pm:
 ---------------------
 
-Dh_lib.pm is the library used by all debhelper programs to parse their
+Dh_Lib.pm is the library used by all debhelper programs to parse their
 arguments and set some useful variables. It's not mandatory that your
-program use Dh_lib.pm, but it will make it a lot easier to keep it in sync
+program use Dh_Lib.pm, but it will make it a lot easier to keep it in sync
 with the rest of debhelper if it does, so this is highly encouraged.
 
 (There used to be a version of Dh_lib.pm that was a library of functions for
@@ -49,17 +57,16 @@ shell scripts. If you want to write a debhelper command that is a shell
 script, I can dig up that old library for you. Only the perl one is
 supported now, though.)
 
-Use Dh_lib.pm like this:
+Use Dh_Lib.pm like this:
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib
 init();
 
 The BEGIN block is there to make perl look for the module in all the right
 places.
 
-The init() function in the perl version. This causes Dh_lib to
-parse the command line and do some other initialization tasks.
+The init() function causes Dh_lib to parse the command line and do some other
+initialization tasks.
 
 Argument processing:
 -------------------
@@ -78,10 +85,10 @@ switch              variable        description
 --no-act       NO_ACT          should the program not actually do anything?
 -i,-a,-p,-N    DOPACKAGES      a space delimited list of the binary packages
                                to act on (in Dh_Lib.pm, this is an array)
--i,-p,-N       DOINDEP         a space delimited list of the binary independent
-                               packages to act on
--a,-p,-N       DOARCH          a space delimited list of the binary dependent
-                               packages to act on
+-i             DOINDEP         set if we're acting on binary independent
+                               packages
+-a             DOARCH          set if we're acting on binary dependent
+                               packages
 -n             NOSCRIPTS       if set, do not make any modifications to the 
                                package's postinst, postrm, etc scripts.
 -X             EXCLUDE         exclude a something from processing (you
@@ -104,6 +111,8 @@ switch              variable        description
                                other program. (This is an array)
 -m             M_PARAMS        will be set to a string, you decide what it
                                means to your program
+-l             L_PARAMS        will be set to a string, you decide what it
+                               means to your program
 -V             V_FLAG          will be set to a string, you decide what it
                                means to your program
 -V             V_FLAG_SET      will be 1 if -V was specified, even if no
@@ -120,9 +129,11 @@ switch             variable        description
                                dh_movefiles will ever use this)
 --destdir      DESTDIR         will be set to a string (probably only
                                dh_builddeb will ever use this)
+--filename     FILENAME        will be set to a string
 --flavor       FLAVOR          will be set to a string (probably only
                                dh_installemacsen will ever use this)
---number       NUMBER          will be set to a number
+--number       PRIORITY        will be set to a number (deprecated)
+--priority     PRIORITY        will be set to a number
 
 Any additional command line parameters that do not start with "-" will be 
 ignored, and you can access them later just as you normally would.
@@ -137,7 +148,7 @@ The following keys are also set in the %dh hash when you call init():
 MAINPACKAGE    the name of the first binary package listed in
                debian/control
 FIRSTPACKAGE   the first package we were instructed to act on. This package
-               typically gets special treatment, additional arguments
+               typically gets special treatment; additional arguments
                specified on the command line may effect it.
 
 Functions:
@@ -145,35 +156,34 @@ Functions:
 
 Dh_Lib.pm also contains a number of functions you may find useful.
 
-doit()
+doit(@command)
        Pass this function an array that is a 
        shell command. It will run the command (unless $dh{NO_ACT} is set), and
        if $dh{VERBOSE} is set, it will also output the command to stdout. You
        should use this function for almost all commands your program performs
        that manipulate files in the package build directories.
-complex_doit()
+complex_doit($command)
        Pass this function a string that is a shell command, it will run it
        similarly to how doit() does. You can pass more complicated commands 
        to this (ie, commands involving piping redirection), however, you 
        have to worry about things like escaping shell metacharacters.
-verbose_print()
+verbose_print($message)
        Pass this command a string, and it will echo it if $dh{VERBOSE} is set.
-error()
+error($errormsg)
        Pass this command a string, it will output it to standard error and
        exit.
-warning()
+warning($message)
        Pass this command a string, and it will output it to standard error
        as a warning message.
-tmpdir()
+tmpdir($dir)
        Pass this command the name of a binary package, it will return the
        name of the tmp directory that will be used as this package's
-       package build directory. Typically, this will be "debian/tmp" or
-       "debian/package".
-compat()
-       Pass this command a number, and if the current compatability level
-       equals that number, it will return true. Looks at DH_COMPAT to get
-       the compatability level.
-pkgfile()
+       package build directory. Typically, this will be "debian/package".
+compat($num)
+       Pass this command a number, and if the current compatibility level
+       is less than or equal to that number, it will return true.
+       Looks at DH_COMPAT to get the compatibility level.
+pkgfile($package, $basename)
        Pass this command the name of a binary package, and the base name of a
        file, and it will return the actual filename to use. This is used
        for allowing debhelper programs to have configuration files in the
@@ -181,17 +191,17 @@ pkgfile()
        package. The convention is that the files are named
        debian/package.filename, and debian/filename is also allowable for
        the $dh{MAINPACKAGE}. If the file does not exist, nothing is returned.
-pkgext()
+pkgext($package)
        Pass this command the name of a binary package, and it will return
        the name to prefix to files in debian/ for this package. For the
        $dh{MAINPACKAGE}, it returns nothing (there is no prefix), for the other
        packages, it returns "package.".
-isnative()
+isnative($package)
        Pass this command the name of a package, it returns 1 if the package
        is a native debian package.
        As a side effect, $dh{VERSION} is set to the version number of the
        package.
-autoscript()
+autoscript($package, $scriptname, $snippetname, $sedcommands)
        Pass parameters:
         - binary package to be affected
         - script to add to
@@ -200,5 +210,29 @@ autoscript()
           (optional)
        This command automatically adds shell script snippets to a debian
        maintainer script (like the postinst or prerm).
+dirname($pathname)
+       Return directory part of pathname.
+basename($pathname)
+       Return base of pathname,
+addsubstvar($package, $substvar, $deppackage, $verinfo, $remove)
+       This function adds a dependency on some package to the specified
+       substvar in a package's substvar's file. It needs all these
+       parameters:
+       - binary package that gets the item
+       - name of the substvar to add the item to
+       - the package that will be depended on
+       - version info for the package (optional) (ie: ">= 1.1")
+       - if this last parameter is passed, the thing that would be added
+         is removed instead. This can be useful to ensure that a debhelper
+         command is idempotent. Note that without this parameter, if you
+         call the function twice with the same values it will only add one
+         item to the substvars file.
+delsubstvar($package, $substvar)
+       This function removes the entire line for the substvar from the
+       package's shlibs file.
+excludefile($filename)
+       This function returns true if -X has been used to ask for the file
+       to be excluded.
+
+-- Joey Hess <joeyh@debian.org>
 
--- Joey Hess <joeyh@master.debian.org>
index ff43553ed3cec0f8ff3abcb1f5b7fdbde2f92db9..cffbea287d884904f266145e15a8cfa6d40ea3d8 100644 (file)
@@ -1,70 +1 @@
-Debhelper is a collection of programs that can be used in debian/rules files
-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, including a list of all the available commands, see the
-debhelper(1) 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/ . 
-These files are also useful as they give one good order you can run the 
-various debhelper scripts in (though other variations are possible).
-
-For a more gentle introduction, the maint-guide debian package contains a
-tutorial about making your first package using Debhelper.
-
-Debhelper v2:
-------------
-
-Debhelper v2 is a major new version of Debhelper, still under development.
-Debhelper will continue to work in v1 compatability mode for now, if you're
-interested in trying the new versiln, read the file named "v2".
-
-
-Starting a new package:
-----------------------
-
-You can just use the example rules files and do the rest of the new package
-set up by hand, or you could try the dh-make package, which contains a
-"dh_make" command that is similar to debmake, and tries to automate the
-process.
-
-Converting from debstd to debhelper:
------------------------------------
-
-See the file "from-debstd" for documentation on how to do this.
-
-Automatic generation of debian install scripts:
-----------------------------------------------
-
-Some debhelper commands will automatically generate parts of debian install
-scripts. If you want these automatically generated things included in your
-debian install scripts, then you need to add "#DEBHELPER#" to your scripts,
-in the place the code should be added. "#DEBHELPER#" will be replaced by any 
-auto-generated code when you run dh_installdeb.
-
-All scripts that automatically generate code in this way let it be disabled
-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 (note that I made sure that $1, $2, etc are set with the set command):
-
-my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
-#DEBHELPER#
-EOF
-system ($temp) / 256 == 0
-       or die "Problem with debhelper scripts: $!\n";
-
-Other notes:
------------
-
-Note that if you are generating a debian package that has arch-indep and
-arch-dependent portions, and you are using dh_movefiles to move the
-arch-indep files out of debian/tmp, you need to make sure that dh_movefiles
-does this even if only the arch-dependent package is being built (for ports
-to other architectures). I handle this in debian/rules.multi by calling
-dh_movefiles in the install target.
-
-Debhelper's home page is at http://kitenet.net/programs/debhelper/
-
--- Joey Hess <joeyh@master.debian.org>
+Please see the debhelper(7) man page for documentation.
index e3b999bc68cbf92b74909fe1e8f91c9351394c2f..7dc57ff5d539e5ba33499b6b9090e6de2c0b0786 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -3,54 +3,50 @@ list grows - I welcome patches to fix items on it!
 
 Wishlist items:
 
-* Make dh_* "use strict".
-* Make dh_movefiles remove emptied directories after it's moved all the
-  files out of them (#17111).
-* 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. (#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.
-* All debhelper programs should be checked that they output files with the
-  correct permissions no matter what the umask is set to. Currently, only
-  those programs that run after dh_fixperms have been so checked. (Checking
-  the rest is low priority, since dh_fixperms fixes any incorrect permissions
-  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.
-* All programs should also make sure the files they install are owned by
-  root.root. Situation is currently the same as with permissions above, plus
-  dh_installchangelogs is fixed.
-* 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 fragments wouldn't go into the postinst. So maybe a
-  new script is called for. But it's probably be best to just have a switch
-  to enable this.
-* Need a way to make dh_strip not strip any static libs. Also, it'd be nice
-  if there were options to dh_strip, dh_compress, etc, to allow inclusion of
-  directories and exclusion of files based on filename globbing. (Request from
-  Matthias Klose <doko@cs.tu-berlin.de>)
-* 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 defined
-  substitutions. OTOH, maybe it's better if people just sed
-  postinst.in before debhelper gets it's hands on it... (#25235)
+* All debhelper programs should only accept the options they are documented
+  to accept (rather than accepting all debhelper options). They should
+  be able to print brief usage summaries.
+
+  I think this calls for a restucturing. Make a Debhelper.pm class. Each
+  program subclasses the class. The class provides command line parsing,
+  useful functions, and so on. Skeleton of a debhelper command would then
+  be:
+
+  use base qw{Debhelper};
+
+  sub startup {
+       # Add initialization stuff here.
+  }
+
+  sub perpackage {
+       my $package=shift;
+
+       # Stuff to do for each package here.
+  }
+
+  sub fini {
+       # And final stuff here, if any.
+  }
+
+  This needs more thought.
+  
+* install-info, as of dpkg 1.10, parses the info file for section if
+  --section is not given. So I should be able to stop parsing it myself for
+  section, after dpkg 1.10 has been around long enough.
 
 Deprecated:
 
-* remove dh_installdebfiles, dh_du. 
-  - need to wait a reasonable length of
-    time. I'm currently planning on doing this after slink is released or
-    one year after they were deprecated, whichever comes first. Be sure to
-    grep whole debian archive for all of them before removing them, though!
+* DH_COMPAT 1. Can be removed once all packages are seen to be using 2 or
+  higher. I won't hold my breath.
+* Also, grep the entire archive for all dh_* command lines (I do this now),
+  and check to see what other switches are not being used, and maybe remove
+  some of them. I'd also like to deprecate/remove debian/compress files, -X is
+  a better idea.
+* dh_suidregister. Once nothing in the archive uses it.
+* dh_installmanpages. Only mildly deprecated right now. Once dh_installman
+  catches on, make it emit a warning, and then wait for it to go away.
+* dh_testversion. Remove as soon as nothing uses it.
+* dh_movefiles. I won't hold my breath.
+* debconf-mergetemplates support and the debian/template.ll files and the
+  debconf-utils dependency.
+* dh_undocumented
diff --git a/doc/from-debstd b/doc/from-debstd
deleted file mode 100644 (file)
index 86f29dc..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-Converting from debstd to debhelper:
------------------------------------
-
-Debhelper is designed to be mostly backwards compatible to debstd. I say
-mostly because I haven't made debhelper handle everything that debstd does
-yet, and in a few cases, debhelper does things differently (and I hope,
-better).
-
-In general, you can switch over to using debhelper as follows. In your
-debian/rules, you currently will have some lines that read something like
-this:
-
-       debstd CHANGES TODO README
-       dpkg-gencontrol
-       dpkg --build debian/tmp ..
-
-Debhelper comes with a command called dh_debstd that mimics the behavior of
-debstd, by calling various debhelper commands. So in the root directory of
-your package you are converting, run:
-
-       dh_debstd CHANGES TODO README --verbose --no-act
-
-Notice the parallel to the debstd command above, I just added
-"--verbose --noact" to the end. This will make dh_debstd output a list of
-commands that it thinks will emulate what debstd would have done, without 
-actually doing anything to your package. The list will look similar to this:
-
-        dh_installdirs
-       dh_installdocs TODO README
-       dh_installexamples
-       dh_installchangelogs CHANGES
-       dh_installmenu
-       dh_installcron
-       dh_installmanpages
-       dh_movefiles
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_suidregister
-       dh_shlibdeps
-       dh_gencontrol
-       dh_makeshlibs
-       dh_installdeb
-       dh_md5sums
-       dh_builddeb
-
-Now copy that output into debian/rules, replacing the debstd command, as
-well as any dpkg-gencontrol and dpkg --build commands.
-
-Finally, debstd automatically modified postinst, postrm, etc scripts. Some
-of the debhelper apps do that too, but they do it differently. Debstd just
-appends its commands to the end of the script. Debhelper requires that you
-insert a tag into your scripts, that will tell debhelper where to insert
-commands. So if you have postinst, postrm, etc scripts, add a line reading
-"#DEBHELPER#" to the end of them.
-
-Once you think it's all set up properly, do a test build of your package. If
-it works ok, I recommend that you compare the new package and the old
-debstd-generated package very closely. Pay special attention to the
-postinst, postrm, etc scripts, and make sure that the new package contains
-all the same files as the old, with the same permissions.
-
--- Joey Hess <joeyh@master.debian.org>
diff --git a/doc/v2 b/doc/v2
deleted file mode 100644 (file)
index b120d03..0000000
--- a/doc/v2
+++ /dev/null
@@ -1,64 +0,0 @@
-Debhelper v2 is a major new revision of debhelper. Currently, v2 is still
-being worked on, and will change in drastic ways without notice. To keep
-this from breaking packages, debhelper will continue to operate in v1
-compatability mode by default.
-
-To enable debhelper v2 features (do this with *caution*), set DH_COMPAT=2 in
-your debian/rules. Also, it is a very good idea to add a call to your
-debian/rules like this:
-       dh_testversion 2
-To ensure that your package won't be built with some old version of
-debhelper that ignores the DH_COMPAT flag.
-
-Here are the changes I'm planning to make to debhelper for v2, based on
-prior discussion on debian-devel.
-
-Items marked with a + are done. All others will happen as soon as I can code
-them.
-
-+ Standardize on the name used for the temporary build directory of a
-  package. Currently it's debian/tmp/ for the first package and 
-  debian/<package>/ for other packages of a multi-binary package. I've
-  decided after much agonizing to to use debian/<package>. The main thing this
-  has going for it is it means lots of multi-binary packages need only small
-  alterations, since they already use debian/<package> for making most of
-  thier .deb's anyway. I eliminated the other ideas for these reasons:
-       - debian/tmp/<package>: debian/tmp already has history behind it,
-                               changing how it's used would be confusing.
-       - debian/build/<package>: confusing (is the code compiled there?)
-       - debian/tmp-<package>, debian/package-<tmp>: too long, little gain
-
-* dh_installmanpages will be made into a non-DWIM program, so you'll have to
-  specify all man pages to install and possibly where to put them. This may
-  look something like:
-       dh_installmanpages -x xterm.1 xfoo.1 xbar.man
-       dh_installmanpages --section=8 su.man
-  Ok, there's a _little_ DWIM left in there, it'll be smart enough to munge
-  the .man filenames properly. It'll probably just assume all man pages have
-  an  extention, and delete that extentation, and add the correct one.
-
-* dh_movefiles will use a name other than debian/<package>.files for the
-  list of what to move, because it can't use debian/files for the first
-  package, since that file is already used elsewhere. It'll use
-  debian/<package>.move
-
-* dh_movefiles should delete empty directories after it's moved all files
-  out of them. (#17111)  
-
-* debian/README will be installed as /usr/doc/<package>/README in native
-  packages, and as README.Debian in non-native packages. This is consistent
-  with the handing of debian/TODO and debian/changelog. (#34628)
-
-* There will be no change to the names of debhelper config files used, I've
-  decided against debian/<package>/* and the like, because although those
-  subdirs do work, they're not allowed by the packaging manual, and they'd
-  make source unpacking by hand a lot harder. I will leave these files
-  completly as they are now. However, I will remove most of the language
-  documenting that debian/<foo> works, and will deprecate that usage.
-  debian/<package>.<foo> will be preferred even in single binary packages.
-
-* Every file in etc/ will be automatically be flagged as a conffile.
-
-* Debhelper config files will support globbing via * and ?, when
-  appropriate. To turn this off and use those changarcters raw, just quote
-  them.
index 78cfed49622bba62e7417b7cd51fdaa462d7508d..f62b8e5eeea213dc4e4f6bc40e05ad0247d3073b 100755 (executable)
@@ -1,12 +1,10 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess. 
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=1
-
 build: build-stamp
 build-stamp:
        dh_testdir
@@ -19,7 +17,7 @@ build-stamp:
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp install-stamp
+       rm -f build-stamp
 
        # Add here commands to clean up after the build process.
        #-$(MAKE) clean
@@ -27,17 +25,14 @@ clean:
 
        dh_clean
 
-install: install-stamp
-install-stamp: build-stamp
+install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
 
-       # Add here commands to install the package into debian/tmp.
-       #$(MAKE) prefix=`pwd`/debian/tmp/usr install
-
-       touch install-stamp
+       # Add here commands to install the package into debian/<packagename>
+       #$(MAKE) prefix=`pwd`/debian/`dh_listpackages`/usr install
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -45,36 +40,36 @@ binary-indep: build install
 
 # Build architecture-dependent files here.
 binary-arch: build install
-#      dh_testversion
        dh_testdir
        dh_testroot
+       dh_installchangelogs
        dh_installdocs
        dh_installexamples
-       dh_installmenu
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
 #      dh_installemacsen
+#      dh_installcatalogs
 #      dh_installpam
+#      dh_installmime
 #      dh_installinit
-       dh_installcron
-       dh_installmanpages
-       dh_installinfo
+#      dh_installcron
+#      dh_installinfo
 #      dh_undocumented
-       dh_installchangelogs
+       dh_installman
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
-       # You may want to make some executables suid here.
-       dh_suidregister
+#      dh_perl
+#      dh_python
 #      dh_makeshlibs
        dh_installdeb
-#      dh_perl
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb
 
-source diff:
-       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install
index e8a2b5d5af25de808ee3bfd84880c774230f3db3..c85242561ffeedc1f3961427d9b7be01070c5fd1 100755 (executable)
@@ -1,13 +1,12 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Sample debian/rules that uses debhelper. 
+# This file is public domain software, originally written by Joey Hess.
+#
 # This version is for packages that are architecture independent.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=1
-
 build: build-stamp
 build-stamp:
        dh_testdir
@@ -20,7 +19,7 @@ build-stamp:
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp install-stamp
+       rm -f build-stamp
 
        # Add here commands to clean up after the build process.
        #-$(MAKE) clean
@@ -28,41 +27,41 @@ clean:
 
        dh_clean
 
-install: install-stamp
-install-stamp: build-stamp
+install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs
 
-       # Add here commands to install the package into debian/tmp.
-       #$(MAKE) prefix=`pwd`/debian/tmp/usr install
-
-       touch install-stamp
+       # Add here commands to install the package into debian/<packagename>.
+       #$(MAKE) prefix=`pwd`/debian/`dh_listpackages`/usr install
 
 # Build architecture-independent files here.
 binary-indep: build install
-#      dh_testversion
        dh_testdir
        dh_testroot
+       dh_installchangelogs
        dh_installdocs
        dh_installexamples
-       dh_installmenu
+#      dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
 #      dh_installemacsen
+#      dh_installcatalogs
 #      dh_installpam
+#      dh_installmime
 #      dh_installinit
-       dh_installcron
-#      dh_installmanpages
-       dh_installinfo
+#      dh_installcron
+#      dh_installman
+#      dh_installinfo
 #      dh_undocumented
-       dh_installchangelogs
+       dh_installman
        dh_link
        dh_compress
        dh_fixperms
-       # You may want to make some executables suid here.
-       dh_suidregister
-       dh_installdeb
 #      dh_perl
+#      dh_python
+       dh_installdeb
        dh_gencontrol
        dh_md5sums
        dh_builddeb
@@ -71,8 +70,5 @@ binary-indep: build install
 binary-arch: build install
 # We have nothing to do by default.
 
-source diff:
-       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install
index 7329437a8814a499ce3bbea9d76313193e5d3348..fe7c20a7e4dbb536ee7081d21793d65475d564d0 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Sample debian/rules that uses debhelper. 
+# This file is public domain software, originally written by Joey Hess.
+#
 # This version is for a hypothetical package that builds an
 # architecture-dependant package, as well as an architecture-independent
 # package.
@@ -7,9 +9,6 @@
 # Uncomment this to turn on verbose mode. 
 #export DH_VERBOSE=1
 
-# This is the debhelper compatability version to use.
-export DH_COMPAT=1
-
 build: build-stamp
 build-stamp:
        dh_testdir
@@ -22,7 +21,7 @@ build-stamp:
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-stamp install-stamp
+       rm -f build-stamp 
 
        # Add here commands to clean up after the build process.
        #-$(MAKE) clean
@@ -30,8 +29,8 @@ clean:
 
        dh_clean
 
-install: install-stamp
-install-stamp: build-stamp
+install:
+install: build
        dh_testdir
        dh_testroot
        dh_clean -k
@@ -40,68 +39,68 @@ install-stamp: build-stamp
        # Add here commands to install the package into debian/tmp.
        #$(MAKE) prefix=`pwd`/debian/tmp/usr install
 
-       dh_movefiles
-       touch install-stamp
+       dh_install
 
 # Build architecture-independent files here.
 binary-indep: build install
-#      dh_testversion
        dh_testdir -i
        dh_testroot -i
+       dh_installchangelogs -i
        dh_installdocs -i
        dh_installexamples -i
-       dh_installmenu -i
+#      dh_installmenu -i
+#      dh_installdebconf -i
+#      dh_installlogrotate -i
 #      dh_installemacsen -i
+#      dh_installcatalogs -i
 #      dh_installpam -i
+#      dh_installmime -i
 #      dh_installinit -i
-       dh_installcron -i
-#      dh_installmanpages -i
-       dh_installinfo -i
-#      dh_undocumented
-       dh_installchangelogs -i
+#      dh_installcron -i
+#      dh_installinfo -i
+#      dh_undocumented -i
+       dh_installman -i
        dh_link -i
        dh_compress -i
        dh_fixperms -i
-       # You may want to make some executables suid here.
-       dh_suidregister -i
-       dh_installdeb -i
 #      dh_perl -i
+#      dh_python -i
+       dh_installdeb -i
        dh_gencontrol -i
        dh_md5sums -i
        dh_builddeb -i
 
 # Build architecture-dependent files here.
 binary-arch: build install
-#      dh_testversion
        dh_testdir -a
        dh_testroot -a
+       dh_installchangelogs -a
        dh_installdocs -a
        dh_installexamples -a
        dh_installmenu -a
+#      dh_installdebconf -a
+#      dh_installlogrotate -a
 #      dh_installemacsen -a
+#      dh_installcatalogs -a
 #      dh_installpam -a
+#      dh_installmime -a
 #      dh_installinit -a
-       dh_installcron -a
-       dh_installmanpages -a
-       dh_installinfo -a
-#      dh_undocumented
-       dh_installchangelogs -a
+#      dh_installcron -a
+#      dh_installinfo -a
+#      dh_undocumented -a
+       dh_installman -a
        dh_strip -a
        dh_link -a
        dh_compress -a
        dh_fixperms -a
-       # You may want to make some executables suid here.
-       dh_suidregister -a
-       dh_installdeb -a
-#      dh_makeshlibs -a
 #      dh_perl -a
+#      dh_python -a
+#      dh_makeshlibs -a
+       dh_installdeb -a
        dh_shlibdeps -a
        dh_gencontrol -a
        dh_md5sums -a
        dh_builddeb -a
 
-source diff:
-       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install
diff --git a/examples/rules.multi2 b/examples/rules.multi2
new file mode 100755 (executable)
index 0000000..12b2d9c
--- /dev/null
@@ -0,0 +1,95 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+#
+# This version is for a multibinary package. It also allows you to build any
+# of the binary packages independantly, via binary-<package> targets.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+
+       # Add here commands to compile the package.
+       #$(MAKE)
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+
+       # Add here commands to clean up after the build process.
+       #-$(MAKE) clean
+       #-$(MAKE) distclean
+
+       dh_clean
+
+install: DH_OPTIONS=
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # Add here commands to install the package into debian/tmp.
+       #$(MAKE) prefix=`pwd`/debian/tmp/usr install
+
+       dh_install
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs
+       dh_installdocs
+       dh_installexamples
+       dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installcatalogs
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+#      dh_installman
+#      dh_installcron
+#      dh_installinfo
+#      dh_undocumented
+       dh_strip
+       dh_link
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_python
+#      dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+#       $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+       $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+       make -f debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary-common binary install
diff --git a/foo b/foo
deleted file mode 100644 (file)
index ad9712d..0000000
--- a/foo
+++ /dev/null
@@ -1,2 +0,0 @@
-x="debian|autoscripts"
-find |grep -F "`echo "$x" | tr "|" "\n"`"
\ No newline at end of file
diff --git a/from-debstd b/from-debstd
deleted file mode 100644 (file)
index 31fd0cd..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-Converting from debstd to debhelper:
------------------------------------
-
-Debhelper is designed to be mostly backwards compatible to debstd. I say
-mostly because I haven't made debhelper handle everything that debstd does
-yet, and in a few cases, debhelper does things differently (and I hope,
-better).
-
-In general, you can switch over to using debhelper as follows. In your
-debian/rules, you currently will have some lines that read something like
-this:
-
-       debstd CHANGES TODO README
-       dpkg-gencontrol
-       dpkg --build debian/tmp ..
-
-Debhelper comes with a command called dh_debstd that mimics the behavior of
-debstd, by calling various debhelper commands. So in the root directory of
-your package you are converting, run:
-
-       dh_debstd CHANGES TODO README --verbose --no-act
-
-Notice the parallel to the debstd command above, I just added "--verbose --act"
-to the end. This will make dh_debstd output a list of commands that it thinks
-will emulate what debstd would have done, without actually doing anything to
-your package. The list will look similar to this:
-
-        dh_installdirs
-       dh_installdocs TODO README
-       dh_installexamples
-       dh_installchangelogs CHANGES
-       dh_installmenu
-       dh_installcron
-       dh_installmanpages
-       dh_movefiles
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_suidregister
-       dh_shlibdeps
-       dh_gencontrol
-       dh_makeshlibs
-       dh_installdeb
-       dh_md5sums
-       dh_builddeb
-
-Now copy that output into debian/rules, replacing the debstd command, as
-well as any dpkg-gencontol and dpkg --build commands.
-
-Finally, debstd automatically modified postinst, postrm, etc scripts. Some
-of the debhelper apps do that too, but they do it differently. Debstd just
-appends its commands to the end of the script. Debhelper requires that you
-insert a tag into your scripts, that will tell debhelper where to insert
-commands. So if you have postinst, postrm, etc scripts, add a line reading
-"#DEBHELPER#" to the end of them.
-
-Once you think it's all set up properly, do a test build of your package. If
-it works ok, I recommend that you compare the new package and the old
-debstd-generated package very closely. Pay special attention to the
-postinst, postrm, etc scripts, and make sure that the new package contains
-all the same files as the old, with the same permissions.
-
--- Joey Hess <joeyh@master.debian.org>
diff --git a/me b/me
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/me.info b/me.info
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/pgptemp.$00 b/pgptemp.$00
deleted file mode 100644 (file)
index e69de29..0000000