summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <unknown>2003-07-28 18:43:53 +0000
committerunknown <unknown>2003-07-28 18:43:53 +0000
commit4410586cb048520abb3f02dc17acc4b2a2d5e342 (patch)
tree59c43122f7752cef7df0dcaad35b924bc259f135
parent63e45075003b1d9fcff097b5644a81131c346653 (diff)
downloaddebhelper-4410586cb048520abb3f02dc17acc4b2a2d5e342.tar.gz
r688: This commit was manufactured by cvs2svn to create tagversion_1.1.0
'upstream_version_1_1_0'.
-rw-r--r--.foo0
-rw-r--r--BUGS0
-rw-r--r--Dh_Getopt.pm173
-rw-r--r--Dh_Lib.pm371
-rw-r--r--PROGRAMMING187
-rw-r--r--README100
-rwxr-xr-xdh_installemacsen52
-rw-r--r--dh_installemacsen.151
-rwxr-xr-xdh_testversion24
-rw-r--r--foo2
-rw-r--r--from-debstd63
11 files changed, 0 insertions, 1023 deletions
diff --git a/.foo b/.foo
deleted file mode 100644
index e69de29b..00000000
--- a/.foo
+++ /dev/null
diff --git a/BUGS b/BUGS
deleted file mode 100644
index e69de29b..00000000
--- a/BUGS
+++ /dev/null
diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm
deleted file mode 100644
index 0c28500d..00000000
--- a/Dh_Getopt.pm
+++ /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
index e74e8ccb..00000000
--- 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/PROGRAMMING b/PROGRAMMING
deleted file mode 100644
index 7dc0c638..00000000
--- a/PROGRAMMING
+++ /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
index 986eb02c..00000000
--- 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/dh_installemacsen b/dh_installemacsen
deleted file mode 100755
index 3fbaf8ba..00000000
--- a/dh_installemacsen
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Registration with emacsen-common.
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
-init();
-
-if (! defined $dh{number}) {
- $dh{number}=50;
-}
-if (! defined $dh{flavor}) {
- $dh{flavor}='emacs';
-}
-
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
- $TMP=tmpdir($PACKAGE);
-
- $emacsen_install=pkgfile($PACKAGE,"emacsen-install");
- $emacsen_remove=pkgfile($PACKAGE,"emacsen-remove");
- $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");
- }
- 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");
- }
- 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/");
- }
- doit("install","-m0644",$emacsen_startup,"$TMP/etc/$dh{flavor}/site-start.d/$dh{number}$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/");
- }
- }
-}
diff --git a/dh_installemacsen.1 b/dh_installemacsen.1
deleted file mode 100644
index df1512f5..00000000
--- a/dh_installemacsen.1
+++ /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>
diff --git a/dh_testversion b/dh_testversion
deleted file mode 100755
index 096aa9e1..00000000
--- a/dh_testversion
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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.
-init();
-
-my($compare, $ver);
-
-if ($#ARGV > 0) {
- $compare=shift;
- $ver=shift;
-}
-elsif ($#ARGV eq 0) {
- $compare=">=";
- $ver=shift;
-}
-
-if (defined $compare and defined $ver) {
- system('dpkg','--compare-versions',$Dh_Version::version,$compare,$ver) == 0 ||
- error("debhelper version $Dh_Version::version is installed, but a version $compare $ver is needed to build this package.");
-}
diff --git a/foo b/foo
deleted file mode 100644
index ad9712d8..00000000
--- 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
index 31fd0cdd..00000000
--- a/from-debstd
+++ /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>