summaryrefslogtreecommitdiff
path: root/dh_installdocs
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installdocs')
-rwxr-xr-xdh_installdocs25
1 files changed, 21 insertions, 4 deletions
diff --git a/dh_installdocs b/dh_installdocs
index 867d34a4..61535c6e 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -28,8 +28,12 @@ the upstream documentation, when upstream's own build system installs all the de
correctly. In this case, B<dh_installdocs> is still useful for installing
packaging related documentation (e.g. the F<debian/copyright> file).
+From debhelper compatibility level 11 on, B<dh_install> will fall back to
+looking in F<debian/tmp> for files, if it does not find them in the current
+directory (or wherever you've told it to look using B<--sourcedir>).
+
In compat 11 and later, B<dh_installdocs> offers many of the features that
-L<dh_install(1)> also have. Furthermore, B<dh_installdocs> also supports
+L<dh_install(1)> also has. Furthermore, B<dh_installdocs> also supports
the B<nodoc> build profile to exclude documentation (regardless of compat
level).
@@ -97,6 +101,16 @@ acted on.
Exclude files that contain I<item> anywhere in their filename from
being installed. Note that this includes doc-base files.
+=item B<--sourcedir=>I<dir>
+
+Look in the specified directory for files to be installed. This option
+requires compat 11 or later (it is silently ignored in compat 10 or earlier).
+
+Note that this is not the same as the B<--sourcedirectory> option used
+by the B<dh_auto_>I<*> commands. You rarely need to use this option, since
+B<dh_installman> automatically looks for files in F<debian/tmp> in debhelper
+compatibility level 11 and above.
+
=item B<--doc-main-package=>I<main-package>
Set the main package for a documentation package. This is used to
@@ -152,8 +166,8 @@ and using L<dh_installdeb(1)> to provide the relevant maintainer
script snippets.
B<CAVEAT 2>: The use of B<--link-doc> should only be done when the
-packages have same "architecture" type. A link from a architecture
-independent package to a architecture dependent package (or vice
+packages have same "architecture" type. A link from an architecture
+independent package to an architecture dependent package (or vice
versa) will not work. Since compat 10, debhelper will actively reject
unsupported combinations.
@@ -214,7 +228,7 @@ init(options => {
});
my $called_getpackages = 0;
-my $default_error_handler = compat(10) ? \&glob_expand_error_handler_warn_and_discard : \&glob_expand_error_handler_reject;
+my $default_error_handler = compat(10) ? \&glob_expand_error_handler_reject_nomagic_warn_discard : \&glob_expand_error_handler_reject;
my $nodocs = is_build_profile_active('nodoc') || get_buildoption('nodoc') ? 1 : 0;
# We cannot assume documentation is built under nodoc, but if it is we must flag it as handled
# or dh_missing might make noise.
@@ -289,6 +303,9 @@ foreach my $package (getpackages()) {
if (not defined($target_package)) {
warning("Cannot auto-detect main package for ${package}. If the default is wrong, please use --doc-main-package");
$target_package = $package;
+ } elsif ($dh{PARAMS_ALL} and $package ne $target_package and not $dh{DOC_MAIN_PACKAGE}) {
+ warning("Not using auto-detected $target_package as main doc package for $package: With -A/--all, this would cause file-conflicts.");
+ $target_package = $package;
}
if ($dh{EXCLUDE_FIND}) {
$exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)';