summaryrefslogtreecommitdiff
path: root/dh_installdocs
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installdocs')
-rwxr-xr-xdh_installdocs36
1 files changed, 26 insertions, 10 deletions
diff --git a/dh_installdocs b/dh_installdocs
index 20862bfe..d6c11c89 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -1,6 +1,7 @@
#!/usr/bin/perl -w
#
-# Reads debian/docs, installs all files listed there into /usr/doc/$PACKAGE
+# Reads debian/docs, installs all files listed there into
+# /usr/share/doc/$PACKAGE
# Also installs the debian/copyright and debian/README.debian and debian/TODO
# and handles debian/doc-base.
@@ -12,8 +13,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
$file=pkgfile($PACKAGE,"docs");
- if ( ! -d "$TMP/usr/doc/$PACKAGE") {
- doit("install","-d","$TMP/usr/doc/$PACKAGE");
+ if ( ! -d "$TMP/usr/share/doc/$PACKAGE") {
+ doit("install","-d","$TMP/usr/share/doc/$PACKAGE");
}
undef @docs;
@@ -27,9 +28,9 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
if (@docs) {
- doit("cp","-a",@docs,"$TMP/usr/doc/$PACKAGE/");
- doit("chmod","-R","go=rX","$TMP/usr/doc");
- doit("chmod","-R","u+rw","$TMP/usr/doc");
+ doit("cp","-a",@docs,"$TMP/usr/share/doc/$PACKAGE/");
+ doit("chmod","-R","go=rX","$TMP/usr/share/doc");
+ doit("chmod","-R","u+rw","$TMP/usr/share/doc");
}
# .Debian is correct, according to policy, but I'm easy.
@@ -38,16 +39,19 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$readme_debian=pkgfile($PACKAGE,'README.debian');
}
if ($readme_debian) {
- doit("install","-m","644","-p","$readme_debian","$TMP/usr/doc/$PACKAGE/README.Debian");
+ doit("install","-m","644","-p","$readme_debian",
+ "$TMP/usr/share/doc/$PACKAGE/README.Debian");
}
$todo=pkgfile($PACKAGE,'TODO');
if ($todo) {
if (isnative($PACKAGE)) {
- doit("install","-m","644","-p",$todo,"$TMP/usr/doc/$PACKAGE/TODO");
+ doit("install","-m","644","-p",$todo,
+ "$TMP/usr/share/doc/$PACKAGE/TODO");
}
else {
- doit("install","-m","644","-p",$todo,"$TMP/usr/doc/$PACKAGE/TODO.Debian");
+ doit("install","-m","644","-p",$todo,
+ "$TMP/usr/share/doc/$PACKAGE/TODO.Debian");
}
}
@@ -59,7 +63,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$copyright="debian/copyright";
}
if ($copyright) {
- doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright");
+ doit("install","-m","644","-p",$copyright,
+ "$TMP/usr/share/doc/$PACKAGE/copyright");
}
# Handle doc-base files. There are two filename formats, the usual
@@ -104,4 +109,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
);
}
}
+
+
+ # Add in the /usr/doc compatability symlinks code.
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-doc",
+ "s/#PACKAGE#/$PACKAGE/g",
+ );
+ autoscript($PACKAGE,"prerm","prerm-doc",
+ "s/#PACKAGE#/$PACKAGE/g",
+ );
+ }
}