diff options
author | joey <joey> | 1999-08-17 05:06:17 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 05:06:17 +0000 |
commit | 180110c3cce8624deefc4fd8d7bd60ce05e11a4b (patch) | |
tree | d91d4a23e7d01cf642a3bd00e99e6ec846268995 | |
parent | e06e87d0aee1e09703e21b74a23f2249fcd4c6bb (diff) | |
download | debhelper-180110c3cce8624deefc4fd8d7bd60ce05e11a4b.tar.gz |
r153: Initial Import
-rw-r--r-- | Dh_Getopt.pm | 2 | ||||
-rw-r--r-- | debian/changelog | 10 | ||||
-rwxr-xr-x | dh_movefiles | 30 | ||||
-rw-r--r-- | doc/PROGRAMMING | 2 |
4 files changed, 34 insertions, 10 deletions
diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm index 42ad7abf..e0b3896d 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 5c2d87a6..f0c1a5d7 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 <joeyh@master.debian.org> 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 9819fd2d..2ed8e376 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 da21ea9d..e40f0421 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. |