DH_INSTALLMAN(1)

πŸ’– DH_INSTALLMAN πŸ’–

okay bestie, so this is dh_installman from the Debhelper manual (section 1, she's a command, obviously) and she is literally the girl who puts your man pages in the right place. no cap.


✨ NAME ✨

dh_installman β€” install man pages into package build directories πŸŽ€


🌸 SYNOPSIS 🌸

dh_installman [debhelper options] [manpage ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so dh_installman is a debhelper program and her whole job is handling the installing of man pages into the correct locations inside your package build directories. slay.

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, iconic behaviour, it does not have an install step at all 😭). in compat 11 and later, it also supports the default searchdir plus --sourcedir like dh_install(1) does, and she has the advantage that she respects the nodoc build profile (unlike dh_install(1) β€” not her fault, just saying πŸ’…).

even if you prefer to use dh_install(1) for installing the manpages, dh_installman can still be useful for converting the manpage encoding to UTF-8 and for converting .so links (as described below). however β€” and this is the key part β€” that part happens automatically without any explicit configuration. you don't have to do a thing. she just does it. main character energy fr fr.

so here's the vibe: you tell dh_installman what man pages go in your packages, and she figures out where to install them based on the section field in their .TH or .Dt line. if you have a properly formatted .TH or .Dt line, your man page will be installed into the right directory, with the right name (this includes proper handling of pages with a subsection, like 3perl, which are placed in man3, and given an extension of .3perl). if your .TH or .Dt line is incorrect or missing, the program may guess wrong based on the file extension. πŸ™ˆ

she also supports translated man pages, by looking for extensions like .ll.8 and .ll_LL.8, or by use of the --language switch. multilingual queen 🌈

if dh_installman seems to install a man page into the wrong section or with the wrong extension, this is because the man page has the wrong section listed in its .TH or .Dt line. edit the man page and correct the section, and dh_installman will follow suit. see man(7) for details about the .TH section, and mdoc(7) for the .Dt section. and if dh_installman seems to install a man page into a directory like /usr/share/man/pl/man1/, that is because your program has a name like foo.pl, and dh_installman assumes that means it is translated into Polish. use --language=C to avoid this. (not her being culturally presumptuous πŸ’€ she's trying her best)

after the man page installation step, dh_installman will check to see if any of the man pages in the temporary directories of any of the packages it is acting on contain .so links. if so, it changes them to symlinks. glow up ✨

also, dh_installman will use man to guess the character encoding of each manual page and convert it to UTF-8. if the guesswork fails for some reason, you can override it using an encoding declaration. see manconv(1) for details.

from debhelper compatibility level 11 on, dh_install will fall back to looking in debian/tmp for files, if it does not find them in the current directory (or wherever you've told it to look using --sourcedir).


πŸŽ€ FILES πŸŽ€

  • debian/package.manpages β€” Lists man pages to be installed. πŸ“

Supports substitution variables in compat 13 and later as documented in debhelper(7).


πŸ’… OPTIONS πŸ’…

  • -A, --all β€” Install all files specified by command line parameters in ALL packages acted on. all of them. every single one. periodt.
  • --language=ll β€” Use this to specify that the man pages being acted on are written in the specified language. πŸ—£οΈ
  • --sourcedir=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 --sourcedirectory option used by the dh_auto_* commands. You rarely need to use this option, since dh_installman automatically looks for files in debian/tmp in debhelper compatibility level 11 and above.

  • manpage ... β€” Install these man pages into the first package acted on. (Or in all packages if -A is specified).

🌟 EXAMPLES 🌟

an example debian/package.manpages file could look like this:

doc/man/foo.1
# Translations
doc/man/foo.da.1
doc/man/foo.de.1
doc/man/foo.fr.1
# NB: The following line is considered a polish translation
# of "foo.1" (and not a manpage written in perl called "foo.pl")
doc/man/foo.pl.1
# ...

(and yes, note that last one β€” it's a Polish translation of foo.1, not a perl manpage called foo.pl. the comments in the file literally say so. iykyk 🫢)


πŸ“ NOTES πŸ“

an older version of this program, dh_installmanpages(1), is still used by some packages, and so is still included in debhelper. it is, however, deprecated, due to its counterintuitive and inconsistent interface. use this program instead. like, please. for your own sake bestie. πŸ™


πŸ‘‘ SEE ALSO πŸ‘‘

debhelper(7)

This program is a part of debhelper.


πŸ’œ AUTHOR πŸ’œ

Joey Hess <joeyh@debian.org>


and that's the whole page, gorgeous πŸ’– this was 14.5ubuntu1, dated 2026-09-21 β€” go install some man pages, you ate that fr fr βœ¨πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from