cookutils view Makefile @ rev 760
cooker: crontab for the poke button
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 27 23:24:30 2015 +0200 (2015-09-27) |
parents | bb9c69fda562 |
children | 5afd5252a5e7 |
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 cooker $(DESTDIR)$(PREFIX)/bin
26 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin
27 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin
28 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
29 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
30 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
31 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
32 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
33 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
34 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
35 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
36 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
37 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
38 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
40 uninstall-cook:
41 rm -rf \
42 $(DESTDIR)$(PREFIX)/bin/cook \
43 $(DESTDIR)$(PREFIX)/bin/cooker \
44 $(DESTDIR)$(PREFIX)/bin/cookiso \
45 $(DESTDIR)$(PREFIX)/bin/cooklinux \
46 $(DESTDIR)$(PREFIX)/share/cook \
47 $(DESTDIR)/etc/slitaz/cook.* \
48 $(DESTDIR)/var/www/cooker
50 # Libcook
52 install-libcook:
53 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
54 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
56 uninstall-libcook:
57 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
59 # Cross
61 install-cross:
62 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
63 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
64 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
65 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
66 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
67 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
69 uninstall-cross:
70 rm -rf \
71 $(DESTDIR)$(PREFIX)/bin/cross \
72 $(DESTDIR)$(PREFIX)/share/cross \
73 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
75 # i18n
77 pot:
78 xgettext -o po/cook.pot -k_ -k_n -k_p:1,2 -L Shell -cL10n \
79 --copyright-holder="SliTaz Association" \
80 --package-name="Cook" \
81 --package-version="$(VERSION)" \
82 ./cook
84 msgmerge:
85 @for l in $(LINGUAS); do \
86 echo -n "Updating $$l po file."; \
87 msgmerge -U po/$$l.po po/cook.pot; \
88 done;
90 msgfmt:
91 @for l in $(LINGUAS); do \
92 echo "Compiling $$l mo file..."; \
93 mkdir -p po/mo/$$l/LC_MESSAGES; \
94 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
95 done;
97 # Clean source
99 clean:
100 rm -rf po/mo
101 rm -f po/*.mo
102 rm -f po/*.*~
104 help:
105 @echo "make"
106 @echo " install | uninstall - all"
107 @echo " install-cook | uninstall-cook - cook"
108 @echo " install-libcook | uninstall-libcook - libcook"
109 @echo " install-cross | uninstall-cross - cross"
110 @echo " pot | msgmerge | msgfmt | clean - i18n"