slitaz-tools view Makefile @ rev 635
tazx: line wrape
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Jun 16 20:37:04 2011 +0200 (2011-06-16) |
parents | b8be57e0e90b |
children | 04f34d2e0930 |
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=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 pot: tools-pot boxes-pot tazbox-pot tazdrop-pot
49 msgmerge:
50 @for p in $(PROJECTS); do \
51 for l in $(LINGUAS); do \
52 echo -en "\rUpdating $$p $$l po file."; \
53 [ -f "po/$$p/$$l.po" ] && \
54 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
55 done; \
56 done;
58 msgfmt:
59 @for p in $(PROJECTS); do \
60 for l in $(LINGUAS); do \
61 [ -f "po/$$p/$$l.po" ] && \
62 echo -n "Compiling $$p $$l mo file... " && \
63 mkdir -p po/mo/$$l && \
64 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po && \
65 echo "done"; \
66 done; \
67 done;
69 # Installation
71 install:
72 install -m 0777 -d $(DESTDIR)/sbin
73 install -m 0777 -d $(DESTDIR)/etc/X11
74 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
75 install -m 0777 -d $(DESTDIR)$(PREFIX)/sbin
76 install -m 0777 -d $(DESTDIR)$(PREFIX)/share
77 cp -a rootfs/etc $(DESTDIR)
78 chmod +x $(DESTDIR)/etc/init.d/*
79 cp -a rootfs/usr/share/licenses $(DESTDIR)$(PREFIX)/share
80 # /sbin tools.
81 for i in tazlocale tazkeymap tazhw hwsetup; do \
82 install -m 0755 tinyutils/$$i $(DESTDIR)/sbin; \
83 done;
84 # Declare all config files.
85 for file in etc/locale.conf etc/keymap.conf etc/TZ etc/X11/screen.conf; \
86 do \
87 touch $(DESTDIR)/$$file; \
88 done;
89 # /usr/bin tools.
90 for app in tazx startx history editor browser terminal file-manager; \
91 do \
92 install -m 0755 tinyutils/$$app $(DESTDIR)$(PREFIX)/bin; \
93 done;
94 # /usr/sbin sound tools.
95 install -m 0755 tinyutils/soundconf $(DESTDIR)$(PREFIX)/sbin
96 install -m 0755 tinyutils/setmixer $(DESTDIR)$(PREFIX)/sbin
97 # Installer's
98 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
99 install -m 0755 installer/slitaz-installer $(DESTDIR)$(PREFIX)/bin
100 install -m 0755 installer/tazinst $(DESTDIR)$(PREFIX)/bin
101 install -m 0644 messages/en/installer.msg \
102 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
104 install-boxes:
105 install -m 0777 -d $(DESTDIR)/etc/wireless
106 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
107 install -m 0777 -d $(DESTDIR)$(PREFIX)/lib/slitaz
108 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
109 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
110 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/pixmaps
111 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/doc
112 install -m 0755 tinyutils/*box $(DESTDIR)$(PREFIX)/bin
113 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
114 # Libs
115 install -m 0755 lib/[a-z]* $(DESTDIR)$(PREFIX)/lib/slitaz
116 # Desktop files, icons and doc.
117 install -m 0644 rootfs/usr/share/applications/* \
118 $(DESTDIR)$(PREFIX)/share/applications
119 install -m 0644 rootfs/usr/share/pixmaps/* \
120 $(DESTDIR)$(PREFIX)/share/pixmaps
121 cp -a doc $(DESTDIR)$(PREFIX)/share/doc/slitaz-tools
122 # i18n
123 for l in $(LINGUAS); \
124 do \
125 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
126 install -m 0644 po/mo/$$l/* \
127 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
128 done;
129 # Default English messages (will move to po)
130 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
131 install -m 0644 messages/en/desktopbox.msg \
132 $(DESTDIR)$(PREFIX)/share/slitaz/messages/en
133 # Gksu fake for pcmanfm.
134 cd $(DESTDIR)$(PREFIX)/bin && ln -s subox gksu
136 clean:
137 rm -rf po/mo
138 rm -f po/*/*.po~