X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_installcatalogs;h=510a2bb316918a3382150ddd1de8d2a3adb36acc;hb=d8edabf803f9e687cd2a626a6b28c921a0c645ab;hp=6bdc977d8ae1b18be432598e7927e5103ce31669;hpb=3aa6fbb20465d16cf23e1607b078ed3cedf95ebe;p=debhelper.git diff --git a/dh_installcatalogs b/dh_installcatalogs index 6bdc977..510a2bb 100755 --- a/dh_installcatalogs +++ b/dh_installcatalogs @@ -2,7 +2,7 @@ =head1 NAME -dh_installcatalog - install and register SGML Catalogs +dh_installcatalogs - install and register SGML Catalogs =cut @@ -13,14 +13,12 @@ my $sgmlbasever = "1.17"; =head1 SYNOPSIS -B [S>] [B<-n>] +B [S>] [B<-n>] =head1 DESCRIPTION -dh_registersgmlcatalog is a debhelper program that installs and -registers SGML catalogs. (Note: it will be extended for XML catalog -registration when xml-core is available.) It complies with the Debian -XML/SGML policy. +dh_installcatalogs is a debhelper program that installs and +registers SGML catalogs. It complies with the Debian XML/SGML policy. The file F.sgmlcatalogs> contains the catalogs to be installed per package. Each line in that file should be of the form @@ -32,13 +30,15 @@ F. Catalogs will be registered in a supercatalog, in F.cat>. -This script automatically adds maintainer script snippets for +This command automatically adds maintainer script snippets for registering and unregistering the catalogs and "supercatalogs" (unless -B<-n> is used). A dependancy on B will be added to -C<${misc:Depends}>, so be sure your package uses that variable in -F. See L for an explantion of +B<-n> is used). These snippets are inserted into the maintainer scripts +by dh_installdeb; see L for an explanation of Debhelper maintainer script snippets. +A dependency on B will be added to C<${misc:Depends}>, so be +sure your package uses that variable in F. + =head1 OPTIONS =over 4 @@ -51,7 +51,7 @@ Do not modify F/F/F scripts. =head1 NOTES -Note that this command is not idempotent. "dh_clean -k" should be +Note that this command is not idempotent. L should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. @@ -74,7 +74,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { $fulldest =~ s|//|/|g; # beautification if (! -d dirname($fulldest)) { - doit("install","-d","-m755",dirname($dest)); + doit("install","-d","-m755",$tmpdir."/".dirname($dest)); } doit("install","-p","-m644",$source,$fulldest); @@ -85,6 +85,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if (@sgmlinstalled) { addsubstvar($package, "misc:Depends", "sgml-base", ">= $sgmlbasever"); + if (! -d "$tmpdir/etc/sgml") { + doit("install","-d","-m755","$tmpdir/etc/sgml"); + } + if (! $dh{NOSCRIPTS}) { my $ordcats = join(" ", @sgmlinstalled); my $centralcat = "/etc/sgml/$package.cat";