slitaz-base-files annotate 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 |
rev | line source |
---|---|
pankso@125 | 1 # Makefile for SliTaz Bugs. |
pankso@125 | 2 # |
pankso@125 | 3 |
pankso@183 | 4 PACKAGE=slitaz-base |
pankso@125 | 5 PREFIX?=/usr |
al@335 | 6 LINGUAS?=ca de el es fa fr it ja pl pt_BR ru sv vi zh_CN zh_TW |
pankso@125 | 7 |
pankso@125 | 8 all: help |
pankso@125 | 9 |
pankso@125 | 10 help: |
pankso@125 | 11 @echo "make [pot|msgmerge|msgfmt|install-libtaz|install-msg|install|clean]" |
pankso@125 | 12 |
pankso@125 | 13 # i18n |
pankso@125 | 14 |
pankso@125 | 15 pot: |
pankso@125 | 16 xgettext -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \ |
al@301 | 17 --copyright-holder="SliTaz" -k -k_ -klgettext -cTranslators \ |
al@177 | 18 ./rootfs/lib/libtaz.sh |
al@177 | 19 xgettext -j -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \ |
al@301 | 20 --copyright-holder="SliTaz" -k_ -k_n -cTranslators \ |
al@177 | 21 ./rootfs/usr/lib/slitaz/libpkg.sh \ |
al@177 | 22 ./rootfs/var/www/cgi-bin/cgi-env.sh \ |
al@177 | 23 ./rootfs/var/www/cgi-bin/index.cgi \ |
al@177 | 24 ./rootfs/usr/bin/man |
pankso@125 | 25 |
pankso@125 | 26 msgmerge: |
pankso@125 | 27 @for l in $(LINGUAS); do \ |
pankso@125 | 28 echo -n "Updating $$l po file."; \ |
pankso@125 | 29 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \ |
pankso@125 | 30 done; |
pankso@125 | 31 |
pankso@125 | 32 msgfmt: |
pankso@125 | 33 @for l in $(LINGUAS); do \ |
pankso@125 | 34 echo "Compiling $$l mo file..."; \ |
pankso@125 | 35 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
pankso@125 | 36 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \ |
pankso@125 | 37 done; |
pankso@125 | 38 |
pankso@125 | 39 # Install |
pankso@125 | 40 |
pankso@125 | 41 install-libtaz: |
pankso@125 | 42 install -m 0744 rootfs/lib/libtaz.sh $(DESTDIR)/lib |
paul@302 | 43 # Strip comments addressed to translators |
al@301 | 44 sed -i '/# Translators:/d' $(DESTDIR)/lib/libtaz.sh |
pankso@139 | 45 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 46 install -m 0644 doc/libtaz.txt $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 47 |
pankso@139 | 48 install-httphelper: |
pankso@139 | 49 install -m 0744 rootfs/usr/lib/slitaz/httphelper.sh \ |
pankso@139 | 50 $(DESTDIR)/usr/lib/slitaz |
pankso@139 | 51 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 52 install -m 0644 doc/httphelper.txt $(DESTDIR)/usr/share/doc/slitaz |
pankso@142 | 53 |
pankso@153 | 54 install-libpkg: |
pankso@153 | 55 install -m 0755 -d $(DESTDIR)/usr/lib/slitaz |
pankso@153 | 56 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@153 | 57 install -m 0744 rootfs/usr/lib/slitaz/libpkg.sh \ |
pankso@153 | 58 $(DESTDIR)/usr/lib/slitaz |
pankso@153 | 59 install -m 0644 doc/libpkg.txt $(DESTDIR)/usr/share/doc/slitaz |
pankso@153 | 60 |
pankso@148 | 61 install-slitaz: |
pankso@148 | 62 install -m 0755 -d $(DESTDIR)/usr/bin |
pankso@148 | 63 install -m 0755 -d $(DESTDIR)/etc/slitaz |
pankso@148 | 64 install -m 0744 rootfs/usr/bin/slitaz $(DESTDIR)/usr/bin |
pankso@148 | 65 install -m 0644 rootfs/etc/slitaz/slitaz.conf $(DESTDIR)/etc/slitaz |
pankso@148 | 66 |
pankso@125 | 67 install-msg: msgfmt |
pankso@125 | 68 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale |
pankso@125 | 69 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@142 | 70 |
pankso@125 | 71 install: install-msg |
al@178 | 72 cp -a rootfs/* $(DESTDIR)/ |
llevrel@292 | 73 # strip "man" script |
al@294 | 74 sed -i '/^[^#]*$$/,$${s|^\t*||;/^ *#/d;/^$$/d}' $(DESTDIR)/usr/bin/man |
pankso@139 | 75 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz |
pankso@139 | 76 cp -a doc/* $(DESTDIR)/usr/share/doc/slitaz |
al@196 | 77 chown -R root:root $(DESTDIR)/usr/share/doc/slitaz |
pankso@125 | 78 |
pankso@125 | 79 # Clean source |
pankso@125 | 80 |
pankso@125 | 81 clean: |
pankso@125 | 82 rm -rf po/mo |
al@293 | 83 rm -f po/*~ |
al@293 | 84 rm -f po/*.mo |
pankso@183 | 85 rm -f po/*~ $(PACKAGE)*.tar.gz $(PACKAGE)*.md5 |