slitaz-tools view Makefile @ rev 908
text-mode default apps: detect $XAUTHORITY and run "terminal -e" ; tazbox: add qupzilla, mcedit and others
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Thu Oct 02 21:13:05 2014 +0000 (2014-10-02) |
parents | b7a12d5e476b |
children | eb791cfb71c0 |
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 fa fr pl pt_BR ru sv zh_CN zh_TW
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:
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; do \
91 touch $(DESTDIR)/$$file; \
92 done;
94 # /usr/bin tools.
95 for app in tazx startx history editor browser terminal file-manager \
96 decode frugal startd stopd; 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); do \
106 if [ -f "po/mo/$$l/slitaz-tools.mo" ]; then \
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 fi; \
111 done;
113 # Documentation
114 cp doc/post-install.txt $(DESTDIR)$(DOCDIR)/slitaz
115 # Permissions
116 chmod +x $(DESTDIR)/etc/init.d/*
118 install-boxes:
119 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
120 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
121 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
122 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pixmaps
123 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/zoneinfo
125 install -m 0755 boxes/* $(DESTDIR)$(PREFIX)/bin
126 install -m 0755 tazbox/tazbox $(DESTDIR)$(PREFIX)/bin
127 install -m 0755 tinyutils/subox $(DESTDIR)$(PREFIX)/bin
129 # Desktop files and icons.
130 install -m 0644 applications/* $(DESTDIR)$(PREFIX)/share/applications
131 install -m 0644 pixmaps/* $(DESTDIR)$(PREFIX)/share/pixmaps
133 # i18n.
134 for l in $(LINGUAS); do \
135 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
136 install -m 0644 po/mo/$$l/*box* \
137 $(DESTDIR)$(PREFIX)/share/locale/$$l/LC_MESSAGES; \
138 done;
140 # Gksu fake for pcmanfm.
141 cd $(DESTDIR)$(PREFIX)/bin && ln -fs subox gksu
143 clean:
144 rm -rf po/mo
145 rm -f po/*/*.po~