slitaz-base-files annotate Makefile @ rev 178

Makefile: fix install
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon May 21 10:11:24 2012 +0300 (2012-05-21)
parents efb8e0291f24
children bffd6c0e7c5b
rev   line source
pankso@125 1 # Makefile for SliTaz Bugs.
pankso@125 2 #
pankso@125 3
pankso@125 4 PACKAGE="slitaz-base"
pankso@125 5 PREFIX?=/usr
pankso@125 6 LINGUAS?=fr
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@177 17 --copyright-holder="SliTaz Association" -k -klgettext \
al@177 18 ./rootfs/lib/libtaz.sh
al@177 19 xgettext -j -o po/$(PACKAGE).pot -L Shell --package-name="SliTaz Base" \
al@177 20 --copyright-holder="SliTaz Association" \
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
pankso@139 43 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
pankso@139 44 install -m 0644 doc/libtaz.txt $(DESTDIR)/usr/share/doc/slitaz
pankso@139 45
pankso@139 46 install-httphelper:
pankso@139 47 install -m 0744 rootfs/usr/lib/slitaz/httphelper.sh \
pankso@139 48 $(DESTDIR)/usr/lib/slitaz
pankso@139 49 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
pankso@139 50 install -m 0644 doc/httphelper.txt $(DESTDIR)/usr/share/doc/slitaz
pankso@142 51
pankso@153 52 install-libpkg:
pankso@153 53 install -m 0755 -d $(DESTDIR)/usr/lib/slitaz
pankso@153 54 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
pankso@153 55 install -m 0744 rootfs/usr/lib/slitaz/libpkg.sh \
pankso@153 56 $(DESTDIR)/usr/lib/slitaz
pankso@153 57 install -m 0644 doc/libpkg.txt $(DESTDIR)/usr/share/doc/slitaz
pankso@153 58
pankso@148 59 install-slitaz:
pankso@148 60 install -m 0755 -d $(DESTDIR)/usr/bin
pankso@148 61 install -m 0755 -d $(DESTDIR)/etc/slitaz
pankso@148 62 install -m 0744 rootfs/usr/bin/slitaz $(DESTDIR)/usr/bin
pankso@148 63 install -m 0644 rootfs/etc/slitaz/slitaz.conf $(DESTDIR)/etc/slitaz
pankso@148 64
pankso@125 65 install-msg: msgfmt
pankso@125 66 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
pankso@125 67 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
pankso@142 68
pankso@125 69 install: install-msg
al@178 70 cp -a rootfs/* $(DESTDIR)/
pankso@139 71 install -m 0755 -d $(DESTDIR)/usr/share/doc/slitaz
pankso@139 72 cp -a doc/* $(DESTDIR)/usr/share/doc/slitaz
al@178 73 chown -R root.root $(DESTDIR)/usr/share/doc/slitaz
pankso@125 74
pankso@125 75 # Clean source
pankso@125 76
pankso@125 77 clean:
pankso@125 78 rm -rf po/mo
pankso@142 79 rm -f po/*~
pankso@142 80