summaryrefslogtreecommitdiffstats
path: root/tasks/po/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:41:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:41:06 +0000
commitcfa363aeeda6881266b5da46afd478a255ce996e (patch)
treef4a77457d4c8183d324dfd239e4889b975c3718c /tasks/po/Makefile
parentInitial commit. (diff)
downloadtasksel-cfa363aeeda6881266b5da46afd478a255ce996e.tar.xz
tasksel-cfa363aeeda6881266b5da46afd478a255ce996e.zip
Adding upstream version 3.53.upstream/3.53upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tasks/po/Makefile')
-rw-r--r--tasks/po/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/tasks/po/Makefile b/tasks/po/Makefile
new file mode 100644
index 0000000..6456180
--- /dev/null
+++ b/tasks/po/Makefile
@@ -0,0 +1,36 @@
+DOMAIN = debian-tasks
+POTFILE = $(DOMAIN).pot
+MOS:=$(addsuffix .mo, $(LANGS))
+
+all: $(POTFILE) $(MOS)
+ touch build_stamp
+
+$(POTFILE): ../../$(DOMAIN).desc
+ sed -e 's/^Description:/_&/' ../../$(DOMAIN).desc | \
+ perl -ne 'BEGIN {$$/="\n\n"}; print unless /Section: l10n/' > $(DOMAIN).desc
+ PODEBCONF_HEADER=/dev/null debconf-updatepo --podir=.
+ mv templates.pot $(POTFILE)-update
+ if test -f $(POTFILE); then \
+ if diff -I '^"POT-Creation-Date:' -I '^Report-Msgid-Bugs-To:' $(POTFILE) $(POTFILE)-update >/dev/null 2>&1; then \
+ rm -f $(POTFILE)-update; \
+ else \
+ rm -f $(POTFILE); \
+ mv $(POTFILE)-update $(POTFILE); \
+ fi; \
+ else \
+ mv $(POTFILE)-update $(POTFILE); \
+ fi
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+clean:
+ -rm -f build_stamp
+ -rm -f $(DOMAIN).desc
+ -rm -f *.mo
+
+update: $(addprefix update-, $(LANGS))
+
+update-%: %.po $(POTFILE)
+ mv $< $<.bak
+ msgmerge $<.bak $(POTFILE) > $<