1DH_INSTALLMAN(1) Debhelper DH_INSTALLMAN(1)
2
3
4
6 dh_installman - install man pages into package build directories
7
9 dh_installman [debhelper options] [manpage ...]
10
12 dh_installman is a debhelper program that handles installing man pages
13 into the correct locations in package build directories.
14
15 In compat 10 and earlier, this program was primarily for when
16 upstream's build system does not properly install them as a part of its
17 install step (or it does not have an install step). In compat 11 and
18 later, it also supports the default searchdir plus --sourcedir like
19 dh_install(1) and has the advantage that it respects the nodoc build
20 profile (unlike dh_install(1)).
21
22 Even if you prefer to use dh_install(1) for installing the manpages,
23 dh_installman can still be useful for converting the manpage encoding
24 to UTF-8 and for converting .so links (as described below). However,
25 that part happens automatically without any explicit configuration.
26
27 You tell dh_installman what man pages go in your packages, and it
28 figures out where to install them based on the section field in their
29 .TH or .Dt line. If you have a properly formatted .TH or .Dt line, your
30 man page will be installed into the right directory, with the right
31 name (this includes proper handling of pages with a subsection, like
32 3perl, which are placed in man3, and given an extension of .3perl). If
33 your .TH or .Dt line is incorrect or missing, the program may guess
34 wrong based on the file extension.
35
36 It also supports translated man pages, by looking for extensions like
37 .ll.8 and .ll_LL.8, or by use of the --language switch.
38
39 If dh_installman seems to install a man page into the wrong section or
40 with the wrong extension, this is because the man page has the wrong
41 section listed in its .TH or .Dt line. Edit the man page and correct
42 the section, and dh_installman will follow suit. See man(7) for details
43 about the .TH section, and mdoc(7) for the .Dt section. If
44 dh_installman seems to install a man page into a directory like
45 /usr/share/man/pl/man1/, that is because your program has a name like
46 foo.pl, and dh_installman assumes that means it is translated into
47 Polish. Use --language=C to avoid this.
48
49 After the man page installation step, dh_installman will check to see
50 if any of the man pages in the temporary directories of any of the
51 packages it is acting on contain .so links. If so, it changes them to
52 symlinks.
53
54 Also, dh_installman will use man to guess the character encoding of
55 each manual page and convert it to UTF-8. If the guesswork fails for
56 some reason, you can override it using an encoding declaration. See
57 manconv(1) for details.
58
59 From debhelper compatibility level 11 on, dh_install will fall back to
60 looking in debian/tmp for files, if it does not find them in the
61 current directory (or wherever you've told it to look using
62 --sourcedir).
63
65 debian/package.manpages
66 Lists man pages to be installed.
67
68 Supports substitution variables in compat 13 and later as
69 documented in debhelper(7).
70
72 -A, --all
73 Install all files specified by command line parameters in ALL
74 packages acted on.
75
76 --language=ll
77 Use this to specify that the man pages being acted on are written
78 in the specified language.
79
80 --sourcedir=dir
81 Look in the specified directory for files to be installed. This
82 option requires compat 11 or later (it is silently ignored in
83 compat 10 or earlier).
84
85 Note that this is not the same as the --sourcedirectory option used
86 by the dh_auto_* commands. You rarely need to use this option,
87 since dh_installman automatically looks for files in debian/tmp in
88 debhelper compatibility level 11 and above.
89
90 manpage ...
91 Install these man pages into the first package acted on. (Or in all
92 packages if -A is specified).
93
95 An example debian/manpages file could look like this:
96
97 doc/man/foo.1
98 # Translations
99 doc/man/foo.da.1
100 doc/man/foo.de.1
101 doc/man/foo.fr.1
102 # NB: The following line is considered a polish translation
103 # of "foo.1" (and not a manpage written in perl called "foo.pl")
104 doc/man/foo.pl.1
105 # ...
106
108 An older version of this program, dh_installmanpages(1), is still used
109 by some packages, and so is still included in debhelper. It is,
110 however, deprecated, due to its counterintuitive and inconsistent
111 interface. Use this program instead.
112
114 debhelper(7)
115
116 This program is a part of debhelper.
117
119 Joey Hess <joeyh@debian.org>
120
121
122
12313.3.4 2021-05-13 DH_INSTALLMAN(1)