slitaz-tools view Makefile @ rev 759
Add new scp-box
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 02 15:56:39 2012 +0200 (2012-05-02) |
parents | 6e62d41a70d2 |
children | 91dc7e3eab55 |
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 ./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 tazinst-pot:
48 @echo -n "Generating tazinst pot file... "
49 @xgettext -o po/tazinst/tazinst.pot -L Shell \
50 --package-name="Tazinst" ./installer/tazinst
51 @echo "done"
53 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot tazinst-pot
55 msgmerge:
56 @for p in $(PROJECTS); do \
57 for l in $(LINGUAS); do \
58 echo -en "\rUpdating $$p $$l po file."; \
59 [ -f "po/$$p/$$l.po" ] && \
60 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
61 done; \
62 done;
64 msgfmt:
65 @for p in $(PROJECTS); do \
66 for l in $(LINGUAS); do \
67 [ -f "po/$$p/$$l.po" ] && \
68 echo -n "Compiling $$p $$l mo file... " && \
69 mkdir -p po/mo/$$l && \
70 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \
71 echo "done"; \
72 done; \
73 done;
75 # Installation
77 install:
78 install -m 0755 -d $(DESTDIR)/sbin
79 install -m 0755 -d $(DESTDIR)/etc
80 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
81 install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin
82 install -m 0755 -d $(DESTDIR)$(PREFIX)/share
83 cp -a etc $(DESTDIR)/
85 # Licenses
86 cp -a licenses $(DESTDIR)$(PREFIX)/share
88 # /sbin tools.
89 for i in tazlocale tazkeymap tazhw hwsetup; do \
90 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
91 done;
93 # Declare all config files.
94 for file in etc/locale.conf etc/keymap.conf etc/TZ; \
95 do \
96 touch $(DESTDIR)/$$file; \
97 done;
99 # /usr/bin tools.
100 for app in tazx startx history editor browser terminal file-manager; \
101 do \
102 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
103 done;
105 # /usr/sbin sound tools.
106 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
107 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
109 # tazinst
110 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/sbin
111 for l in $(LINGUAS); do \
112 for i in `ls po/mo/$$l/tazinst.mo` ; do \
113 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
114 install -m 0644 po/mo/$$l/tazinst.mo \
115 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
116 done \
117 done
119 # slitaz-tools i18n
120 for l in $(LINGUAS); \
121 do \
122 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
123 install -m 0644 po/mo/$$l/slitaz-tools.mo \
124 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
125 done;
127 # Permissions
128 chmod +x $(DESTDIR)/etc/init.d/*
130 install-boxes:
131 #install -m 0755 -d $(DESTDIR)/etc/wireless
132 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
133 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
134 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
135 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
136 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pixmaps
137 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/slitaz
138 install -m 0755 boxes/* $(DESTDIR)$(PREFIX)/bin
139 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
141 # Libs
142 #install -m 0755 lib/*.* $(DESTDIR)$(PREFIX)/lib/slitaz
144 # Desktop files and icons.
145 install -m 0644 applications/* $(DESTDIR)$(PREFIX)/share/applications
146 install -m 0644 pixmaps/* $(DESTDIR)$(PREFIX)/share/pixmaps
148 # Documentation (style is already in slitaz-doc)
149 cp -a doc/*.html $(DESTDIR)$(PREFIX)/share/doc/slitaz
151 # i18n.
152 for l in $(LINGUAS); \
153 do \
154 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
155 install -m 0644 po/mo/$$l/*box* \
156 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
157 done;
159 # Gksu fake for pcmanfm.
160 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
162 clean:
163 rm -rf po/mo
164 rm -f po/*/*.po~