]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_install
Fix build system auto-selection breakage.
[debhelper.git] / dh_install
index a8e08c2ab85400ad4e2371af8485b5323f0820bb..875f80bfe45d3be04e07525799ec98b45105d0f8 100755 (executable)
@@ -24,15 +24,6 @@ those particular tasks. dh_install, then, is useful for installing everything
 else, for which no particular intelligence is needed. It is a replacement for
 the old dh_movefiles command.
 
-Files named debian/package.install list the files to install into each
-package and the directory they should be installed to. The format is a set
-of lines, where each line lists a file or files to install, and at the end
-of the line tells the directory it should be installed in. The name of the
-files (or directories) to install should be given relative to the current
-directory, while the installation directory is given relative to the
-package build directory. You may use wildcards in the names of the files to
-install (in v3 mode and above).
-
 This program may be used in one of two ways. If you just have a file or two
 that the upstream Makefile does not install for you, you can run dh_install
 on them to move them into place. On the other hand, maybe you have a large
@@ -44,6 +35,22 @@ From debhelper compatibility level 7 on, dh_install will fall back to
 looking in debian/tmp for files, if it doesn't find them in the current
 directory (or whereever you've told it to look using --sourcedir).
 
+=head1 FILES
+
+=over 4
+
+=item debian/I<package>.install
+
+List the files to install into each package and the directory they should be
+installed to. The format is a set of lines, where each line lists a file or
+files to install, and at the end of the line tells the directory it should be
+installed in. The name of the files (or directories) to install should be given
+relative to the current directory, while the installation directory is given
+relative to the package build directory. You may use wildcards in the names of
+the files to install (in v3 mode and above).
+
+=back
+
 =head1 OPTIONS
 
 =over 4
@@ -159,7 +166,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                }
 
                if (! compat(4)) { # check added in v5
-                       # glob now, relative to srcdir
                        if (! @filelist) {
                                error("$package missing files (@$set), aborting");
                        }
@@ -170,8 +176,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        if (! defined $dest) {
                                # Guess at destination directory.
                                $dest=$src;
-                               $dest=~s/^(.*\/)?\Q$srcdir\E\/// ||
-                                       $dest=~s/^(.*\/)?debian\/tmp\///;
+                               $dest=~s/^(.*\/)?\Q$srcdir\E\///;
+                               $dest=~s/^(.*\/)?debian\/tmp\///;
                                $dest=dirname("/".$dest);
                                $tmpdest=1;
                        }