cookutils view Makefile @ rev 893

web/cooker.cgi: work with HTTP headers "Last-Modified", "If-Modified-Since", "HTTP 304 Not Modified", "HTTP 404 Not Found". Other small improvements.
SliTaz Next Cooker is working right now with this version of cooker.cgi.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 20 05:12:29 2017 +0200 (2017-03-20)
parents c6bbdbfdc285
children 9a70c8fdc40c
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 modules/compressor \
32 $(DESTDIR)$(PREFIX)/libexec/cookutils
33 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
34 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
35 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
36 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
37 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
38 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
39 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
40 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
41 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
42 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
43 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
44 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook
46 uninstall-cook:
47 rm -rf \
48 $(DESTDIR)$(PREFIX)/bin/cook \
49 $(DESTDIR)$(PREFIX)/bin/cooks \
50 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
51 $(DESTDIR)$(PREFIX)/bin/cooker \
52 $(DESTDIR)$(PREFIX)/bin/cookiso \
53 $(DESTDIR)$(PREFIX)/bin/cooklinux \
54 $(DESTDIR)$(PREFIX)/libexec/cookutils \
55 $(DESTDIR)$(PREFIX)/share/cook \
56 $(DESTDIR)/etc/slitaz/cook.* \
57 $(DESTDIR)/var/www/cooker
59 # Libcook
61 install-libcook:
62 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
63 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
65 uninstall-libcook:
66 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
68 # Cross
70 install-cross:
71 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
72 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
73 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
74 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
75 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
76 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
78 uninstall-cross:
79 rm -rf \
80 $(DESTDIR)$(PREFIX)/bin/cross \
81 $(DESTDIR)$(PREFIX)/share/cross \
82 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
84 # i18n
86 pot:
87 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
88 --copyright-holder="SliTaz Association" \
89 --package-name="Cook" \
90 --package-version="$(VERSION)" \
91 ./cook ./modules.pkgdb
93 msgmerge:
94 @for l in $(LINGUAS); do \
95 echo -n "Updating $$l po file."; \
96 msgmerge -U po/$$l.po po/cook.pot; \
97 done;
99 msgfmt:
100 @for l in $(LINGUAS); do \
101 echo "Compiling $$l mo file..."; \
102 mkdir -p po/mo/$$l/LC_MESSAGES; \
103 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
104 done;
106 # Clean source
108 clean:
109 rm -rf po/mo
110 rm -f po/*.mo
111 rm -f po/*.*~
113 help:
114 @echo "make"
115 @echo " install | uninstall - all"
116 @echo " install-cook | uninstall-cook - cook"
117 @echo " install-libcook | uninstall-libcook - libcook"
118 @echo " install-cross | uninstall-cross - cross"
119 @echo " pot | msgmerge | msgfmt | clean - i18n"