sup view Makefile @ rev 6

Add sup and libsup.sh (for beta testing/playing)
author Christophe Lincoln <pankso@slitaz.org>
date Fri Feb 24 07:10:28 2017 +0100 (2017-02-24)
parents
children 215207fd9eeb
line source
1 # Makefile for SliTaz User Packages
2 #
4 PREFIX?=/usr
5 CGI_BIN?=/var/www/cgi-bin
6 DESTDIR?=
7 LINGUAS?=fr
9 all: msgfmt
11 # i18n.
13 pot:
14 xgettext -o po/clients/sup-clients.pot -L Shell \
15 --package-name="Sup Clients" \
16 ./sup ./libsup.sh
18 msgmerge:
19 @for l in $(LINGUAS); do \
20 if [ -f "po/clients/$$l.po" ]; then \
21 echo -n "Updating $$l po file."; \
22 msgmerge -U po/clients/$$l.po po/clients/sup-clients.pot ; \
23 fi;\
24 done;
26 msgfmt:
27 @for l in $(LINGUAS); do \
28 if [ -f "po/clients/$$l.po" ]; then \
29 echo "Compiling sup clients $$l mo file..."; \
30 mkdir -p po/clients/mo/$$l/LC_MESSAGES; \
31 msgfmt -o po/clients/mo/$$l/LC_MESSAGES/sup-clients.mo \
32 po/clients/$$l.po ; \
33 fi;\
34 done;
36 # Installation
38 install-clients:
39 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
40 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
41 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
42 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
43 install -m 0755 sup $(DESTDIR)$(PREFIX)/bin
44 install -m 0755 libsup.sh $(DESTDIR)$(PREFIX)/lib/slitaz
45 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
46 cp -rf po/clients/mo/* $(DESTDIR)$(PREFIX)/share/locale
47 # Demo & skeleton
48 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/sup/wok
49 cp -rf wok/sup-demo $(DESTDIR)$(PREFIX)/share/sup/wok
50 cp -rf wok/sup-skel $(DESTDIR)$(PREFIX)/share/sup/wok
52 # Use DESTDIR for TinyCM install path
53 # Example: make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
54 install-server:
55 install -m 0755 -d $(DESTDIR)/plugins
56 install -m 0755 -d $(DESTDIR)/content/sup/packages
57 install -m 0755 -d $(DESTDIR)/content/sup/wok
58 cp -a server/* $(DESTDIR)/plugins
59 chown -R www.www $(DESTDIR)/plugins
60 chown -R www.www $(DESTDIR)/content/sup
62 # Uninstallation
64 uninstall-clients:
65 rm -f $(DESTDIR)$(PREFIX)/bin/sup
66 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libsup.sh
67 rm -f $(DESTDIR)$(PREFIX)/share/applications/sup-*.desktop
68 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/sup-client.mo
70 # Clean
72 clean:
73 rm -rf po/*/*~
74 rm -rf po/*/mo