[debhelper-devel] [debhelper] 08/17: dh_installman: Support --sourcedir and fallback to d/tmp [c11]
Niels Thykier
nthykier at moszumanska.debian.org
Thu Jun 29 15:49:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit c21c5ec2e2370d5ecf697dc1c22aec27ac510fbc
Author: Niels Thykier <niels at thykier.net>
Date: Thu Jun 29 08:20:20 2017 +0000
dh_installman: Support --sourcedir and fallback to d/tmp [c11]
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_install | 2 +-
dh_installman | 35 ++++++++++++++++++++++++++---------
2 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/dh_install b/dh_install
index 9b988a7..568337c 100755
--- a/dh_install
+++ b/dh_install
@@ -134,7 +134,7 @@ init(options => {
"autodest" => \$dh{AUTODEST},
"list-missing" => \$dh{LIST_MISSING},
"fail-missing" => \$dh{FAIL_MISSING},
- "sourcedir=s" => \$dh{SOURCEDIR},
+ "sourcedir=s" => \$dh{SOURCEDIR},
});
my $srcdir = '.';
diff --git a/dh_installman b/dh_installman
index 4bbbea3..e7bfc4c 100755
--- a/dh_installman
+++ b/dh_installman
@@ -18,18 +18,22 @@ B<dh_installman> [S<I<debhelper options>>] [S<I<manpage> ...>]
=head1 DESCRIPTION
B<dh_installman> is a debhelper program that handles installing man
-pages into the correct locations in package build directories for when
+pages into the correct locations in package build directories.
+
+In compat 10 and earlier, this program was primarily for when
upstream's build system does not properly install them as a part of
-its install step (or it does not have an install step).
+its install step (or it does not have an install step). In compat 11
+and later, it supports the same features of L<dh_install(1)> and
+has the advantage that it respects the B<nodoc> build profile (unlike
+L<dh_install(1)>).
+
+Even if you prefer to use L<dh_install(1)> for installing the manpages,
+B<dh_installman> can still be useful for converting the manpage encoding
+to UTF-8 and for converting F<.so> links (as described below). However,
+that part happens automatically without any explicit configuration.
-If upstream's installs the manpages in the proper directories,
-L<dh_install(1)> may be easier to use for deciding which package
-should ship the manpages. In this case, B<dh_installman> can still be
-useful for converting the manpage encoding to UTF-8 and for converting
-F<.so> links (as described below). However, that part happens
-automatically without any explicit configuration.
-You tell it what man pages go in your packages, and it figures out
+You tell B<dh_installman> what man pages go in your packages, and it figures out
where to install them based on the section field in their B<.TH> or
B<.Dt> line. If you have a properly formatted B<.TH> or B<.Dt> line,
your man page will be installed into the right directory, with the
@@ -84,6 +88,16 @@ acted on.
Use this to specify that the man pages being acted on are written in the
specified language.
+=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 I<manpage> ...
Install these man pages into the first package acted on. (Or in all
@@ -116,6 +130,7 @@ interface. Use this program instead.
init(options => {
"language=s" => \$dh{LANGUAGE},
+ "sourcedir=s" => \$dh{SOURCEDIR},
});
@@ -130,6 +145,8 @@ my $nodocs = is_build_profile_active('nodoc') ? 1 : 0;
# or dh_missing might make noise.
$error_handler = \&glob_expand_error_handler_silently_ignore if $nodocs;
+ at search_dirs = ($dh{SOURCEDIR} // '.', 'debian/tmp') if not compat(10);
+
on_items_in_parallel(\@all_packages, sub {
foreach my $package (@_) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list