summaryrefslogtreecommitdiff
path: root/dh_installmanpages
diff options
context:
space:
mode:
authorjoey <joey>1999-11-29 05:16:29 +0000
committerjoey <joey>1999-11-29 05:16:29 +0000
commit3f0143c06b3cc3aa746c869e9c5cd269ca48df6d (patch)
tree47bd65741415b70545f363ab12daf3e7b8a55eca /dh_installmanpages
parentfc002144665795f9b179a9f19ee478dcb46c1d6c (diff)
r314: * Added support for translated man pages, with a patch from
Kis Gergely <kisg@lme.linux.hu>. Closes: #51268 * Fixed the undefined value problem in Kis's patch.
Diffstat (limited to 'dh_installmanpages')
-rwxr-xr-xdh_installmanpages12
1 files changed, 11 insertions, 1 deletions
diff --git a/dh_installmanpages b/dh_installmanpages
index 7e8eae6a..82681f33 100755
--- a/dh_installmanpages
+++ b/dh_installmanpages
@@ -106,12 +106,22 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
my ($section)=$basename=~m/.*\.([1-9])/;
my $destdir="$TMP/usr/$extdir/man/man$section/";
+
+ # Handle translated man pages.
+ my $instname=$basename;
+ my ($langcode)=$basename=~m/.*\.([a-z][a-z])\.([1-9])/;
+ if (defined $langcode && $langcode ne '') {
+ $destdir="$TMP/usr/$extdir/man/$langcode/man$section/";
+ $instname=~s/\.$langcode\./\./;
+ }
+
$destdir=~tr:/:/:s; # just for looks
+
if (! -e "$destdir/$basename" && !-l "$destdir/$basename") {
if (! -d $destdir) {
doit "install","-d",$destdir;
}
- doit "install","-p","-m644",$page,$destdir;
+ doit "install","-p","-m644",$page,$destdir.$instname;
}
}
}