cookutils view Makefile @ rev 864
cook: normalize file time (again)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jan 11 00:31:18 2017 +0200 (2017-01-11) |
parents | 91d0347ac834 |
children | c6bbdbfdc285 |
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 $(DESTDIR)$(PREFIX)/libexec/cookutils
32 install -m 0644 cook.conf $(DESTDIR)/etc/slitaz
33 install -m 0644 cook.site $(DESTDIR)/etc/slitaz
34 install -m 0644 web/* $(DESTDIR)/var/www/cgi-bin/cooker
35 install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
36 install -m 0644 data/cooklist $(DESTDIR)$(PREFIX)/share/cook
37 install -m 0644 data/receipt $(DESTDIR)$(PREFIX)/share/cook
38 install -m 0644 data/cooktest/* $(DESTDIR)$(PREFIX)/share/cook/cooktest
39 install -m 0644 doc/* $(DESTDIR)$(PREFIX)/share/doc/cookutils
40 install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/cookutils
41 install -m 0755 init.d/cooker $(DESTDIR)/etc/init.d
42 chmod 0755 $(DESTDIR)/var/www/cgi-bin/cooker/*.cgi
43 find $(DESTDIR)$(PREFIX)/libexec/cookutils -type f -exec sed -i "s|@@PREFIX@@|$(PREFIX)|g" \{\} \;
45 uninstall-cook:
46 rm -rf \
47 $(DESTDIR)$(PREFIX)/bin/cook \
48 $(DESTDIR)$(PREFIX)/bin/cooks \
49 $(DESTDIR)$(PREFIX)/bin/fix-desktop-file \
50 $(DESTDIR)$(PREFIX)/bin/cooker \
51 $(DESTDIR)$(PREFIX)/bin/cookiso \
52 $(DESTDIR)$(PREFIX)/bin/cooklinux \
53 $(DESTDIR)$(PREFIX)/libexec/cookutils \
54 $(DESTDIR)$(PREFIX)/share/cook \
55 $(DESTDIR)/etc/slitaz/cook.* \
56 $(DESTDIR)/var/www/cooker
58 # Libcook
60 install-libcook:
61 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz
62 install -m 0755 lib/libcook.sh $(DESTDIR)$(PREFIX)/lib/slitaz
64 uninstall-libcook:
65 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libcook.sh
67 # Cross
69 install-cross:
70 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
71 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/cross
72 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/cookutils
73 install -m 0755 cross $(DESTDIR)$(PREFIX)/bin
74 install -m 0644 doc/cross.txt $(DESTDIR)$(PREFIX)/share/doc/cookutils
75 install -m 0644 data/cross-*.conf $(DESTDIR)$(PREFIX)/share/cross
77 uninstall-cross:
78 rm -rf \
79 $(DESTDIR)$(PREFIX)/bin/cross \
80 $(DESTDIR)$(PREFIX)/share/cross \
81 $(DESTDIR)$(PREFIX)/share/doc/cookutils/cross.txt
83 # i18n
85 pot:
86 xgettext -o po/cook.pot -kaction -ktitle -k_ -k_n -k_p:1,2 -L Shell -cL10n \
87 --copyright-holder="SliTaz Association" \
88 --package-name="Cook" \
89 --package-version="$(VERSION)" \
90 ./cook ./modules.pkgdb
92 msgmerge:
93 @for l in $(LINGUAS); do \
94 echo -n "Updating $$l po file."; \
95 msgmerge -U po/$$l.po po/cook.pot; \
96 done;
98 msgfmt:
99 @for l in $(LINGUAS); do \
100 echo "Compiling $$l mo file..."; \
101 mkdir -p po/mo/$$l/LC_MESSAGES; \
102 msgfmt -o po/mo/$$l/LC_MESSAGES/cook.mo po/$$l.po; \
103 done;
105 # Clean source
107 clean:
108 rm -rf po/mo
109 rm -f po/*.mo
110 rm -f po/*.*~
112 help:
113 @echo "make"
114 @echo " install | uninstall - all"
115 @echo " install-cook | uninstall-cook - cook"
116 @echo " install-libcook | uninstall-libcook - libcook"
117 @echo " install-cross | uninstall-cross - cross"
118 @echo " pot | msgmerge | msgfmt | clean - i18n"