use strict;
use Debian::Debhelper::Dh_Lib;
-my $sgmlbasever = "1.17";
+my $sgmlbasever = "1.26+nmu2";
=head1 SYNOPSIS
=head1 DESCRIPTION
-dh_installcatalogs is a debhelper program that installs and
+B<dh_installcatalogs> is a debhelper program that installs and
registers SGML catalogs. It complies with the Debian XML/SGML policy.
Catalogs will be registered in a supercatalog, in
This command automatically adds maintainer script snippets for
registering and unregistering the catalogs and supercatalogs (unless
B<-n> is used). These snippets are inserted into the maintainer scripts
-by dh_installdeb; see L<dh_installdeb(1)> for an explanation of
+by B<dh_installdeb>; see L<dh_installdeb(1)> for an explanation of
Debhelper maintainer script snippets.
-A dependency on B<sgml-base> will be added to C<${misc:Depends}>, so be
+A dependency on B<sgml-base> will be added to B<${misc:Depends}>, so be
sure your package uses that variable in F<debian/control>.
=head1 FILES
=item debian/I<package>.sgmlcatalogs
-Lists the catalogs to be installed per package. Each line in that file
-should be of the form C<source dest>, where C<source> indicates where the
-catalog resides in the source tree, and C<dest> indicates the destination
-location for the catalog under the package build area. C<dest> should
+Lists the catalogs to be installed per package. Each line in that file
+should be of the form C<I<source> I<dest>>, where I<source> indicates where the
+catalog resides in the source tree, and I<dest> indicates the destination
+location for the catalog under the package build area. I<dest> should
start with F</usr/share/sgml/>.
=back
doit("install","-d","-m755","$tmpdir/etc/sgml");
}
+ my $centralcat = "/etc/sgml/$package.cat";
+
+ open(CENTRALCAT, ">", "$tmpdir$centralcat") || error("failed to write to $tmpdir$centralcat");
+ foreach my $sgmldest (@sgmlinstalled) {
+ print CENTRALCAT "CATALOG " . $sgmldest . "\n";
+ }
+ close CENTRALCAT;
+
if (! $dh{NOSCRIPTS}) {
- my $ordcats = join(" ", @sgmlinstalled);
- my $centralcat = "/etc/sgml/$package.cat";
- autoscript($package, "postinst", "postinst-sgmlcatalog",
- "s%#CENTRALCAT#%$centralcat%g; s%#ORDCATS#%$ordcats%g;");
- autoscript($package, "prerm", "prerm-sgmlcatalog",
+ autoscript($package, "preinst", "preinst-sgmlcatalog",
"s%#CENTRALCAT#%$centralcat%g;");
autoscript($package, "postrm", "postrm-sgmlcatalog",
"s%#CENTRALCAT#%$centralcat%g;");