Przeglądaj źródła

man: Honour LINGUAS environment variable when installing translations

Users should be able to choose which locales to install by setting the
environment variable LINGUAS, or passing it as a make argument. Honour
the user setting and introduce a new LINGUAS_DIST to avoid undesired
behaviour on “make dist”.

Reported-by: Yuri Vasilevski <yvasilev@gentoo.org>
Guillem Jover 16 lat temu
rodzic
commit
4f4f2cbd86
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 1 0
      debian/changelog
  2. 5 2
      man/Makefile.am

+ 1 - 0
debian/changelog

@@ -177,6 +177,7 @@ dpkg (1.15.6) UNRELEASED; urgency=low
   * Document “dpkg-query -l” abbreviated state information in the man page.
     Based on a patch by Marc-Jano Knopp <pub_br_debian.org@marc-jano.de>.
     Closes: #383869
+  * Honour LINGUAS environment variable when installing translated man pages.
 
   [ Modestas Vainius ]
   * Implement symbol patterns (Closes: #563752). From now on, it is possible to

+ 5 - 2
man/Makefile.am

@@ -36,7 +36,10 @@ update-po:
 	$(PO4A) $(PO4A_BUILD_OPTS) --force po/po4a.cfg
 
 # Extract the list of languages from the po4a config file.
-LINGUAS = `sed -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg`
+LINGUAS_DIST = `sed -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg`
+
+# If the user has not defined it let's use the default.
+LINGUAS ?= $(LINGUAS_DIST)
 
 install-data-local: install-data-local-@USE_PO4A@
 
@@ -74,7 +77,7 @@ uninstall-local-yes:
 
 dist-hook: man.stamp
 	cp $(srcdir)/man.stamp $(distdir)/
-	for lang in $(LINGUAS); do \
+	for lang in $(LINGUAS_DIST); do \
 		cp $(srcdir)/po/$$lang.po $(distdir)/po; \
 		cp $(srcdir)/po/$$lang.add $(distdir)/po; \
 		$(mkdir_p) $(distdir)/$$lang; \