5 dh_undocumented - make symlinks to undocumented.7.gz man page
10 use Debian::Debhelper::Dh_Lib;
14 dh_undocumented [debhelper options] [-A] [manpage ...]
18 dh_undocumented is a debhelper program that is responsible for making
19 symlinks to L<undocumented(7)> for man pages that are not present in your
22 The program takes a list of man pages that should be symlinked to
23 L<undocumented(7)>. It examines the extension to see what section the man
24 page belongs in. After figuring this out, it generates the necessary
27 The lists of man pages that need symlinks can be specified in two ways. Any
28 man page names specified as
29 parameters will be set up in the first package dh_undocumented is told
30 to act on. By default, this is the first binary package in debian/control,
31 but if you use -p, -i, or -a flags, it will be the first package specified
34 Also, a file named debian/package.undocumented can list other man page
43 Install undocumented man page symlinks for any man pages specified by
44 command line parameters in ALL packages acted on. I doubt anyone will find
45 this useful, it's here for consitency with other debhelper programs.
49 Install undocumented man page symlinks for each of these man pages
50 into the first package acted on. (Or in all packages acted on if -A is
55 Note that Debian policy prohibits links to L<undocumented(7)> unless the
56 package has an open bug report stating that it has no man page. You should
57 really just write a man page instead; this program is an easy way out.
63 foreach my $package (@{$dh{DOPACKAGES}}) {
64 my $tmp=tmpdir($package);
65 my $undocumented=pkgfile($package,"undocumented");
69 @undoc=filearray($undocumented);
72 if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
76 foreach my $file (@undoc) {
77 $file=~s/.gz$//; # .gz extension is optional in input.
79 # Determine what directory the file belongs in,
80 # /usr/share/man, or /usr/X11R6/man, and how the link to
81 # the undocuemtned.7 man page will look.
83 my ($section)=$file=~m/^.*\.(\d)/;
85 error("\"$file\" does not have an extension.");
88 $dir="usr/share/man/man$section";
92 $dir="usr/share/man/man$section";
96 if (! -d "$tmp/$dir") {
97 doit("install","-d","$tmp/$dir");
99 doit("ln","-sf","${reldir}undocumented.7.gz","$tmp/$dir/$file.gz");
107 This program is a part of debhelper.
111 Joey Hess <joeyh@debian.org>