tazpanel annotate Makefile @ rev 38

Use 1 POT file for all TazPanel and create network.cgi
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 06 06:07:50 2011 +0200 (2011-04-06)
parents 086e699c7666
children 1a80f769f6e1
rev   line source
pankso@6 1 # Makefile for TazPanel.
pankso@6 2 #
pankso@6 3 PREFIX?=/usr
pankso@6 4 SYSCONFDIR?=/etc/slitaz
pankso@6 5 DESTDIR?=
pankso@26 6 LINGUAS?=pt
pankso@12 7 PANEL?=/var/www/tazpanel
pankso@6 8
pankso@14 9 VERSION:=$(shell grep ^VERSION tazpanel | cut -d '=' -f 2)
pankso@14 10
pankso@6 11 # i18n
pankso@6 12
pankso@6 13 pot:
pankso@38 14 xgettext -o po/tazpanel.pot -L Shell \
pankso@38 15 --package-name="TazPanel" \
pankso@38 16 --package-version="$(VERSION)" \
pankso@38 17 ./tazpanel ./index.cgi ./pkgs.cgi ./live.cgi ./network.cgi
pankso@6 18
pankso@6 19 msgmerge:
pankso@6 20 @for l in $(LINGUAS); do \
pankso@6 21 echo -n "Updating $$l po file."; \
pankso@38 22 msgmerge -U po/$$l.po po/tazpanel-pkgs.pot; \
pankso@6 23 done;
pankso@6 24
pankso@6 25 msgfmt:
pankso@6 26 @for l in $(LINGUAS); do \
pankso@6 27 echo "Compiling $$l mo file..."; \
pankso@6 28 mkdir -p po/mo/$$l/LC_MESSAGES; \
pankso@38 29 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpanel.mo po/$$l.po; \
pankso@6 30 done;
pankso@6 31
pankso@12 32 # Installation
pankso@6 33
pankso@26 34 install: msgfmt
pankso@12 35 mkdir -p $(DESTDIR)$(PREFIX)/bin \
pankso@12 36 $(DESTDIR)$(PREFIX)/share/locale \
pankso@12 37 $(DESTDIR)$(SYSCONFDIR) \
pankso@12 38 $(DESTDIR)$(PANEL)
pankso@37 39 cp -a tazpanel $(DESTDIR)$(PREFIX)/bin
pankso@37 40 cp -a *.conf data/httpd.conf $(DESTDIR)$(SYSCONFDIR)
pankso@12 41 cp -a *.cgi lib/ styles/ $(DESTDIR)$(PANEL)
pankso@26 42 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
pankso@12 43
pankso@26 44 # Clean source
pankso@26 45
pankso@26 46 clean:
pankso@26 47 rm -rf po/mo
pankso@26 48