for different architectures. If files named debian/<package>.foo.<arch>
exist, where <arch> is the same as the output of "dpkg --print-architecture",
then they will be used in preference to other, more general files.
+.P
+In many cases, these config files are used to specify various types of
+files. Documentation or example files to install, files to move, and so on.
+When appropriate, in cases like these, you can use standard shell wildcard
+characters ("?" and "*") in the files.
.SH "SHARED DEBHELPER OPTIONS"
The following command line options are supported by all debhelper programs.
.TP
undef @docs;
if ($file) {
- @docs=filearray($file);
+ @docs=filearray($file, ".");
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
undef @examples;
if ($file) {
- @examples=filearray($file);
+ @examples=filearray($file, ".");
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
undef @info;
if ($file) {
- @info=filearray($file);
+ @info=filearray($file, ".");
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
}
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-# $TMP=tmpdir($PACKAGE);
+ $TMP=tmpdir($PACKAGE);
$file=pkgfile($PACKAGE,"wm");
if ($file) {
- @wm=filearray($file);
+ @wm=filearray($file, $TMP);
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
# debian/files has a different purpose, so ignore it.
if ( $files && $files ne "debian/files" ) {
- @tomove=filearray($files);
+ @tomove=filearray($files, $sourcedir);
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
error("I was asked to move files from $sourcedir to $sourcedir. Perhaps you should set DH_COMAPT=2?");
}
- if (@tomove) {
- if (! -d $TMP) {
- doit("install","-d",$TMP);
- }
- # Now we need to expand wildcards in @tomove.
+ # Now we need to expand wildcards in @tomove.
+ # This is only necessary in pre-v3 land, as of v3, the
+ # expension is automatically done by filearray().
+ if (@tomove && ! Debian::Debhelper::Dh_Lib::compat(3)) {
@filelist=();
foreach (@tomove) {
push @filelist, glob("$sourcedir/$_");
}
+ @tomove=@filelist;
+ }
- # If the globs expended to nothing, we are done.
- next unless @filelist;
+ if (@tomove) {
+ if (! -d $TMP) {
+ doit("install","-d",$TMP);
+ }
# Order the files. First all real files, then symlinks.
# Putting symlinks last is a nice thing to do for library
# packages and doesn't affect much of anything else.
doit("rm","-f","debian/movelist");
- foreach (@filelist) {
+ foreach (@tomove) {
$file=$_;
$ret=1 if (! -e $file && ! -l $file);
$file=~s:^\Q$sourcedir\E/+::;
@files=();
if ($suid) {
- @files=filearray($suid);
+ @files=filearray($suid, $TMP);
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {