X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_installman;h=703b70bc3c8a93531eb6e522657f579cc7483723;hb=d687f06403910b86076e821b52ad7a444a781e39;hp=a167cc3a5e8ddf4eabd61ee60a2890f5fb60d514;hpb=bf969c1ca026433477c3578123b28e9829ba4e25;p=debhelper.git diff --git a/dh_installman b/dh_installman index a167cc3..703b70b 100755 --- a/dh_installman +++ b/dh_installman @@ -38,14 +38,6 @@ 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. -Any man page filenames specified as parameters will be installed into the -first package dh_installman is told to act on. By default, this is the -first binary package in debian/control, but if you use -p, -i, or -a flags, -it will be the first package specified by those flags. - -Files named debian/package.manpages can list other man pages to be -installed. - 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. @@ -55,6 +47,16 @@ manual page and convert it to UTF-8. If the guesswork fails for some reason, you can override it using an encoding declaration. See L for details. +=head1 FILES + +=over 4 + +=item debian/I.manpages + +Lists man pages to be installed. + +=back + =head1 OPTIONS =over 4 @@ -165,7 +167,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { $destdir="$tmp/usr/share/man/$langcode/man$realsection/"; } $destdir=~tr:/:/:s; # just for looks - my $instpage="$destdir/$instname.$section"; + my $instpage="$destdir$instname.$section"; next if -l $instpage; next if compat(5) && -e $instpage; @@ -183,7 +185,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { # Now the .so conversion. @sofiles=@sodests=(); - foreach my $dir (qw{usr/share/man usr/X11R6/man}) { + foreach my $dir (qw{usr/share/man}) { if (-e "$tmp/$dir") { find(\&find_so_man, "$tmp/$dir"); } @@ -195,7 +197,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } # Now utf-8 conversion. - foreach my $dir (qw{usr/share/man usr/X11R6/man}) { + foreach my $dir (qw{usr/share/man}) { if (-e "$tmp/$dir") { find(sub { return if ! -f $_ || -l $_; @@ -239,12 +241,17 @@ sub find_so_man { dirname($solink)) { $solink=basename($solink); } - else { + # A so link with a path is relative to the base of the man + # page hierarchy, but without a path, is relative to the + # current section. + elsif ($solink =~ m!/!) { $solink="../$solink"; } - push @sofiles,"$File::Find::dir/$_"; - push @sodests,$solink; + if (-e $solink || -e "$solink.gz") { + push @sofiles,"$File::Find::dir/$_"; + push @sodests,$solink; + } } }