diff options
author | joey <joey> | 2005-09-22 21:11:54 +0000 |
---|---|---|
committer | joey <joey> | 2005-09-22 21:11:54 +0000 |
commit | e20e5e8e1db7b671e5d712fd3aad1f5294f2da2c (patch) | |
tree | 92462c7faa740850c3129ed501f91965c5961e23 /debian | |
parent | 29add35a30e5b0aeb2d23b3e2d4b7a05c97c535f (diff) |
r1788: * Patch from Valéry Perrin to use po4a for localised manpages. Thanks!
Closes: #328791
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | debian/rules | 21 |
3 files changed, 22 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index b3dccc73..19c0b278 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (4.9.10) unstable; urgency=low + + * Patch from Valéry Perrin to use po4a for localised manpages. Thanks! + Closes: #328791 + + -- Joey Hess <joeyh@debian.org> Thu, 22 Sep 2005 23:11:12 +0200 + debhelper (4.9.9) unstable; urgency=low * dh_shlibdeps: Avoid a use strict warning in some cases if diff --git a/debian/control b/debian/control index 4ce96b23..8f631871 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: devel Priority: optional Maintainer: Joey Hess <joeyh@debian.org> Standards-Version: 3.6.2 +Build-Depends: po4a Package: debhelper Architecture: all diff --git a/debian/rules b/debian/rules index 0258cfe4..a65f74c8 100755 --- a/debian/rules +++ b/debian/rules @@ -6,14 +6,16 @@ # it in to the #LIST# line on the man page fed to it on stdin. Must be passed # parameters of all the executables or pod files to get the synopses from. # (Like I said, this is not a good example of a debhelper rules file..) +# For correct conversion of pod tag (like S< >) #LIST# must be substituted in +# pod file and not in the troff file MAKEMANLIST=perl -e ' \ undef $$/; \ foreach (@ARGV) { \ open (IN, $$_) or die "$$_: $$!"; \ $$file=<IN>; \ close IN; \ - if ($$file=~m/=head1 .*\n\n(.*?) - (.*?)\n/m) { \ - $$collect.=".IP $$1(1)\n$$2\n"; \ + if ($$file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { \ + $$collect.="=item $$1(1)\n\n$$2\n\n"; \ } \ } \ END { \ @@ -32,12 +34,16 @@ POD2MAN=pod2man -c Debhelper -r "$(VERSION)" build: test build-stamp build-stamp: - # Build all the man pages. + # Build all the man pages then generate LIST before convert to man find . -maxdepth 1 -type f -perm +100 -name "dh_*" \ -exec $(POD2MAN) {} {}.1 \; - $(POD2MAN) --section=7 debhelper.pod | \ - $(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` > debhelper.7 + cat debhelper.pod | \ + $(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` | \ + $(POD2MAN) --section=7 > debhelper.7 # Translated pages. + # Generate translated files .pod from <ll>.po and put them in man/<ll> directories + po4a po/po4a.cfg + # Generate dh_*.pod then generate LIST before convert to man set -e; \ for dir in man/*; do \ lang=`basename $$dir`; \ @@ -45,8 +51,9 @@ build-stamp: prog=`basename $$file | sed 's/.pod//'`; \ $(POD2MAN) $$file $$prog.$$lang.1; \ done; \ - $(POD2MAN) --section=7 $$dir/debhelper.pod | \ - $(MAKEMANLIST) `find $$dir -type f -maxdepth 1 -name "dh_*.pod" | sort` > debhelper.$$lang.7; \ + cat $$dir/debhelper.pod | \ + $(MAKEMANLIST) `find $$dir -type f -maxdepth 1 -name "dh_*.pod" | sort` | \ + $(POD2MAN) --section=7 > debhelper.$$lang.7; \ done printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \ |