slitaz-tools view Makefile @ rev 751
tazlocale: display message in new selected locale
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 30 12:31:30 2012 +0200 (2012-04-30) |
parents | cc27e2f27556 |
children | 6e62d41a70d2 |
line source
1 # Makefile for SliTaz tools.
2 # Check the README for more information.
3 #
4 PREFIX?=/usr
5 DOCDIR?=/usr/share/doc
6 DESTDIR?=
8 PROJECTS=slitaz-tools slitaz-boxes tazbox tazinst tazdrop
9 LINGUAS=es_AR fr pt_BR
11 all: msgfmt
13 help:
14 @echo ""
15 @echo "make: pot msgmerge msgfmt install install-boxes clean"
16 @echo ""
18 # i18n.
20 tools-pot:
21 @echo -n "Generating SliTaz Tools pot file... "
22 @xgettext -o po/slitaz-tools/slitaz-tools.pot -L Shell \
23 --package-name="SliTaz Tools" \
24 ./tinyutils/tazlocale ./tinyutils/tazkeymap ./tinyutils/setmixer \
25 ./tinyutils/tazx ./tinyutils/decode
26 @echo "done"
28 boxes-pot:
29 @echo -n "Generating SliTaz Boxes pot file... "
30 @xgettext -o po/slitaz-boxes/slitaz-boxes.pot -L Shell \
31 --package-name="SliTaz Boxes" \
32 ./boxes/wifi-box
33 @echo "done"
34 #./boxes/burn-box
36 tazbox-pot:
37 @echo -n "Generating tazbox pot file... "
38 @xgettext -o po/tazbox/tazbox.pot -L Shell \
39 --package-name="TazBox" ./tazbox/tazbox
40 @echo "done"
42 tazdrop-pot:
43 @echo -n "Generating tazdrop pot file... "
44 @xgettext -o po/tazdrop/tazdrop.pot -L Shell \
45 --package-name="TazDrop" ./tazdrop/tazdrop
46 @echo "done"
48 tazinst-pot:
49 @echo -n "Generating tazinst pot file... "
50 @xgettext -o po/tazinst/tazinst.pot -L Shell \
51 --package-name="Tazinst" ./installer/tazinst
52 @echo "done"
54 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot tazinst-pot
56 msgmerge:
57 @for p in $(PROJECTS); do \
58 for l in $(LINGUAS); do \
59 echo -en "\rUpdating $$p $$l po file."; \
60 [ -f "po/$$p/$$l.po" ] && \
61 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
62 done; \
63 done;
65 msgfmt:
66 @for p in $(PROJECTS); do \
67 for l in $(LINGUAS); do \
68 [ -f "po/$$p/$$l.po" ] && \
69 echo -n "Compiling $$p $$l mo file... " && \
70 mkdir -p po/mo/$$l && \
71 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \
72 echo "done"; \
73 done; \
74 done;
76 # Installation
78 install:
79 install -m 0755 -d $(DESTDIR)/sbin
80 install -m 0755 -d $(DESTDIR)/etc
81 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
82 install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin
83 install -m 0755 -d $(DESTDIR)$(PREFIX)/share
84 cp -a etc $(DESTDIR)/
86 # Licenses
87 cp -a licenses $(DESTDIR)$(PREFIX)/share
89 # /sbin tools.
90 for i in tazlocale tazkeymap tazhw hwsetup; do \
91 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
92 done;
94 # Declare all config files.
95 for file in etc/locale.conf etc/keymap.conf etc/TZ; \
96 do \
97 touch $(DESTDIR)/$$file; \
98 done;
100 # /usr/bin tools.
101 for app in tazx startx history editor browser terminal file-manager; \
102 do \
103 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
104 done;
106 # /usr/sbin sound tools.
107 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
108 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
110 # tazinst
111 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/sbin
112 for l in $(LINGUAS); do \
113 for i in `ls po/mo/$$l/tazinst.mo` ; do \
114 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
115 install -m 0644 po/mo/$$l/tazinst.mo \
116 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
117 done \
118 done
120 # slitaz-tools i18n
121 for l in $(LINGUAS); \
122 do \
123 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
124 install -m 0644 po/mo/$$l/slitaz-tools.mo \
125 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
126 done;
128 # Permissions
129 chmod +x $(DESTDIR)/etc/init.d/*
131 install-boxes:
132 #install -m 0755 -d $(DESTDIR)/etc/wireless
133 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
134 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
135 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
136 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
137 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pixmaps
138 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/slitaz
139 install -m 0755 boxes/* $(DESTDIR)$(PREFIX)/bin
140 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
142 # Libs
143 #install -m 0755 lib/*.* $(DESTDIR)$(PREFIX)/lib/slitaz
145 # Desktop files and icons.
146 install -m 0644 applications/* $(DESTDIR)$(PREFIX)/share/applications
147 install -m 0644 pixmaps/* $(DESTDIR)$(PREFIX)/share/pixmaps
149 # Documentation (style is already in slitaz-doc)
150 cp -a doc/*.html $(DESTDIR)$(PREFIX)/share/doc/slitaz
152 # i18n.
153 for l in $(LINGUAS); \
154 do \
155 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
156 install -m 0644 po/mo/$$l/*box* \
157 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
158 done;
160 # Gksu fake for pcmanfm.
161 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
163 clean:
164 rm -rf po/mo
165 rm -f po/*/*.po~