slitaz-tools view Makefile @ rev 805
tinyutils/tazx: config new user X-login with slim or use startx
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Sat Apr 27 17:30:33 2013 +0000 (2013-04-27) |
parents | 81f961f39b06 |
children | 8e208c31ad8e |
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=es_AR el fr pt_BR ru
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 ./boxes/burn-box ./boxes/scp-box
33 @echo "done"
35 tazbox-pot:
36 @echo -n "Generating tazbox pot file... "
37 @xgettext -o po/tazbox/tazbox.pot -L Shell \
38 --package-name="TazBox" ./tazbox/tazbox
39 @echo "done"
41 tazdrop-pot:
42 @echo -n "Generating tazdrop pot file... "
43 @xgettext -o po/tazdrop/tazdrop.pot -L Shell \
44 --package-name="TazDrop" ./tazdrop/tazdrop
45 @echo "done"
47 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot
49 msgmerge:
50 @for p in $(PROJECTS); do \
51 for l in $(LINGUAS); do \
52 if [ -f "po/$$p/$$l.po" ]; then \
53 echo -e "Updating $$p $$l po file.\n"; \
54 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
55 fi; \
56 done; \
57 done;
59 msgfmt:
60 @for p in $(PROJECTS); do \
61 for l in $(LINGUAS); do \
62 if [ -f "po/$$p/$$l.po" ]; then \
63 echo -e "Compiling $$p $$l mo file...\n"; \
64 mkdir -p po/mo/$$l; \
65 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po; \
66 fi; \
67 done; \
68 done;
70 # Installation
72 install: msgfmt
73 install -m 0755 -d $(DESTDIR)/sbin
74 install -m 0755 -d $(DESTDIR)/etc
75 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
76 install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin
77 install -m 0755 -d $(DESTDIR)$(PREFIX)/share
78 cp -a etc $(DESTDIR)/
80 # Licenses
81 cp -a licenses $(DESTDIR)$(PREFIX)/share
83 # /sbin tools.
84 for i in tazlocale tazkeymap tazhw hwsetup; do \
85 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
86 done;
88 # Declare all config files.
89 for file in etc/locale.conf etc/keymap.conf etc/TZ; \
90 do \
91 touch $(DESTDIR)/$$file; \
92 done;
94 # /usr/bin tools.
95 for app in tazx startx history editor browser terminal file-manager decode; \
96 do \
97 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
98 done;
100 # /usr/sbin sound tools.
101 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
102 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
104 # slitaz-tools i18n
105 for l in $(LINGUAS); \
106 do \
107 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
108 install -m 0644 po/mo/$$l/slitaz-tools.mo \
109 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
110 done;
112 # Permissions
113 chmod +x $(DESTDIR)/etc/init.d/*
115 install-boxes:
116 #install -m 0755 -d $(DESTDIR)/etc/wireless
117 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
118 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
119 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
120 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
121 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pixmaps
122 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/slitaz
123 install -m 0755 boxes/* $(DESTDIR)$(PREFIX)/bin
124 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
125 install -m 0755 tinyutils/subox $(DESTDIR)$(PREFIX)/bin
127 # Libs
128 #install -m 0755 lib/*.* $(DESTDIR)$(PREFIX)/lib/slitaz
130 # Desktop files and icons.
131 install -m 0644 applications/* $(DESTDIR)$(PREFIX)/share/applications
132 install -m 0644 pixmaps/* $(DESTDIR)$(PREFIX)/share/pixmaps
134 # Documentation (style is already in slitaz-doc)
135 # cp -a doc/*.html $(DESTDIR)$(PREFIX)/share/doc/slitaz
137 # i18n.
138 for l in $(LINGUAS); \
139 do \
140 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
141 install -m 0644 po/mo/$$l/*box* \
142 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
143 done;
145 # Gksu fake for pcmanfm.
146 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
148 clean:
149 rm -rf po/mo
150 rm -f po/*/*.po~