slitaz-tools view Makefile @ rev 734

tazinst: fix: : Erreur 1 : mkfs. n'est pas install?
author Dominique Corbex <domcox@slitaz.org>
date Wed Apr 25 21:46:48 2012 +0200 (2012-04-25)
parents 9dfa90926bf3
children 96a05e0a165d
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
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 ./tinyutils/scpbox
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 0777 -d $(DESTDIR)/sbin
79 install -m 0777 -d $(DESTDIR)/etc/X11
80 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
81 install -m 0777 -d $(DESTDIR)$(PREFIX)/sbin
82 install -m 0777 -d $(DESTDIR)$(PREFIX)/share
83 cp -a rootfs/etc $(DESTDIR)/
84 chmod +x $(DESTDIR)/etc/init.d/*
85 cp -a rootfs/usr/share/licenses $(DESTDIR)$(PREFIX)/share
86 # /sbin tools.
87 for i in tazlocale tazkeymap tazhw hwsetup; do \
88 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
89 done;
90 # Declare all config files.
91 for file in etc/locale.conf etc/keymap.conf etc/TZ etc/X11/screen.conf; \
92 do \
93 touch $(DESTDIR)/$$file; \
94 done;
95 # /usr/bin tools.
96 for app in tazx startx history editor browser terminal file-manager; \
97 do \
98 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
99 done;
100 # /usr/sbin sound tools.
101 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
102 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
103 # tazinst
104 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/sbin
105 for l in $(LINGUAS); do \
106 for i in `ls po/mo/$$l/tazinst.mo` ; do \
107 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
108 install -m 0644 po/mo/$$l/tazinst.mo \
109 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
110 done \
111 done
112 # slitaz-tools i18n
113 for l in $(LINGUAS); \
114 do \
115 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
116 install -m 0644 po/mo/$$l/slitaz-tools.mo \
117 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
118 done;
120 install-boxes:
121 install -m 0777 -d $(DESTDIR)/etc/wireless
122 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
123 install -m 0777 -d $(DESTDIR)$(PREFIX)/lib/slitaz
124 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
125 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
126 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/pixmaps
127 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/doc
128 install -m 0755 tinyutils/*box $(DESTDIR)$(PREFIX)/bin
129 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
130 # Libs
131 install -m 0755 lib/[a-z]* $(DESTDIR)$(PREFIX)/lib/slitaz
132 # Desktop files, icons and doc.
133 install -m 0644 rootfs/usr/share/applications/* \
134 $(DESTDIR)$(PREFIX)/share/applications
135 install -m 0644 rootfs/usr/share/pixmaps/* \
136 $(DESTDIR)$(PREFIX)/share/pixmaps
137 cp -a doc $(DESTDIR)$(PREFIX)/share/doc/slitaz-tools
138 # i18n.
139 for l in $(LINGUAS); \
140 do \
141 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
142 install -m 0644 po/mo/$$l/*box* \
143 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
144 done;
145 # Default English messages (will move to po)
146 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
147 install -m 0644 messages/en/desktopbox.msg \
148 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
149 # Gksu fake for pcmanfm.
150 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
152 clean:
153 rm -rf po/mo
154 rm -f po/*/*.po~