cookutils view Makefile @ rev 1063
lighttpd/index.cgi: load main page parts asynchronously
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jun 04 11:27:06 2018 +0300 (2018-06-04) |
parents | 51460e8c74d7 |
children | 77291d41f21a |
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)/bin
20 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
21 install -m 0755 -d $(DESTDIR)$(PREFIX)/libexec/cookutils
22 install -m 0755 -d $(DESTDIR)/var/www/cgi-bin/cooker
23 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
24 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cook/cooktest
25 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
26 install -m 0755 uname $(DESTDIR)/bin
27 install -m 0755 cook $(DESTDIR)$(PREFIX)/bin
28 install -m 0755 cooks $(DESTDIR)$(PREFIX)/bin
29 install -m 0755 fix-desktop-file $(DESTDIR)$(PREFIX)/bin
30 install -m 0755 cooker $(DESTDIR)$(PREFIX)/bin
31 install -m 0755 cookiso $(DESTDIR)$(PREFIX)/bin
32 install -m 0755 cooklinux $(DESTDIR)$(PREFIX)/bin
33 install -m 0755 modules/pkgdb \
34 modules/compressor \
35 modules/deps \
36 modules/mk_pkg_receipt \
37 modules/precheck \
38 $(DESTDIR)$(PREFIX)/libexec/cookutils
39 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
40 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
41 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
42 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
43 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
44 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
45 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
46 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
47 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
48 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
49 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
50 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook
52 uninstall-cook:
53 rm -rf \
54 $(DESTDIR)/bin/uname \
55 $(DESTDIR)$(PREFIX)/bin/cook \
56 $(DESTDIR)$(PREFIX)/bin/cooks \
57 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
58 $(DESTDIR)$(PREFIX)/bin/cooker \
59 $(DESTDIR)$(PREFIX)/bin/cookiso \
60 $(DESTDIR)$(PREFIX)/bin/cooklinux \
61 $(DESTDIR)$(PREFIX)/libexec/cookutils \
62 $(DESTDIR)$(PREFIX)/share/cook \
63 $(DESTDIR)/etc/slitaz/cook.* \
64 $(DESTDIR)/var/www/cooker
66 # Libcook
68 install-libcook:
69 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
70 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
72 uninstall-libcook:
73 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
75 # Cross
77 install-cross:
78 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
79 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
80 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
81 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
82 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
83 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
85 uninstall-cross:
86 rm -rf \
87 $(DESTDIR)$(PREFIX)/bin/cross \
88 $(DESTDIR)$(PREFIX)/share/cross \
89 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
91 # i18n
93 pot:
94 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
95 --copyright-holder="SliTaz Association" \
96 --package-name="Cook" \
97 --package-version="$(VERSION)" \
98 ./cook ./modules.pkgdb
100 msgmerge:
101 @for l in $(LINGUAS); do \
102 echo -n "Updating $$l po file."; \
103 msgmerge -U po/$$l.po po/cook.pot; \
104 done;
106 msgfmt:
107 @for l in $(LINGUAS); do \
108 echo "Compiling $$l mo file..."; \
109 mkdir -p po/mo/$$l/LC_MESSAGES; \
110 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
111 done;
113 # Clean source
115 clean:
116 rm -rf po/mo
117 rm -f po/*.mo
118 rm -f po/*.*~
120 help:
121 @echo "make"
122 @echo " install | uninstall - all"
123 @echo " install-cook | uninstall-cook - cook"
124 @echo " install-libcook | uninstall-libcook - libcook"
125 @echo " install-cross | uninstall-cross - cross"
126 @echo " pot | msgmerge | msgfmt | clean - i18n"