debian/package.install files or on the command line. Instead, dh_install
will guess as follows:
-Strip off debian/tmp from the front of the filename, if it is present, and
-install into the dirname of the filename. So if the filename is
-debian/tmp/usr/bin, then that directory will be copied to
-debian/package/usr/. If the filename is debian/tmp/etc/passwd, it will be
-copied to debian/package/etc/.
+Strip off debian/tmp (or the sourcedir if one is given) from the front of
+the filename, if it is present, and install into the dirname of the
+filename. So if the filename is debian/tmp/usr/bin, then that directory
+will be copied to debian/package/usr/. If the filename is
+debian/tmp/etc/passwd, it will be copied to debian/package/etc/.
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
# Support for -X flag.
my $exclude = '';
if ($dh{EXCLUDE_FIND}) {
- $exclude = '-and ! \( '.$dh{EXCLUDE_FIND}.' \)';
+ $exclude = '! \( '.$dh{EXCLUDE_FIND}.' \)';
}
foreach my $set (@install) {
if (! defined $dest) {
# Guess at destination directory.
$dest=$src;
- $dest=~s/^(.*\/)?debian\/tmp//;
+ my $strip=$srcdir;
+ if ($strip eq '.') {
+ $strip = "debian/tmp";
+ }
+ $dest=~s/^(.*\/)?\Q$strip\E//;
$dest=dirname($dest);
}
# @installed stuff more robust.
$src=~y:/:/:s;
$src=~s:/+$::;
+ $src=~s:^(\./)*::;
push @installed, "\Q$src\E\/.*|\Q$src\E";
}
# Pity there's no cp --exclude ..
my $pwd=`pwd`;
chomp $pwd;
- complex_doit("cd $src/.. && find $dir_basename \\( -type f -or -type l \\) $exclude -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+ complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type f -or -type l \\) -exec cp --parents -dp {} $pwd/$tmp/$dest/ \\;");
+ # cp is annoying so I need a separate pass
+ # just for empty directories
+ complex_doit("cd $src/.. && find $dir_basename $exclude \\( -type d -and -empty \\) -exec cp --parents -a {} $pwd/$tmp/$dest/ \\;");
}
else {
doit("cp", "-a", $src, "$tmp/$dest/");
push @missing, $_ unless /$installed/ || excludefile($_);
}, $srcdir);
if (@missing) {
- warning "$_ not installed" foreach @missing;
+ warning "$_ exists in debian/tmp but not installed to anywhere" foreach @missing;
}
}
=head1 SEE ALSO
-L<debhelper(1)>
+L<debhelper(7)>
This program is a part of debhelper.