summaryrefslogtreecommitdiff
path: root/dh_install
diff options
context:
space:
mode:
Diffstat (limited to 'dh_install')
-rwxr-xr-xdh_install17
1 files changed, 17 insertions, 0 deletions
diff --git a/dh_install b/dh_install
index 019d0f1b..4aa7142d 100755
--- a/dh_install
+++ b/dh_install
@@ -65,6 +65,18 @@ Note that if you list only a filename on a line by itself in a
debian/package.install file, with no explicit destination, then dh_install
will automatically guess the destination even if this flag is not set.
+=item B<--sourcedir=dir>
+
+Makes all source files relative to "dir". If this is specified, it is akin
+to all the source files having "dir" prepended to them. By default, "dir"
+is '.'.
+
+To make dh_install behave like the old dh_movefiles, move your
+package.files file to package.install and call dh_install with
+"--sourcedir=debian/tmp" appended to the command. This will
+approximate dh_movefiles behaviour, except it will copy files instead
+of moving them.
+
=item I<file [...] dest>
Lists files (or directories) to install and where to install them to.
@@ -81,12 +93,15 @@ my $ret=0;
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $file=pkgfile($package,"install");
+ my $srcdir = '.';
my @install;
if ($file) {
@install=filedoublearray($file); # no globbing yet
}
+ $srcdir = $dh{SOURCEDIR} if defined $dh{SOURCEDIR};
+
if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
push @install, [@ARGV];
}
@@ -114,6 +129,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$dest=dirname($dest);
}
+ $src = "$srcdir/$src"; # do this now, to avoid the parsing above
+
# Make sure the destination directory exists.
if (! -e "$tmp/$dest") {
doit("install","-d","$tmp/$dest");