# Reads debian/info, installs all files listed there into /usr/share/info
# and puts appropriate commands into the postinst.
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
init();
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
undef @info;
if ($file) {
- @info=filearray($file);
+ @info=filearray($file, ".");
}
if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
foreach $file (@info) {
# Only register with install-info if this is a head file in
# a tree of info files.
- if ($file=~/\.info$/ && ! $dh{NOSCRIPTS}) {
+ if ($file !~ /-\d+$/ && ! $dh{NOSCRIPTS}) {
# Figure out what section this file goes in.
my $section='';
open (IN, "<$file") || die "$file: $!";
}
close IN;
- my $fn="/usr/share/info/".Dh_Lib::basename($file);
+ my $fn="/usr/share/info/".Debian::Debhelper::Dh_Lib::basename($file);
if ($section ne '') {
+ $section=~s:/:\\/:g; # allow / in section.
autoscript($PACKAGE,"postinst","postinst-info",
"s/#SECTION#/$section/g;s:#FILE#:$fn:");
}