slitaz-base-files view Makefile @ rev 292

Updated man & its translations
author Lucas Levrel <llevrel@yahoo.fr>
date Tue Dec 29 23:16:36 2015 +0100 (2015-12-29)
parents dad2794d3639
children a799a0c177f3
line source
1 # Makefile for SliTaz Bugs.
2 #
4 PACKAGE=slitaz-base
5 PREFIX?=/usr
6 LINGUAS?=el es fa fr pl pt_BR ru sv 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 -klgettext \
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 \
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 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
44 install -m 0644 doc/libtaz.txt $(DESTDIR)/usr/share/doc/slitaz
46 install-httphelper:
47 install -m 0744 rootfs/usr/lib/slitaz/httphelper.sh \
48 $(DESTDIR)/usr/lib/slitaz
49 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
50 install -m 0644 doc/httphelper.txt $(DESTDIR)/usr/share/doc/slitaz
52 install-libpkg:
53 install -m 0755 -d $(DESTDIR)/usr/lib/slitaz
54 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
55 install -m 0744 rootfs/usr/lib/slitaz/libpkg.sh \
56 $(DESTDIR)/usr/lib/slitaz
57 install -m 0644 doc/libpkg.txt $(DESTDIR)/usr/share/doc/slitaz
59 install-slitaz:
60 install -m 0755 -d $(DESTDIR)/usr/bin
61 install -m 0755 -d $(DESTDIR)/etc/slitaz
62 install -m 0744 rootfs/usr/bin/slitaz $(DESTDIR)/usr/bin
63 install -m 0644 rootfs/etc/slitaz/slitaz.conf $(DESTDIR)/etc/slitaz
65 install-msg: msgfmt
66 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
67 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
69 install: install-msg
70 cp -a rootfs/* $(DESTDIR)/
71 # strip "man" script
72 sed -i '/^[^#]*$/,${s|^\t*||;/^ *#/d;/^$/d}' $(DESTDIR)/usr/bin/man
73 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
74 cp -a doc/* $(DESTDIR)/usr/share/doc/slitaz
75 chown -R root:root $(DESTDIR)/usr/share/doc/slitaz
77 # Clean source
79 clean:
80 rm -rf po/mo
81 rm -f po/*~ $(PACKAGE)*.tar.gz $(PACKAGE)*.md5