-if [ -x /usr/sbin/register-window-manager ] ; then
- register-window-manager --add #WM#
-fi
+update-alternatives --install /usr/bin/x-window-manager \
+ x-window-manager #WM# #PRIORITY#
-if [ "$1" == "purge" -a -x /usr/sbin/register-window-manager ] ; then
- register-window-manager --remove #WM#
-fi
+update-alternatives --remove x-window-manager #WM#
+
+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.
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@debian.org> Mon, 9 Nov 1998 13:04:16 -0800
#!/bin/sh -e
# Clean up after cvs's dreadful symlink handling, by making all the symlinks
# this package needs.
-ln -sf ../Dh_Lib.pm debian/Dh_Lib.pm
-ln -sf ../Dh_Getopt.pm debian/Dh_Getopt.pm
ln -sf postinst-menu autoscripts/postrm-menu
ln -sf postinst-modules autoscripts/postrm-modules
ln -sf postinst-mime autoscripts/postrm-mime
#!/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, but I didn't need
-# to tell you that; just see the 25 lines of inlined perl below.. See
-# examples/ for some good examples.
+# to tell you that; just see the 25 lines of inlined perl below..
+# See examples/ for some good examples.
# If any automatic script generation is done in building this package,
# be sure to use the new templates from this package.
./dh_testdir
./dh_testroot
./dh_clean -k
- ./dh_installdirs usr/bin usr/share/debhelper
+ ./dh_installdirs usr/bin usr/share/debhelper \
+ usr/lib/perl5/Debian/Debhelper
- echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > debian/debhelper/usr/share/debhelper/Dh_Version.pm
+ echo -e "package Dh_Version;\n\$$version='$(VERSION)';" > \
+ debian/debhelper/usr/lib/perl5/Debian/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 Debian/Debhelper/*.pm \
+ debian/debhelper/usr/lib/perl5/Debian/Debhelper/
cp -a autoscripts debian/debhelper/usr/share/debhelper
rm -rf debian/debhelper/usr/share/debhelper/autoscripts/CVS
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary dist
+
#
# Build the .deb package, assuming all the files are set up.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
# Set the default destination directory.
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
-# Clean up debian/tmp and other teporary files generated by the
+# Clean up $TMP and other tepmorary files generated by the
# build process.
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-doit "rm -rf debian/tmp"
-doit "rm -f debian/substvars debian/*.substvars debian/files*"
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $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","-rf",$TMP);
+}
+
+if (! $dh{D_FLAG}) {
+ if (@ARGV) {
+ doit("rm","-f","--",@ARGV);
+ }
+
+ if (! $dh{K_FLAG}) {
+ doit("rm","-f","debian/files");
+ }
+
+ # Remove other temp files.
+ # (The \s+ is important, \s won't work because find would get null
+ # 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
+ -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 {} ;"));
+}
+
+doit('rm', '-rf', 'debian/tmp')
+ if -x 'debian/tmp' && ! Debian::Debhelper::Dh_Lib::compat(1);
-# Remove other temp files. I don't run this through doit becuase
-# I haven't figured out what I have to esacape to put it in quotes.
-# However, it doesn't modify debian/tmp, so I guess it's ok to not run it
-# through doit.
-find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;
# compressed files get fixed.
use Cwd;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# This has been gutted and extensively rewritten to function as a debhelper
# command by Joey Hess. And then completly rewritten in perl.
+use Debian::Debhelper::Dh_Lib;
+
# 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
+# Pre-parse command line before we parse the command line, becuase we use a
# different style of arguments.
@argv=();
foreach (@ARGV) {
}
}
@ARGV=@argv;
-
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
init();
# Tolerate old style debstd invocations
-#!/bin/sh -e
+#!/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.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
-
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
-
- if [ ! -d "debian/$TMP/DEBIAN" ]; then
- doit "install -d debian/$TMP/DEBIAN"
- fi
+use Debian::Debhelper::Dh_Lib;
- verbose_echo "du -k debian/$TMP | sed \"s: debian/$TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" debian/$TMP$\" > debian/$TMP/DEBIAN/du"
- du -k debian/$TMP | sed "s: debian/$TMP/: :" | grep -v " DEBIAN$" | grep -v " debian/$TMP$" >debian/$TMP/DEBIAN/du
- doit "chown root.root debian/tmp/DEBIAN/du"
-done
+warning("this program does nothing and is deprecated. Remove it from debian/rules.");
#
# Do some general file permission fixups.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Generate and install the control file. Simple dpkg-gencontrol wrapper.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
- EXT=`pkgext $PACKAGE`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $EXT=pkgext($PACKAGE);
+
+ $changelog=pkgfile($PACKAGE,'changelog');
+ if (! $changelog) {
+ $changelog='debian/changelog';
+ }
- if [ ! -d $TMP/DEBIAN ]; then
- doit "install -o root -g root -d $TMP/DEBIAN"
- fi
+ if ( ! -d '$TMP/DEBIAN' ) {
+ doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+ }
# Generate and install control file.
- doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS"
- doit "chown root.root $TMP/DEBIAN/control"
-done
+ doit("dpkg-gencontrol","-l$changelog","-isp","-p$PACKAGE",
+ "-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");
+
+ doit("chown","root.root","$TMP/DEBIAN/control");
+}
+
# 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;
+use Debian::Debhelper::Dh_Lib;
init();
$upstream=shift;
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",$link_to,"$TMP/usr/share/doc/$PACKAGE/".Dh_Lib::basename($upstream));
+ doit("ln","-sf",$link_to,"$TMP/usr/share/doc/$PACKAGE/".Debian::Debhelper::Dh_Lib::basename($upstream));
}
}
}
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Install cron scripts into the appropriate places.
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
- EXT=`pkgext $PACKAGE`
-
- for type in daily weekly monthly; do
- if [ -e debian/${EXT}cron.$type ]; then
- if [ ! -d debian/$TMP/etc/cron.$type ]; then
- doit "install -o root -g root -d debian/$TMP/etc/cron.$type"
- fi
- doit "install debian/${EXT}cron.$type debian/$TMP/etc/cron.$type/$PACKAGE"
- fi
- done
-done
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ foreach $type (qw{daily weekly monthly}) {
+ $cron=pkgfile($PACKAGE,"cron.$type");
+ if ($cron) {
+ if (! -d "$TMP/etc/cron.$type") {
+ doit("install","-o","root","-g","root","-d","$TMP/etc/cron.$type");
+ }
+ doit("install",$cron,"$TMP/etc/cron.$type/$PACKAGE");
+ }
+ }
+ # Seperate because this needs to be mode 644.
+ $cron=pkgfile($PACKAGE,"cron.d");
+ if ($cron) {
+ if (! -d "$TMP/etc/cron.d") {
+ doit("install","-o","root","-g","root","-d","$TMP/etc/cron.d");
+ }
+ doit("install","-m",644,$cron,"$TMP/etc/cron.d/$PACKAGE");
+ }
+}
#
# Install files from debian/ into the package's DEBIAN directory.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
#
# Integration with debconf.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
-# Reads debian/dirs, creates the directories listed there there
+# Reads debian/dirs, creates the directories listed there
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
- EXT=`pkgext $PACKAGE`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $file=pkgfile($PACKAGE,"dirs");
- if [ ! -d $TMP/usr/doc/$PACKAGE ]; then
- doit "install -d $TMP/usr/doc/$PACKAGE"
- fi
+ if (! -e $TMP) {
+ doit("install","-d",$TMP);
+ }
- dirs=""
+ undef @dirs;
- if [ -e debian/${EXT}dirs ]; then
- dirs=`tr "\n" " " < debian/${EXT}dirs`
- fi
+ if ($file) {
+ @dirs=filearray($file)
+ }
- if [ "$PACKAGE" = "$MAINPACKAGE" -a "$*" ]; then
- dirs="$* $dirs"
- fi
+ if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+ push @dirs, @ARGV;
+ }
+
+ if (@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/$_";
+ tr:/:/:s; # just beautification.
+ $_
+ } @dirs;
- if [ "$dirs" ]; then
- # Check to see if any of the dirs are absolute.
- for dir in "$dirs" ; do
- if expr "$dir" : "/" >/dev/null ; then
- error "Absolute directory name \"$dir\" specified."
- fi
- done
# Create dirs.
- verbose_echo "cd $TMP && install -d $dirs && cd ../.."
- cd $TMP
- install -d $dirs
- cd ../..
- fi
-done
+ doit("install","-d",@dirs);
+ }
+}
# 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;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Registration with emacsen-common.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
+if (! defined $dh{PRIORITY}) {
+ $dh{PRIORITY}=50;
+}
+if (! defined $dh{FLAVOR}) {
+ $dh{FLAVOR}='emacs';
+}
- emacsen_install=`pkgfile $PACKAGE emacsen-install`
- emacsen_remove=`pkgfile $PACKAGE emacsen-remove`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
- if [ "$emacsen_install" ]; then
- if [ ! -d "$TMP/usr/lib/emacsen-common/packages/install" ]; then
- doit "install -d $TMP/usr/lib/emacsen-common/packages/install"
- fi
- doit "install $emacsen_install $TMP/usr/lib/emacsen-common/packages/install/$PACKAGE"
- fi
+ $emacsen_install=pkgfile($PACKAGE,"emacsen-install");
+ $emacsen_remove=pkgfile($PACKAGE,"emacsen-remove");
+ $emacsen_startup=pkgfile($PACKAGE,"emacsen-startup");
- if [ "$emacsen_remove" ]; then
- if [ ! -d "$TMP/usr/lib/emacsen-common/packages/remove" ]; then
- doit "install -d $TMP/usr/lib/emacsen-common/packages/remove"
- fi
- doit "install $emacsen_remove $TMP/usr/lib/emacsen-common/packages/remove/$PACKAGE"
- fi
+ if ($emacsen_install 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_install" -o "$emacsen_remove" ]; then
- if [ ! "$DH_NOSCRIPTS" ]; then
- autoscript "postinst" "postinst-emacsen"
- autoscript "prerm" "prerm-emacsen"
- fi
- fi
-done
+ 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{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/");
+ }
+ }
+}
dh_installemacsen \- register an emacs add on package
.SH SYNOPSIS
.B dh_installemacsen
-.I "[debhelper options] [-n] [--number=n] [--flavor=foo]"
+.I "[debhelper options] [-n] [--priority=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.
.B \-n, \--noscripts
Do not modify postinst/prerm scripts.
.TP
-.B \--number=n
+.B \--priority=n
Sets the priority number of a site-start.d file. Default is 50.
.TP
.B \--flavor=foo
# Reads debian/examples, installs all files listed there into
# /usr/share/doc/$PACKAGE/examples
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# Reads debian/info, installs all files listed there into /usr/share/info
# and puts appropriate commands into the postinst.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
close IN;
- my $fn="/usr/share/info/".Dh_Lib::basename($file);
+ my $fn="/usr/share/info/".Debian::Debhelper::Dh_Lib::basename($file);
if ($section ne '') {
$section=~s:/:\\/:g; # allow / in section.
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Install debian/init[.d], and set up the postinst and postrm for init
# scripts.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
-
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
- EXT=`pkgext $PACKAGE`
-
- if [ -e debian/${EXT}init ]; then
- if [ ! -d $TMP/etc/init.d ]; then
- doit "install -d $TMP/etc/init.d"
- fi
-
- # Figure out what filename to install it as.
- if [ "$DH_D_FLAG" ]; then
- # -d on the command line sets DH_D_FLAG. We will
- # remove a trailing 'd' from the package name and
- # use that as the name.
- script=`expr $PACKAGE : '\(.*\)d$'` || true
- if [ ! "$script" ]; then
- echo `basename $0`" warning: \"$PACKAGE\" has no final -d, but -d was specified."
- script=$PACKAGE
- fi
- else
- script=$PACKAGE
- fi
- doit "install -p -m755 debian/${EXT}init $TMP/etc/init.d/$script"
+use Debian::Debhelper::Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+
+ # Figure out what filename to install it as.
+ my $script;
+ if ($dh{D_FLAG}) {
+ # -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;
+ if ($script=~m/(.*)d$/) {
+ $script=$1;
+ }
+ else {
+ warning("\"$PACKAGE\" has no final d' in its name, but -d was specified.");
+ }
+ }
+ elsif ($dh{INIT_SCRIPT}) {
+ $script=$dh{INIT_SCRIPT};
+ }
+ else {
+ $script=$PACKAGE;
+ }
+
+ $init=pkgfile($PACKAGE,$script) || pkgfile($PACKAGE,"init") ||
+ pkgfile($PACKAGE,"init.d");
+
+ if ($init ne '') {
+ if (! -d "$TMP/etc/init.d") {
+ doit("install","-d","$TMP/etc/init.d");
+ }
+
+ 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,
+ # the parameters to pass to update-rc.d. If not set,
# we have to say "defaults".
- if [ "$DH_U_PARAMS" = "" ]; then
- DH_U_PARAMS="defaults"
- fi
-
- # -r on the command line sets DH_R_FLAG. If it's set, there
- # is no restart on upgrade.
- if [ ! "$DH_NOSCRIPTS" ]; then
- if [ "$DH_R_FLAG" ]; then
- autoscript "postinst" "postinst-init-norestart" \
- "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/"
- autoscript "postrm" "postrm-init" \
- "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/"
- else
- autoscript "postinst" "postinst-init" \
- "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/"
- autoscript "postrm" "postrm-init" \
- "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/"
- autoscript "prerm" "prerm-init" \
- "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/"
- fi
- fi
- fi
-done
+ my $params='';
+ if (defined($dh{U_PARAMS})) {
+ $params=join(' ',@{$dh{U_PARAMS}});
+ }
+ if ($params eq '') {
+ $params="defaults";
+ }
+
+ 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",
+ "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",
+ "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/");
+ }
+ }
+ }
+}
# This is a little bit (hah!) DWIMish, but still very handy.
use File::Find;
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
# Check if a file is a man page, for use by File::Find.
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 (Debian::Debhelper::Dh_Lib::basename($File::Find::dir) eq Debian::Devhelper::Dh_Lib::dirname($solink)) {
+ $solink=Debian::Debhelper::Dh_Lib::basename($solink);
}
else {
$solink="../$solink";
foreach $page (@manpages) {
$page=~s:^\./::; # just for looks
- $basename=Dh_Lib::basename($page);
+ $basename=Debian::Debhelper::Dh_Lib::basename($page);
# Skip all files listed on command line.
my $install=1;
foreach $skip (@ARGV) {
# Look at basename of what's on connect line
# for backwards compatability.
- if ($basename eq Dh_Lib::basename($skip)) {
+ if ($basename eq Debian::Debhelper::Dh_Lib::basename($skip)) {
$install=undef;
last;
}
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Integration with debian menu system:
#
-# If debian/menu file exists, save it to debian/tmp/usr/lib/menu/$PACKAGE
+# If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE
# If debian/menu-method file exists, save it to
-# debian/tmp/etc/menu-methods/$PACKAGE
+# $TMP/etc/menu-methods/$PACKAGE
+#
+# Also, add to postinst and postrm.
+
+use Debian::Debhelper::Dh_Lib;
+init();
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $menu=pkgfile($PACKAGE,"menu");
+ $menu_method=pkgfile($PACKAGE,"menu-method");
+
+ if ($menu ne '') {
+ if (! -d "$TMP/usr/lib/menu") {
+ doit("install","-d","$TMP/usr/lib/menu");
+ }
+ 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")
+ }
+ }
-if [ -e debian/menu ]; then
- if [ ! -d debian/tmp/usr/lib/menu ]; then
- doit "install -d debian/tmp/usr/lib/menu"
- fi
- doit "install -p -m644 debian/menu debian/tmp/usr/lib/menu/$PACKAGE"
-fi
+ if ($menu_method ne '') {
+ if (!-d "$TMP/etc/menu-methods") {
+ doit("install","-d","$TMP/etc/menu-methods");
+ }
+ doit("install","-p",$menu_method,"$TMP/etc/menu-methods/$PACKAGE");
-if [ -e debian/menu-method ]; then
- if [ ! -d debian/tmp/etc/menu-methods ]; then
- doit "install -d debian/tmp/etc/menu-methods"
- fi
- doit "install -p debian/menu-method debian/tmp/etc/menu-methods/$PACKAGE"
-fi
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-menu-method","s/#PACKAGE#/$PACKAGE/");
+ autoscript($PACKAGE,"postrm","postrm-menu-method","s/#PACKAGE#/$PACKAGE/");
+ }
+ }
+}
#!/usr/bin/perl -w
+#
+# Mime support.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
#
# Register modules with modutils.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
if ($file) {
if (! -e "$TMP/etc/modutils") {
doit("install","-d","$TMP/etc/modutils");
- doit("cp","-m0644",$file,"$TMP/etc/modutils/$PACKAGE");
+ doit("install","-m","0644",$file,"$TMP/etc/modutils/$PACKAGE");
}
if (! $dh{NOSCRIPTS}) {
#
# If debian/pam file exists, save it to $TMP/etc/pam.d/$PACKAGE
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
#
# Add to postinst and postrm to register a window manager.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
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 comatability. If the filename doesn't
+ # include a path, assume it's in /usr/X11R6/bin.
+ if ($ARGV[0] !~ m:/:) {
+ $ARGV[0]="/usr/X11R6/$ARGV[0]";
+ }
}
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# $TMP=tmpdir($PACKAGE);
+ $file=pkgfile($PACKAGE,"wm");
+
+ if ($file) {
+ @wm=filearray($file);
+ }
- if (! $dh{NOSCRIPTS}) {
- autoscript($PACKAGE,"postinst","postinst-wm","s:#WM#:$wm:");
- autoscript($PACKAGE,"postrm","postrm-wm","s:#WM#:$wm:");
+ if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
+ push @wm, @ARGV;
+ }
+
+ if (@wm && ! $dh{NOSCRIPTS}) {
+ foreach (@wm) {
+ autoscript($PACKAGE,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
+ autoscript($PACKAGE,"postrm","postrm-wm","s:#WM#:$_:");
+ }
}
}
+
dh_installwm \- register a window manager
.SH SYNOPSIS
.B dh_installwm
-.I "[debhelper options] [-n] wmfilename"
+.I "[debhelper options] [-n] [--priority=n] [wm ...]"
.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.
+generating the postinst and postrm commands that register a window manager
+with
+.BR update-alternatives (8)
+.P
+Any windowmanager filenames specified as parameters will be registered in
+the first package dh_installwm is told to ast 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.wm (debian/wm may be used for the
+first binary package in debian/control) can list other window manager to
+register.
.SH OPTIONS
.TP
.B debhelper options
.BR debhelper (1)
for a list of options common to all debhelper commands.
.TP
+.B \--priority=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.
+.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.
+The filename of the window manager you wish to register.
.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,
.TP
.BR debhelper (1)
.TP
-.BR register-window-manager (8)
+.BR update-alternatives (8)
.SH AUTHOR
Joey Hess <joeyh@debian.org>
#
# Also, add calls to postinst and postrm.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
#
# Integration with the Debian X11 font policy.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# Generate symlinks in debian packages, reading debian/links. The
# file contains pairs of files and symlinks.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
error("parameters list a link without a destination.");
}
- # Now I'd prefer to work with a hash.
- %links=@links;
+ while (@links) {
+ $dest=pop @links;
+ $src=pop @links;
+
+ # Relivatize src and dest.
+ $src=~s:^/::;
+ $dest=~s:^/::;
- foreach $src (keys %links) {
- $dest=$links{$src};
-
# Make sure the directory the link will be in exists.
- $basedir=Dh_Lib::dirname("$TMP/$dest");
+ $basedir=Debian::Debhelper::Dh_Lib::dirname("$TMP/$dest");
if (! -e $basedir) {
doit("install","-d",$basedir);
}
# Figure out how much of a path $src and $dest
# share in common.
for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {}
-
# Build up the new src.
$src="";
for (1..$#dest_dirs - $x) {
$src.="../";
}
- # The + 1 is here to include the actual filename.
- for (1..$#src_dirs - $x + 1) {
+ for ($x .. $#src_dirs) {
$src.=$src_dirs[$_]."/";
}
$src=~s:/$::;
- }
+ }
+ else {
+ # Make sure it's properly absolute.
+ $src="/$src";
+ }
doit("ln","-sf",$src,"$TMP/$dest");
}
#
# Output a list of all packages debhelper will act on.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
print join("\n",@{$dh{DOPACKAGES}})."\n";
+
#
# Automatically generate shlibs files.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
-# Generate a DEBIAN/md5sums file, that lists the md5sums of all
-# non-conffiles in the package
+# Generate a DEBIAN/md5sums file, that lists the md5sums of all files in the
+# package.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+use Cwd;
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
- if [ ! -d "debian/$TMP/DEBIAN" ]; then
- doit "install -d debian/$TMP/DEBIAN"
- fi
+ if (! -d "$TMP/DEBIAN") {
+ doit("install","-d","$TMP/DEBIAN");
+ }
- doit "pushd debian/$TMP" >/dev/null
- # Doit isn't smart enough to hande this next command so echo by hand. (sigh)
- verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums </dev/null'
- md5sum `find * -type f ! -regex "^DEBIAN/.*"` >DEBIAN/md5sums </dev/null
- doit "chown root.root DEBIAN/md5sums"
- doit "popd 2>/dev/null" >/dev/null
-done
+ # Check if we should exclude conffiles.
+ my $exclude="";
+ if (! $dh{INCLUDE} && -r "$TMP/DEBIAN/conffiles") {
+ # Generate exclude regexp.
+ open (CONFF,"$TMP/DEBIAN/conffiles");
+ while (<CONFF>) {
+ chomp;
+ s/^\///;
+ $exclude.="! -path \"$_\" ";
+ }
+ close CONFF;
+ }
+
+ # See if we should exclude other files.
+ if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
+ $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");
+ # If the file's empty, no reason to waste inodes on it.
+ 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");
+ }
+}
#
# Move files out of debian/tmp, into subpackages.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
$ret=0;
# Find dependencies on perl stuff
# Remove .packlist files
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
-my $perl = $ENV{'PERL'} || '/usr/bin/perl';
-$version=sprintf("%.3f", $]);
+my $ext = '';
+my $lib_dir = 'usr/lib/perl5';
+
+# 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", \$]'`;
+}
+
+# Cleaning the paths given on the command line
+foreach (@ARGV) {
+ s#/$##;
+ 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'});
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
my $dep = '';
my $found = 0;
+ # 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)) . ')';
+
# Look for perl modules and check where they are installed
- if (-d "$TMP/usr/lib/perl5") {
- foreach $file (split(/\n/,`find $TMP/usr/lib/perl5 -type f -name "*.pm"`)) {
+ if ($dirs) {
+ foreach $file (split(/\n/,`find $dirs -type f \\( -name "*.pm" -or -name "*.so" \\)`)) {
$found++;
- if ($file =~ m<^$TMP/usr/lib/perl5/(\d\.\d{3})/([^/]+)/>) {
+ if ($file =~ m<^$TMP/$re/(\d\.\d{3})/([^/]+)/>) {
$v = $1;
$arch = $2;
check_module_version ($v, $version);
- $v .= '-thread' if ($arch =~ /-thread/);
+ $v .= '-thread' if ($arch =~ /-thread/);
$dep_arch = add_deps ($dep_arch, "perl-$v");
- } elsif ($file =~ m<^$TMP/usr/lib/perl5/(\d.\d{3})/>) {
+ } elsif ($file =~ m<^$TMP/$re/(\d.\d{3})/>) {
$v = $1;
check_module_version ($v, $version);
$dep_arch = add_deps ($dep_arch, "perl-$v");
}
if ($found and not $dep_arch) {
- $dep = "perl5";
+ $dep = "perl5$ext";
} elsif ($dep_arch) {
$dep = $dep_arch;
}
next unless $dep;
- if (-e "debian/$EXT\subtsvars") {
- open (IN, "<debian/$EXT\subtsvars");
+ if (-e "debian/$EXT\substvars") {
+ open (IN, "<debian/$EXT\substvars");
my @lines=grep { ! /^perl:Depends=/ } <IN>;
close IN;
- open (OUT, ">debian/$EXT\subtsvars");
+ open (OUT, ">debian/$EXT\substvars");
print OUT @lines;
} else {
- open (OUT, ">debian/$EXT\subtsvars");
+ open (OUT, ">debian/$EXT\substvars");
}
print OUT "perl:Depends=$dep\n";
close OUT;
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") {
#
# Find dependancies. Simple dpkg-shlibdeps wrapper.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Strip files.
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
+# 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:
+my (@shared_libs, @executables, @static_libs);
+sub testfile {
+ return if -l $_ or -d $_; # Skip directories and symlinks always.
+
+ # 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}}) {
+ return if ($fn=~m/\Q$f\E/);
+ }
+
+ # Does its filename look like a shared library?
+ if (m/.*\.so.*?/) {
+ # Ok, do the expensive test.
+ my $type=`file $_`;
+ if ($type=~m/.*ELF.*shared.*/) {
+ push @shared_libs, $fn;
+ return;
+ }
+ }
+
+ # Is it executable? -x isn't good enough, so we need to use stat.
+ (undef,undef,$mode,undef)=stat(_);
+ if ($mode & 0111) {
+ # Ok, expensive test.
+ my $type=`file $_`;
+ if ($type=~m/.*ELF.*executable.*/) {
+ push @executables, $fn;
+ return;
+ }
+ }
+
+ # Is it a static library, and not a debug library?
+ if (m/lib.*\.a/ && ! m/.*_g\.a/) {
+ push @static_libs, $fn;
+ return;
+ }
+}
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+
+ @shared_libs=@executables=@static_libs=();
+ 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",$_);
+ }
- # Handle executables and shared libraries.
- for file in `find debian/$TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do
- case "`file $file`" in
- *ELF*shared*)
- doit "strip --strip-unneeded $file"
- ;;
- *ELF*executable*)
- doit "strip --remove-section=comment --remove-section=note $file"
- ;;
- esac
- done
-
- # Handle static libraries.
- for file in `find debian/$TMP -type f -name "lib*.a" 2>/dev/null` ; do
- # Don't strip debug libraries.
- if ! expr "$file" : ".*_g\.a" >/dev/null ; then
- doit "strip --strip-debug $file"
- fi
- done
-done
+ foreach (@executables) {
+ doit("strip","--remove-section=.comment","--remove-section=.note",$_);
+ }
+
+ foreach (@static_libs) {
+ doit("strip","--strip-debug",$_);
+ }
+}
# 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;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Checks to make sure we are building the package in the right directory.
# Tests for the existance of debian/control, and for the existance
# of any other files you specify on the command line.
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
-for file in debian/control $@; do
- if [ ! -e "$file" ] ; then
- error "\"$file\" not found. Are you sure you are in the correct directory?"
- fi
-done
+foreach $file ('debian/control',@ARGV) {
+ if (! -e $file) {
+ error("\"$file\" not found. Are you sure you are in the correct directory?");
+ }
+}
#
# Checks to make sure you are root.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
if ($< != 0) {
error("You must run this as root.");
#
# Debhelper version check.
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use Dh_Lib;
-use Dh_Version; # contains the version number of debhelper.
+use Debian::Debhelper::Dh_Lib;
+use Debian::Debhelper::Dh_Version; # contains the version number of debhelper.
init();
my($compare, $ver);
}
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.");
+ 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.");
}
# Also, it looks for debian/undocumented files for more lists of
# undocumented man pages.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
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(1), including 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
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
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:
-------------------
dh_builddeb will ever use this)
--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.
maintainer script (like the postinst or prerm).
-- Joey Hess <joeyh@debian.org>
+
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:
----------------------
* Debhelper's home page is at http://kitenet.net/programs/debhelper/
-- Joey Hess <joeyh@debian.org>
+
one year after they were deprecated, whichever comes first. Be sure to
grep whole debian archive for all of them before removing them, though!
- currently, a few packages in potato use dh_du, but bugs have been filed.
+* Remove support for --number option
+ - only dh_installemacsen ever used it, it is not --priority.
+
* dh_makeshlibs will generate autoscript fragments for ldconfig. This will
require you call it before dh_installdeb, which isn't always done now.
+