aboutsummaryrefslogtreecommitdiff
path: root/contrib/ls-config/src/po/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ls-config/src/po/makefile')
-rw-r--r--contrib/ls-config/src/po/makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/ls-config/src/po/makefile b/contrib/ls-config/src/po/makefile
new file mode 100644
index 0000000..0e05bc3
--- /dev/null
+++ b/contrib/ls-config/src/po/makefile
@@ -0,0 +1,34 @@
+DIRS:=$(shell find . -mindepth 1 -maxdepth 1 -name "*.po" -type f | sed -e 's/\(.*\)\..*/\1/')
+PACKAGES = $(DIRS:%=%.lang)
+IPACKAGES = $(DIRS:%=%.inst)
+CPACKAGES = $(DIRS:%=%.cln)
+RPACKAGES = $(DIRS:%=%.remov)
+SHELL := /bin/bash
+
+all: packages
+
+packages: $(PACKAGES)
+
+%.lang: %.po
+ msgmerge -U $< ls-config.pot
+ mkdir -p ../locale/$*/LC_MESSAGES
+ msgfmt -c -v -o ../locale/$*/LC_MESSAGES/ls-config.mo $<
+
+install: $(IPACKAGES)
+
+%.inst:
+ mkdir -p /usr/share/locale/$*/LC_MESSAGES
+ cp -f ../locale/$*/LC_MESSAGES/ls-config.mo /usr/share/locale/$*/LC_MESSAGES
+
+remove: $(RPACKAGES)
+
+%.remov:
+ rm -f /usr/share/locale/$*/LC_MESSAGES/ls-config.mo
+
+clean: $(CPACKAGES) cleandir
+
+%.cln:
+ rm -Rf ../locale/$*
+
+cleandir:
+ rm -Rf ../locale \ No newline at end of file