From: joey Date: Tue, 17 Aug 1999 05:06:17 +0000 (+0000) Subject: r153: Initial Import X-Git-Tag: debian_version_0_1~88 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=180110c3cce8624deefc4fd8d7bd60ce05e11a4b;p=debhelper.git r153: Initial Import --- diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm index 42ad7ab..e0b3896 100644 --- a/Dh_Getopt.pm +++ b/Dh_Getopt.pm @@ -111,6 +111,8 @@ sub parseopts { "no-act" => \$options{NO_ACT}, "init-script=s" => \$options{INIT_SCRIPT}, + + "sourcedir=s" => \$options{SOURCEDIR}, ); if (!$ret) { diff --git a/debian/changelog b/debian/changelog index 5c2d87a..f0c1a5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (1.2.17) unstable; urgency=low + + * dh_makeshlibs: relaxed regexp to find library name and number a little so + it will work on libraries with a major but no minor version in their + filename (examples of such: libtcl8.0.so.1, libBLT-unoff.so.1) + * dh_movefiles: added --sourcedir option to make it move files out of + some directory besides debian/tmp (#30221) + + -- Joey Hess Fri, 4 Dec 1998 13:56:57 -0800 + debhelper (1.2.16) unstable; urgency=low * dh_installchangelogs: now detects html changelogs and installs them as diff --git a/dh_movefiles b/dh_movefiles index 9819fd2..2ed8e37 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -12,8 +12,18 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $TMP=tmpdir($PACKAGE); $files=pkgfile($PACKAGE,"files"); - if (! -d "debian/tmp") { - error("debian/tmp does not exist."); + 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=(); @@ -27,8 +37,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { push @tomove, @ARGV; } - if (@tomove && $TMP eq "debian/tmp") { - error("I was asked to move files from debian/tmp to debian/tmp."); + if (@tomove && $TMP eq $sourcedir) { + error("I was asked to move files from $sourcedir to $sourcedir."); } if (@tomove) { @@ -38,7 +48,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { # Now we need to expand wildcards in @tomove. @filelist=(); foreach (@tomove) { - push @filelist, glob("debian/tmp/$_"); + push @filelist, glob("$sourcedir/$_"); } # Order the files. First all real files, then symlinks. @@ -48,16 +58,16 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { foreach (@filelist) { $file=$_; $ret=1 if (! -e $file && ! -l $file); - $file=~s:^debian/tmp/+::; - complex_doit("(cd debian/tmp ; find $file ! -type d -and ! -type l -print || true) >> movelist"); + $file=~s:^$sourcedir/+::; + complex_doit("(cd $sourcedir ; find $file ! -type d -and ! -type l -print || true) >> movelist"); } foreach (@filelist) { $file=$_; $ret=1 if (! -e $file && ! -l $file); - $file=~s:^debian/tmp/+::; - complex_doit("(cd debian/tmp ; find $file ! -type d -and -type l -print || true) >> movelist"); + $file=~s:^$sourcedir/+::; + complex_doit("(cd $sourcedir ; find $file ! -type d -and -type l -print || true) >> movelist"); } - complex_doit("(cd debian/tmp;tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP;tar xpf -)"); + complex_doit("(cd $sourcedir;tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP;tar xpf -)"); doit("rm","-f","movelist"); } } diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index da21ea9..e40f042 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -116,6 +116,8 @@ switch variable description --init-script INIT_SCRIPT will be set to a string, which specifies an init script name (probably only dh_installinit will ever use this) +--sourcedir SOURCEDIR will be set to a string (probably only + dh_movefiles 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.