]> git.donarmstrong.com Git - debhelper.git/commitdiff
r314: * Added support for translated man pages, with a patch from
authorjoey <joey>
Mon, 29 Nov 1999 05:16:29 +0000 (05:16 +0000)
committerjoey <joey>
Mon, 29 Nov 1999 05:16:29 +0000 (05:16 +0000)
Kis Gergely <kisg@lme.linux.hu>. Closes: #51268
* Fixed the undefined value problem in Kis's patch.

dh_installmanpages

index 7e8eae6a59bbd848bbae41833c4e46911b19db31..82681f332437081aaf866a625ed6dd70b9376d37 100755 (executable)
@@ -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;
                        }
                }
        }