Install localized man pages from debian/rules
authorGuillem Jover <guillem@debian.org>
Thu, 23 Feb 2012 23:18:18 +0000 (00:18 +0100)
committerGuillem Jover <guillem@debian.org>
Fri, 24 Feb 2012 02:17:59 +0000 (03:17 +0100)
Currently dh_installman does not handle distinct man pages depending on
the full path, it only uses the filename, so the last match wins, which
makes installation of localized man pages to be overridden by the
original version, being that the last one listed.

Move the localized man pages installation to debian/rules, which avoids
a possible debhelper Build-Depends version bump (in case it was made to
support such cases); but most important, it reduces duplication because
the list of localized man pages is based on the original man pages list
found in the .manpages debhelper config files.

Regression introduced in commit d7c001aa6b3d49f1542df05cde60406be2e981ec.

Spotted-by: Raphaƫl Hertzog <hertzog@debian.org>
debian/dpkg-dev.manpages
debian/dpkg.manpages
debian/dselect.manpages
debian/rules

index 5085ff0..abe988f 100644 (file)
@@ -1,58 +1,29 @@
-debian/tmp/usr/share/man/*/*/deb-control.5
 debian/tmp/usr/share/man/*/deb-control.5
-debian/tmp/usr/share/man/*/*/deb-src-control.5
 debian/tmp/usr/share/man/*/deb-src-control.5
-debian/tmp/usr/share/man/*/*/deb-version.5
 debian/tmp/usr/share/man/*/deb-version.5
-debian/tmp/usr/share/man/*/*/deb-substvars.5
 debian/tmp/usr/share/man/*/deb-substvars.5
-debian/tmp/usr/share/man/*/*/deb-origin.5
 debian/tmp/usr/share/man/*/deb-origin.5
-debian/tmp/usr/share/man/*/*/deb-override.5
 debian/tmp/usr/share/man/*/deb-override.5
-debian/tmp/usr/share/man/*/*/deb-extra-override.5
 debian/tmp/usr/share/man/*/deb-extra-override.5
-debian/tmp/usr/share/man/*/*/deb-shlibs.5
 debian/tmp/usr/share/man/*/deb-shlibs.5
-debian/tmp/usr/share/man/*/*/deb-split.5
 debian/tmp/usr/share/man/*/deb-split.5
-debian/tmp/usr/share/man/*/*/deb-symbols.5
 debian/tmp/usr/share/man/*/deb-symbols.5
-debian/tmp/usr/share/man/*/*/deb-triggers.5
 debian/tmp/usr/share/man/*/deb-triggers.5
-debian/tmp/usr/share/man/*/*/deb-old.5
 debian/tmp/usr/share/man/*/deb-old.5
-debian/tmp/usr/share/man/*/*/deb.5
 debian/tmp/usr/share/man/*/deb.5
-debian/tmp/usr/share/man/*/*/dpkg-architecture.1
 debian/tmp/usr/share/man/*/dpkg-architecture.1
-debian/tmp/usr/share/man/*/*/dpkg-buildflags.1
 debian/tmp/usr/share/man/*/dpkg-buildflags.1
-debian/tmp/usr/share/man/*/*/dpkg-buildpackage.1
 debian/tmp/usr/share/man/*/dpkg-buildpackage.1
-debian/tmp/usr/share/man/*/*/dpkg-checkbuilddeps.1
 debian/tmp/usr/share/man/*/dpkg-checkbuilddeps.1
-debian/tmp/usr/share/man/*/*/dpkg-distaddfile.1
 debian/tmp/usr/share/man/*/dpkg-distaddfile.1
-debian/tmp/usr/share/man/*/*/dpkg-genchanges.1
 debian/tmp/usr/share/man/*/dpkg-genchanges.1
-debian/tmp/usr/share/man/*/*/dpkg-gencontrol.1
 debian/tmp/usr/share/man/*/dpkg-gencontrol.1
-debian/tmp/usr/share/man/*/*/dpkg-gensymbols.1
 debian/tmp/usr/share/man/*/dpkg-gensymbols.1
-debian/tmp/usr/share/man/*/*/dpkg-mergechangelogs.1
 debian/tmp/usr/share/man/*/dpkg-mergechangelogs.1
-debian/tmp/usr/share/man/*/*/dpkg-name.1
 debian/tmp/usr/share/man/*/dpkg-name.1
-debian/tmp/usr/share/man/*/*/dpkg-parsechangelog.1
 debian/tmp/usr/share/man/*/dpkg-parsechangelog.1
-debian/tmp/usr/share/man/*/*/dpkg-scanpackages.1
 debian/tmp/usr/share/man/*/dpkg-scanpackages.1
-debian/tmp/usr/share/man/*/*/dpkg-scansources.1
 debian/tmp/usr/share/man/*/dpkg-scansources.1
-debian/tmp/usr/share/man/*/*/dpkg-shlibdeps.1
 debian/tmp/usr/share/man/*/dpkg-shlibdeps.1
-debian/tmp/usr/share/man/*/*/dpkg-source.1
 debian/tmp/usr/share/man/*/dpkg-source.1
-debian/tmp/usr/share/man/*/*/dpkg-vendor.1
 debian/tmp/usr/share/man/*/dpkg-vendor.1
index 17d829c..2df4829 100644 (file)
@@ -1,22 +1,11 @@
-debian/tmp/usr/share/man/*/*/dpkg-deb.1
 debian/tmp/usr/share/man/*/dpkg-deb.1
-debian/tmp/usr/share/man/*/*/dpkg-divert.8
 debian/tmp/usr/share/man/*/dpkg-divert.8
-debian/tmp/usr/share/man/*/*/dpkg-maintscript-helper.1
 debian/tmp/usr/share/man/*/dpkg-maintscript-helper.1
-debian/tmp/usr/share/man/*/*/dpkg-query.1
 debian/tmp/usr/share/man/*/dpkg-query.1
-debian/tmp/usr/share/man/*/*/dpkg-split.1
 debian/tmp/usr/share/man/*/dpkg-split.1
-debian/tmp/usr/share/man/*/*/dpkg-statoverride.8
 debian/tmp/usr/share/man/*/dpkg-statoverride.8
-debian/tmp/usr/share/man/*/*/dpkg-trigger.1
 debian/tmp/usr/share/man/*/dpkg-trigger.1
-debian/tmp/usr/share/man/*/*/dpkg.cfg.5
 debian/tmp/usr/share/man/*/dpkg.cfg.5
-debian/tmp/usr/share/man/*/*/dpkg.1
 debian/tmp/usr/share/man/*/dpkg.1
-debian/tmp/usr/share/man/*/*/start-stop-daemon.8
 debian/tmp/usr/share/man/*/start-stop-daemon.8
-debian/tmp/usr/share/man/*/*/update-alternatives.8
 debian/tmp/usr/share/man/*/update-alternatives.8
index 96e8511..b49942d 100644 (file)
@@ -1,4 +1,2 @@
-debian/tmp/usr/share/man/*/*/dselect.cfg.5
 debian/tmp/usr/share/man/*/dselect.cfg.5
-debian/tmp/usr/share/man/*/*/dselect.1
 debian/tmp/usr/share/man/*/dselect.1
index 7d4df2b..434fe97 100755 (executable)
@@ -79,6 +79,13 @@ ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
                $(CURDIR)/debian/tmp/usr/share/dpkg/cputable
 endif
 
+define dpkg-installmanl10n
+for f in `sed -e 's:\*:*/*:' debian/$(1).manpages`; do \
+       test -e $$f && \
+       install -D $$f `echo $$f | sed -e 's:^debian/tmp:debian/$(1):'`; \
+done
+endef
+
 # Put together the dpkg and dselect packages
 binary-arch: install
        dh_testdir -a
@@ -92,6 +99,8 @@ binary-arch: install
 
        dh_installchangelogs -a ChangeLog*
        dh_installdocs -a
+       $(call dpkg-installmanl10n,dpkg)
+       $(call dpkg-installmanl10n,dselect)
        dh_installman -a
        dh_link -a
        dh_lintian -a
@@ -112,6 +121,7 @@ binary-indep: install
        dh_installcron -i
        dh_installchangelogs -i ChangeLog*
        dh_installdocs -i
+       $(call dpkg-installmanl10n,dpkg-dev)
        dh_installman -i
        dh_link -i
        dh_lintian -i