summaryrefslogtreecommitdiff
path: root/qt-kde-team/2/l10n-packages.mk
diff options
context:
space:
mode:
Diffstat (limited to 'qt-kde-team/2/l10n-packages.mk')
-rw-r--r--qt-kde-team/2/l10n-packages.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/qt-kde-team/2/l10n-packages.mk b/qt-kde-team/2/l10n-packages.mk
new file mode 100644
index 0000000..25a86f1
--- /dev/null
+++ b/qt-kde-team/2/l10n-packages.mk
@@ -0,0 +1,21 @@
+# Fill a kde-l10n:all substvar for all packages, allowing an easy Breaks/Replaces when KF5 packages ship translations files anew
+
+l10npkgs_pkgs := $(shell dh_listpackages)
+l10npkgs_subst_hooks := $(foreach t,binary-indep binary-arch binary,pre_$(t)_dh_gencontrol)
+
+ifneq (,$(l10npkgs_add_l10n_substvar))
+
+l10npkgs_prefix := kde-l10n
+l10npkgs_fixed_version_comma := (<< 4:5),
+l10npkgs_langs := ar bg bs ca cavalencia cs da de el engb es et eu fa fi fr ga gl he hi hr hu ia id is it ja kk km ko lt lv mr nb nds nl nn pa pl pt ptbr ro ru sk sl sr sv tr ug uk wa zhcn zhtw
+l10npkgs_packages_rels := $(patsubst %,$(l10npkgs_prefix)-% $(l10npkgs_fixed_version_comma),$(l10npkgs_langs))
+
+l10npkgs_add_l10n_substvar:
+ echo 'kde-l10n:all=$(l10npkgs_packages_rels)' | \
+ tee -a $(foreach pkg,$(l10npkgs_pkgs),debian/$(pkg).substvars) > /dev/null
+
+$(l10npkgs_subst_hooks): l10npkgs_add_l10n_substvar
+.PHONY: l10npkgs_add_l10n_substvar
+
+endif
+