From: joey Date: Tue, 17 Aug 1999 05:16:09 +0000 (+0000) Subject: r222: Initial Import X-Git-Tag: debian_version_0_1~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c56b59c6ee3779a86ab52d92d2fc0341103c23b8;p=debhelper.git r222: Initial Import --- diff --git a/debian/changelog b/debian/changelog index e80107c..04ba51a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (1.2.82) unstable; urgency=low + + * dh_installinit: applied patch from Yann Dirson + to make it look for init.d scripts matching the --init-script parameter. + This is only useful if, like Yann, you have packages that need to install + more than 1 init script. + + -- Joey Hess 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 diff --git a/dh_installinit b/dh_installinit index d1de180..6432c51 100755 --- a/dh_installinit +++ b/dh_installinit @@ -9,34 +9,36 @@ init(); foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $TMP=tmpdir($PACKAGE); - # Debstd used either name, so do we for back-compatability. - $init=pkgfile($PACKAGE,"init") || pkgfile($PACKAGE,"init.d"); + + # 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"); } - # 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; - } doit("install","-p","-m755",$init,"$TMP/etc/init.d/$script"); # This is set by the -u "foo" command line switch, it's diff --git a/dh_perl b/dh_perl index c8aa6a0..d66dfce 100755 --- a/dh_perl +++ b/dh_perl @@ -74,14 +74,14 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { next unless $dep; - if (-e "debian/$EXT\subtsvars") { - open (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;