diff options
author | Niels Thykier <niels@thykier.net> | 2017-06-29 08:20:20 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-06-29 11:37:05 +0000 |
commit | c21c5ec2e2370d5ecf697dc1c22aec27ac510fbc (patch) | |
tree | 35b3420f719f1268472fcf4a964c45225d459ba7 /dh_installman | |
parent | ec16ce564d528d1321fa77b954744eaf7de2ed57 (diff) | |
download | debhelper-c21c5ec2e2370d5ecf697dc1c22aec27ac510fbc.tar.gz |
dh_installman: Support --sourcedir and fallback to d/tmp [c11]
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_installman')
-rwxr-xr-x | dh_installman | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/dh_installman b/dh_installman index 4bbbea3f..e7bfc4c5 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; +@search_dirs = ($dh{SOURCEDIR} // '.', 'debian/tmp') if not compat(10); + on_items_in_parallel(\@all_packages, sub { foreach my $package (@_) { |