cookutils view Makefile @ rev 1141
modules/pack: take care of stuff update dates
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 14 11:52:54 2019 +0200 (2019-07-14) |
parents | 77291d41f21a |
children |
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/pack \
38 modules/precheck \
39 modules/postcheck \
40 modules/langdesc \
41 $(DESTDIR)$(PREFIX)/libexec/cookutils
42 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
43 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
44 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
45 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
46 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
47 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
48 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
49 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
50 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
51 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
52 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
53 sed -i "s|@@PREFIX@@|$(PREFIX)|g" \
54 $(DESTDIR)$(PREFIX)/bin/cook \
55 $(DESTDIR)$(PREFIX)/libexec/cookutils/pack
57 uninstall-cook:
58 rm -rf \
59 $(DESTDIR)/bin/uname \
60 $(DESTDIR)$(PREFIX)/bin/cook \
61 $(DESTDIR)$(PREFIX)/bin/cooks \
62 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
63 $(DESTDIR)$(PREFIX)/bin/cooker \
64 $(DESTDIR)$(PREFIX)/bin/cookiso \
65 $(DESTDIR)$(PREFIX)/bin/cooklinux \
66 $(DESTDIR)$(PREFIX)/libexec/cookutils \
67 $(DESTDIR)$(PREFIX)/share/cook \
68 $(DESTDIR)/etc/slitaz/cook.* \
69 $(DESTDIR)/var/www/cooker
71 # Libcook
73 install-libcook:
74 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
75 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
77 uninstall-libcook:
78 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
80 # Cross
82 install-cross:
83 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
84 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
85 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
86 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
87 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
88 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
90 uninstall-cross:
91 rm -rf \
92 $(DESTDIR)$(PREFIX)/bin/cross \
93 $(DESTDIR)$(PREFIX)/share/cross \
94 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
96 # i18n
98 pot:
99 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
100 --copyright-holder="SliTaz Association" \
101 --package-name="Cook" \
102 --package-version="$(VERSION)" \
103 ./cook ./modules.pkgdb
105 msgmerge:
106 @for l in $(LINGUAS); do \
107 echo -n "Updating $$l po file."; \
108 msgmerge -U po/$$l.po po/cook.pot; \
109 done;
111 msgfmt:
112 @for l in $(LINGUAS); do \
113 echo "Compiling $$l mo file..."; \
114 mkdir -p po/mo/$$l/LC_MESSAGES; \
115 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
116 done;
118 # Clean source
120 clean:
121 rm -rf po/mo
122 rm -f po/*.mo
123 rm -f po/*.*~
125 help:
126 @echo "make"
127 @echo " install | uninstall - all"
128 @echo " install-cook | uninstall-cook - cook"
129 @echo " install-libcook | uninstall-libcook - libcook"
130 @echo " install-cross | uninstall-cross - cross"
131 @echo " pot | msgmerge | msgfmt | clean - i18n"