tazpanel view Makefile @ rev 501

*.cgi: Implement TazPanel title and sub-title; hardware.cgi: fix and improve modules search; index.cgi: complex code using awk was prevented 'make pot' to collect all messages, fix terminal history removing; tazpanel.js: disable buttons when no packages selected (pkgs.cgi: up / search / category lists); network.cgi: complex comment was prevented 'make pot' to collect all messages; powersaving.cgi: starting development; *.po: rebuild; tazpanel.ttf: add messages icons, so remove all the style/png images and change libtazpanel; *.css: title and sub-title, messages icons; test.cgi: add new icons.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jun 08 04:32:19 2015 +0300 (2015-06-08)
parents 470ab4241de5
children d7b7403d5f2a
line source
1 # Makefile for TazPanel.
2 #
3 PREFIX?=/usr
4 SYSCONFDIR?=/etc/slitaz
5 DESTDIR?=
6 LINGUAS?=el es fr pl pt_BR ru sv
7 PANEL?=/var/www/tazpanel
9 VERSION:=$(shell grep ^VERSION tazpanel | cut -d '=' -f 2)
11 all: msgfmt
13 # i18n
15 pot:
16 xgettext -o po/tazpanel.pot -L Shell -k_ -k_n -k_p:1,2 \
17 --from-code="UTF-8" \
18 --package-name="TazPanel" \
19 --package-version="$(VERSION)" \
20 ./tazpanel ./index.cgi ./network.cgi ./boot.cgi \
21 ./hardware.cgi ./settings.cgi ./lib/libtazpanel ./help.cgi \
22 ./styles/default/header.html ./styles/default/footer.html
24 msgmerge:
25 @for l in $(LINGUAS); do \
26 echo -n "Updating $$l po file."; \
27 msgmerge -U po/$$l.po po/tazpanel.pot; \
28 done;
30 msgfmt:
31 @for l in $(LINGUAS); do \
32 echo "Compiling $$l mo file..."; \
33 mkdir -p po/mo/$$l/LC_MESSAGES; \
34 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpanel.mo po/$$l.po; \
35 done;
37 # Installation
39 install:
40 mkdir -p \
41 $(DESTDIR)$(PREFIX)/bin \
42 $(DESTDIR)$(PREFIX)/share/locale \
43 $(DESTDIR)$(PREFIX)/share/applications \
44 $(DESTDIR)$(SYSCONFDIR) \
45 $(DESTDIR)$(PANEL)/menu.d \
46 $(DESTDIR)/var/log
47 cp -a tazpanel $(DESTDIR)$(PREFIX)/bin
48 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel
49 cp -a *.cgi lib/ styles/ doc/ README* $(DESTDIR)$(PANEL)
50 if [ -e $(DESTDIR)$(PANEL)/user ] ; then rm -rf $(DESTDIR)$(PANEL)/user; fi
51 ln -s . $(DESTDIR)$(PANEL)/user
52 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
53 cp -a data/*.conf $(DESTDIR)$(SYSCONFDIR)
54 cp -a data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
55 cp -a data/icons $(DESTDIR)$(PREFIX)/share
56 touch $(DESTDIR)/var/log/tazpanel.log
58 @# Clean comments in production release
59 sed -i '/^\t*\/\//d' $(DESTDIR)$(PANEL)/lib/tazpanel.js
61 @# Remove this when TazWeb will support OpenType ligatures for web-fonts (maybe, after Webkit upgrade?)
62 mkdir -p $(DESTDIR)/usr/share/fonts/TTF
63 ln -fs $(PANEL)/styles/default/tazpanel.ttf $(DESTDIR)/usr/share/fonts/TTF/tazpanel.ttf
65 # Clean source
67 clean:
68 rm -rf po/mo
69 rm -f po/*.mo
70 rm -f po/*.*~
72 help:
73 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"