cookutils view Makefile @ rev 822
cooker.cgi: add source link
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jul 26 21:39:56 2016 +0200 (2016-07-26) |
parents | 5afd5252a5e7 |
children | 9dc64af5ba9c |
line source
1 # Makefile for SliTaz Cooker.
2 #
4 PREFIX?=/usr
5 DESTDIR?=
6 LINGUAS?=pt_BR ru zh_CN zh_TW
7 VERSION:=$(shell grep ^VERSION cook | cut -d'=' -f2)
9 all:
11 install: install-cook install-libcook install-cross
12 uninstall: uninstall-cook uninstall-libcook uninstall-cross
14 # Cook
16 install-cook:
17 install -m 0755 -d $(DESTDIR)/etc/slitaz
18 install -m 0755 -d $(DESTDIR)/etc/init.d
19 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
20 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker
21 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest
23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
24 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin
25 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin
26 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin
27 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin
28 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin
29 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
30 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
31 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
32 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
33 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
34 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
35 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
36 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
37 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
38 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
39 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
41 uninstall-cook:
42 rm -rf \
43 $(DESTDIR)$(PREFIX)/bin/cook \
44 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
45 $(DESTDIR)$(PREFIX)/bin/cooker \
46 $(DESTDIR)$(PREFIX)/bin/cookiso \
47 $(DESTDIR)$(PREFIX)/bin/cooklinux \
48 $(DESTDIR)$(PREFIX)/share/cook \
49 $(DESTDIR)/etc/slitaz/cook.* \
50 $(DESTDIR)/var/www/cooker
52 # Libcook
54 install-libcook:
55 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
56 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
58 uninstall-libcook:
59 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
61 # Cross
63 install-cross:
64 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
65 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
66 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
67 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
68 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
69 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
71 uninstall-cross:
72 rm -rf \
73 $(DESTDIR)$(PREFIX)/bin/cross \
74 $(DESTDIR)$(PREFIX)/share/cross \
75 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
77 # i18n
79 pot:
80 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
81 --copyright-holder="SliTaz Association" \
82 --package-name="Cook" \
83 --package-version="$(VERSION)" \
84 ./cook
86 msgmerge:
87 @for l in $(LINGUAS); do \
88 echo -n "Updating $$l po file."; \
89 msgmerge -U po/$$l.po po/cook.pot; \
90 done;
92 msgfmt:
93 @for l in $(LINGUAS); do \
94 echo "Compiling $$l mo file..."; \
95 mkdir -p po/mo/$$l/LC_MESSAGES; \
96 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
97 done;
99 # Clean source
101 clean:
102 rm -rf po/mo
103 rm -f po/*.mo
104 rm -f po/*.*~
106 help:
107 @echo "make"
108 @echo " install | uninstall - all"
109 @echo " install-cook | uninstall-cook - cook"
110 @echo " install-libcook | uninstall-libcook - libcook"
111 @echo " install-cross | uninstall-cross - cross"
112 @echo " pot | msgmerge | msgfmt | clean - i18n"