cookutils view Makefile @ rev 933
cook: fix commands --clean, --getsrc, --block, --unblock; lighttpd/index.cgi: add rich statistics on main page.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Jun 18 15:13:29 2017 +0300 (2017-06-18) |
parents | fd06b19f712b |
children | 4504ab343621 |
line source
1 # Makefile for SliTaz Cooker.
2 #
4 PREFIX ?= /usr
5 DESTDIR ?=
6 LINGUAS ?= fr ja 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)$(PREFIX)/libexec/cookutils
21 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker
22 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest
24 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
25 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin
26 install -m 0755 cooks $(DESTDIR)$(PREFIX)/bin
27 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin
28 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin
29 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin
30 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin
31 install -m 0755 modules/pkgdb \
32 modules/compressor \
33 modules/deps \
34 $(DESTDIR)$(PREFIX)/libexec/cookutils
35 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
36 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
37 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
38 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
39 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
40 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
41 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
42 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
43 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
44 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
45 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
46 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook
48 uninstall-cook:
49 rm -rf \
50 $(DESTDIR)$(PREFIX)/bin/cook \
51 $(DESTDIR)$(PREFIX)/bin/cooks \
52 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
53 $(DESTDIR)$(PREFIX)/bin/cooker \
54 $(DESTDIR)$(PREFIX)/bin/cookiso \
55 $(DESTDIR)$(PREFIX)/bin/cooklinux \
56 $(DESTDIR)$(PREFIX)/libexec/cookutils \
57 $(DESTDIR)$(PREFIX)/share/cook \
58 $(DESTDIR)/etc/slitaz/cook.* \
59 $(DESTDIR)/var/www/cooker
61 # Libcook
63 install-libcook:
64 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
65 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
67 uninstall-libcook:
68 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
70 # Cross
72 install-cross:
73 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
74 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
75 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
76 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
77 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
78 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
80 uninstall-cross:
81 rm -rf \
82 $(DESTDIR)$(PREFIX)/bin/cross \
83 $(DESTDIR)$(PREFIX)/share/cross \
84 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
86 # i18n
88 pot:
89 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
90 --copyright-holder="SliTaz Association" \
91 --package-name="Cook" \
92 --package-version="$(VERSION)" \
93 ./cook ./modules.pkgdb
95 msgmerge:
96 @for l in $(LINGUAS); do \
97 echo -n "Updating $$l po file."; \
98 msgmerge -U po/$$l.po po/cook.pot; \
99 done;
101 msgfmt:
102 @for l in $(LINGUAS); do \
103 echo "Compiling $$l mo file..."; \
104 mkdir -p po/mo/$$l/LC_MESSAGES; \
105 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
106 done;
108 # Clean source
110 clean:
111 rm -rf po/mo
112 rm -f po/*.mo
113 rm -f po/*.*~
115 help:
116 @echo "make"
117 @echo " install | uninstall - all"
118 @echo " install-cook | uninstall-cook - cook"
119 @echo " install-libcook | uninstall-libcook - libcook"
120 @echo " install-cross | uninstall-cross - cross"
121 @echo " pot | msgmerge | msgfmt | clean - i18n"