cookutils view Makefile @ rev 1011
...and fresh bugfix: correctly display unpackaged files on the 'files' page
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Nov 22 20:06:06 2017 +0200 (2017-11-22) |
parents | 9a70c8fdc40c |
children | 51460e8c74d7 |
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 modules/mk_pkg_receipt \
35 $(DESTDIR)$(PREFIX)/libexec/cookutils
36 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
37 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
38 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
39 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
40 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
41 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
42 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
43 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
44 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
45 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
46 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
47 sed -i "s|@@PREFIX@@|$(PREFIX)|g" $(DESTDIR)$(PREFIX)/bin/cook
49 uninstall-cook:
50 rm -rf \
51 $(DESTDIR)$(PREFIX)/bin/cook \
52 $(DESTDIR)$(PREFIX)/bin/cooks \
53 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
54 $(DESTDIR)$(PREFIX)/bin/cooker \
55 $(DESTDIR)$(PREFIX)/bin/cookiso \
56 $(DESTDIR)$(PREFIX)/bin/cooklinux \
57 $(DESTDIR)$(PREFIX)/libexec/cookutils \
58 $(DESTDIR)$(PREFIX)/share/cook \
59 $(DESTDIR)/etc/slitaz/cook.* \
60 $(DESTDIR)/var/www/cooker
62 # Libcook
64 install-libcook:
65 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
66 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
68 uninstall-libcook:
69 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
71 # Cross
73 install-cross:
74 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
75 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
76 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
77 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
78 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
79 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
81 uninstall-cross:
82 rm -rf \
83 $(DESTDIR)$(PREFIX)/bin/cross \
84 $(DESTDIR)$(PREFIX)/share/cross \
85 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
87 # i18n
89 pot:
90 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
91 --copyright-holder="SliTaz Association" \
92 --package-name="Cook" \
93 --package-version="$(VERSION)" \
94 ./cook ./modules.pkgdb
96 msgmerge:
97 @for l in $(LINGUAS); do \
98 echo -n "Updating $$l po file."; \
99 msgmerge -U po/$$l.po po/cook.pot; \
100 done;
102 msgfmt:
103 @for l in $(LINGUAS); do \
104 echo "Compiling $$l mo file..."; \
105 mkdir -p po/mo/$$l/LC_MESSAGES; \
106 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
107 done;
109 # Clean source
111 clean:
112 rm -rf po/mo
113 rm -f po/*.mo
114 rm -f po/*.*~
116 help:
117 @echo "make"
118 @echo " install | uninstall - all"
119 @echo " install-cook | uninstall-cook - cook"
120 @echo " install-libcook | uninstall-libcook - libcook"
121 @echo " install-cross | uninstall-cross - cross"
122 @echo " pot | msgmerge | msgfmt | clean - i18n"