slitaz-tools view Makefile @ rev 878
tazbox: add icons to the buttons (Yad 0.26 supports custom icons)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri May 02 20:02:16 2014 +0000 (2014-05-02) |
parents | 4bdf432f7525 |
children | a056a0139188 |
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 tazdrop
9 LINGUAS=el es fr pl pt_BR ru sv
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 -k_ -k_n \
23 --package-name="SliTaz Tools" \
24 ./tinyutils/tazlocale ./tinyutils/tazkeymap ./tinyutils/setmixer \
25 ./tinyutils/tazx ./tinyutils/decode ./tinyutils/terminal \
26 ./tinyutils/hwsetup ./tinyutils/frugal
27 @echo "done"
29 boxes-pot:
30 @echo -n "Generating SliTaz Boxes pot file... "
31 @xgettext -o po/slitaz-boxes/slitaz-boxes.pot -L Shell -k_ -k_n \
32 --package-name="SliTaz Boxes" \
33 ./boxes/wifi-box ./boxes/burn-box ./boxes/scp-box
34 @echo "done"
36 tazbox-pot:
37 @echo -n "Generating tazbox pot file... "
38 @xgettext -o po/tazbox/tazbox.pot -L Shell -k -k_ -k_n \
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 -k_ -k_n \
45 --package-name="TazDrop" ./tazdrop/tazdrop
46 @echo "done"
48 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot
50 msgmerge:
51 @for p in $(PROJECTS); do \
52 for l in $(LINGUAS); do \
53 if [ -f "po/$$p/$$l.po" ]; then \
54 echo "Updating $$p $$l po file."; \
55 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
56 fi; \
57 done; \
58 done;
60 msgfmt:
61 @for p in $(PROJECTS); do \
62 for l in $(LINGUAS); do \
63 if [ -f "po/$$p/$$l.po" ]; then \
64 echo -e "Compiling $$p $$l mo file...\n"; \
65 mkdir -p po/mo/$$l; \
66 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po; \
67 fi; \
68 done; \
69 done;
71 # Installation
73 install: msgfmt
74 install -m 0755 -d $(DESTDIR)/sbin
75 install -m 0755 -d $(DESTDIR)/etc
76 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
77 install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin
78 install -m 0755 -d $(DESTDIR)$(DOCDIR)/slitaz
79 cp -a etc $(DESTDIR)/
81 # Licenses
82 cp -a licenses $(DESTDIR)$(PREFIX)/share
84 # /sbin tools.
85 for i in slitaz-config tazlocale tazkeymap tazhw hwsetup; do \
86 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
87 done;
89 # Declare all config files.
90 for file in etc/locale.conf etc/keymap.conf etc/TZ; \
91 do \
92 touch $(DESTDIR)/$$file; \
93 done;
95 # /usr/bin tools.
96 for app in tazx startx history editor browser terminal file-manager \
97 decode frugal startd stopd; \
98 do \
99 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
100 done;
102 # /usr/sbin sound tools.
103 #install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
104 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
106 # slitaz-tools i18n
107 for l in $(LINGUAS); \
108 do \
109 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
110 install -m 0644 po/mo/$$l/slitaz-tools.mo \
111 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
112 done;
114 # Documentation
115 cp doc/post-install.txt $(DESTDIR)$(DOCDIR)/slitaz
116 # Permissions
117 chmod +x $(DESTDIR)/etc/init.d/*
119 install-boxes:
120 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
121 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
122 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
123 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pixmaps
124 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/zoneinfo
126 install -m 0755 boxes/* $(DESTDIR)$(PREFIX)/bin
127 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
128 install -m 0755 tinyutils/subox $(DESTDIR)$(PREFIX)/bin
129 install -m 0644 tazbox/iso3166-1.tab $(DESTDIR)$(PREFIX)/share/zoneinfo
130 install -m 0644 tazbox/zone-mini.tab $(DESTDIR)$(PREFIX)/share/zoneinfo
132 # Desktop files and icons.
133 install -m 0644 applications/* $(DESTDIR)$(PREFIX)/share/applications
134 install -m 0644 pixmaps/* $(DESTDIR)$(PREFIX)/share/pixmaps
136 # i18n.
137 for l in $(LINGUAS); \
138 do \
139 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
140 install -m 0644 po/mo/$$l/*box* \
141 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
142 done;
144 # Gksu fake for pcmanfm.
145 cd $(DESTDIR)$(PREFIX)/bin && ln -fs subox gksu
147 clean:
148 rm -rf po/mo
149 rm -f po/*/*.po~