"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},
# 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;
+ # This list is from _Unix in a Nutshell_. (except '#')
+ $word=~s/([\s!"\$()*+#;<>?@\[\]\\`|~])/\\$1/g;
return $word;
}
+debhelper (1.1.8) unstable; urgency=low
+
+ * Dh_Lib.pm: made U_PARAMS an array of parameters.
+ * Dh_Lib.pm: fixed bug in the escaping code, numbers don't need to be
+ escaped. Also, no longer escape "-".
+ * dh_clean, dh_gencontrol, dh_installcron: converted to perl.
+ * dh_gencontrol.1, dh_gencontrol: the man page had said that
+ --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
+
debhelper (1.1.7) unstable; urgency=low
* examples/rules.multi: moved dh_movefiles into the install section.
Section: devel
Priority: optional
Maintainer: Joey Hess <joeyh@master.debian.org>
-Standards-Version: 2.4.1.2
+Standards-Version: 2.4.1.3
Package: debhelper
Architecture: all
-#!/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
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use 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';
+ }
- changelog=`pkgfile $PACKAGE changelog`
- if [ ! "$changelog" ]; then
- changelog=debian/changelog
- fi
-
- 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 -l$changelog -isp -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS"
+ 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"
-done
+ doit("chmod","644","$TMP/DEBIAN/control");
+
+ doit("chown","root.root","$TMP/DEBIAN/control");
+}
.BR debhelper (1)
for a list of options common to all debhelper commands.
.TP
-.B \-uparams, \--update-rcd-params=params
+.B \-uparams, \--dpkg-gencontrol-params=params
Pass "params" to
.BR dpkg-gencontrol (1)
.SH ENVIRONMENT
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Install cron scripts into the appropriate places.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
-
- for type in daily weekly monthly d; do
- cron=`pkgfile $PACKAGE cron.$type`
- if [ "$cron" ]; then
- if [ ! -d $TMP/etc/cron.$type ]; then
- doit "install -o root -g root -d $TMP/etc/cron.$type"
- fi
- doit "install "$cron" $TMP/etc/cron.$type/$PACKAGE"
- fi
- done
-done
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ foreach $type (qw{daily weekly monthly d}) {
+ $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");
+ }
+ }
+}
package is being acted on)
-u U_PARAMS will be set to a string, that is typically
parameters your program passes on to some
- other program.
+ other program. (In Dh_Lib.pm, this is an array)
-m M_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