sup view Makefile @ rev 42

Improvment and fixes after some usage/testing
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 08 00:15:04 2017 +0100 (2017-03-08)
parents 361b8459a302
children 36795f3c1ef3
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:
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/sup
42 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
43 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
44 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/mime/packages
45 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/slitaz
47 install -m 0755 sup $(DESTDIR)$(PREFIX)/bin
48 install -m 0755 libsup.sh $(DESTDIR)$(PREFIX)/lib/slitaz
49 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
50 install -m 0644 data/mime/sup.xml $(DESTDIR)$(PREFIX)/share/mime/packages
52 cp -f README $(DESTDIR)$(PREFIX)/share/doc/slitaz/sup.txt
53 cp -rf sup-demo $(DESTDIR)$(PREFIX)/share/sup
54 cp -rf po/clients/mo/* $(DESTDIR)$(PREFIX)/share/locale
56 # Use DESTDIR for TinyCM install path
57 # Example: make DESTDIR=/home/tux/Public/cgi-bin/tinycm server-install
58 install-server:
59 install -m 0755 -d $(DESTDIR)/plugins
60 install -m 0755 -d $(DESTDIR)/content/sup/packages
61 install -m 0755 -d $(DESTDIR)/content/sup/wok
62 cp -a server/* $(DESTDIR)/plugins
63 chown -R www.www $(DESTDIR)/plugins
64 chown -R www.www $(DESTDIR)/content/sup
66 # Uninstallation
68 uninstall:
69 rm -f $(DESTDIR)$(PREFIX)/bin/sup
70 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libsup.sh
71 rm -rf $(DESTDIR)$(PREFIX)/share/sup
72 rm -f $(DESTDIR)$(PREFIX)/share/applications/sup-*.desktop
73 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/sup-client.mo
75 # Clean
77 clean:
78 rm -rf po/*/*~
79 rm -rf po/*/mo