some packages updated.
[vuplus_openvuplus] / meta-openvuplus / recipes-vuplus / enigma2 / enigma2-plugins / Makefile.am
1 #
2 # to use this for the localisation of other plugins,
3 # just change the DOMAIN to the name of the Plugin.
4 # It is assumed, that the domain ist the same as
5 # the directory name of the plugin.
6 #
7
8 DOMAIN=EasyMedia
9 installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)
10 #GETTEXT=./pygettext.py
11 GETTEXT=xgettext
12
13 #MSGFMT = ./msgfmt.py
14 MSGFMT = msgfmt
15
16 LANGS := de it nl
17 LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
18 LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
19
20 default: $(DOMAIN).pot $(LANGPO) merge $(LANGMO)
21         for lang in $(LANGS); do \
22                 mkdir -p $$lang/LC_MESSAGES; \
23                 cp $$lang.mo $$lang/LC_MESSAGES/$(DOMAIN).mo; \
24         done
25
26 merge:
27         #for lang in $(LANGS); do msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; done
28
29
30 # the TRANSLATORS: allows putting translation comments before the to-be-translated line.
31 $(DOMAIN).pot:
32         $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
33         for lang in $(LANGS); do msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; done
34         msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
35         $(RM) $(DOMAIN).pot
36         mv $(DOMAIN)uniq.pot $(DOMAIN).pot
37
38 .PHONY: $(DOMAIN).pot
39
40
41 %.mo: %.po
42         $(MSGFMT) -o $@ $<
43
44 %.po:
45         msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
46
47 CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
48
49 clean-local:
50         $(RM) -r $(LANGS)
51
52 install-data-am: default
53         for lang in $(LANGS); do \
54                 mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
55                 cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
56         done