slitaz-base-files view Makefile @ rev 337
libtaz.sh: fix behavior of action when it has two or more arguments in form of `action 'Text %s' $var`
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Mar 22 04:32:12 2018 +0200 (2018-03-22) |
parents | 0eb16ee2fcc2 |
children |
line source
1 # Makefile for SliTaz Bugs.
2 #
4 PACKAGE=slitaz-base
5 PREFIX?=/usr
6 LINGUAS?=ca de el es fa fr it ja pl pt_BR ru sv vi zh_CN zh_TW
8 all: help
10 help:
11 @echo "make [pot|msgmerge|msgfmt|install-libtaz|install-msg|install|clean]"
13 # i18n
15 pot:
16 xgettext -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \
17 --copyright-holder="SliTaz" -k -k_ -klgettext -cTranslators \
18 ./rootfs/lib/libtaz.sh
19 xgettext -j -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \
20 --copyright-holder="SliTaz" -k_ -k_n -cTranslators \
21 ./rootfs/usr/lib/slitaz/libpkg.sh \
22 ./rootfs/var/www/cgi-bin/cgi-env.sh \
23 ./rootfs/var/www/cgi-bin/index.cgi \
24 ./rootfs/usr/bin/man
26 msgmerge:
27 @for l in $(LINGUAS); do \
28 echo -n "Updating $$l po file."; \
29 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
30 done;
32 msgfmt:
33 @for l in $(LINGUAS); do \
34 echo "Compiling $$l mo file..."; \
35 mkdir -p po/mo/$$l/LC_MESSAGES; \
36 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
37 done;
39 # Install
41 install-libtaz:
42 install -m 0744 rootfs/lib/libtaz.sh $(DESTDIR)/lib
43 # Strip comments addressed to translators
44 sed -i '/# Translators:/d' $(DESTDIR)/lib/libtaz.sh
45 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
46 install -m 0644 doc/libtaz.txt $(DESTDIR)/usr/share/doc/slitaz
48 install-httphelper:
49 install -m 0744 rootfs/usr/lib/slitaz/httphelper.sh \
50 $(DESTDIR)/usr/lib/slitaz
51 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
52 install -m 0644 doc/httphelper.txt $(DESTDIR)/usr/share/doc/slitaz
54 install-libpkg:
55 install -m 0755 -d $(DESTDIR)/usr/lib/slitaz
56 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
57 install -m 0744 rootfs/usr/lib/slitaz/libpkg.sh \
58 $(DESTDIR)/usr/lib/slitaz
59 install -m 0644 doc/libpkg.txt $(DESTDIR)/usr/share/doc/slitaz
61 install-slitaz:
62 install -m 0755 -d $(DESTDIR)/usr/bin
63 install -m 0755 -d $(DESTDIR)/etc/slitaz
64 install -m 0744 rootfs/usr/bin/slitaz $(DESTDIR)/usr/bin
65 install -m 0644 rootfs/etc/slitaz/slitaz.conf $(DESTDIR)/etc/slitaz
67 install-msg: msgfmt
68 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
69 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
71 install: install-msg
72 cp -a rootfs/* $(DESTDIR)/
73 # strip "man" script
74 sed -i '/^[^#]*$$/,$${s|^\t*||;/^ *#/d;/^$$/d}' $(DESTDIR)/usr/bin/man
75 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
76 cp -a doc/* $(DESTDIR)/usr/share/doc/slitaz
77 chown -R root:root $(DESTDIR)/usr/share/doc/slitaz
79 # Clean source
81 clean:
82 rm -rf po/mo
83 rm -f po/*~
84 rm -f po/*.mo
85 rm -f po/*~ $(PACKAGE)*.tar.gz $(PACKAGE)*.md5