tazpanel view Makefile @ rev 446

Default user is nobody
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 09 20:37:35 2015 +0200 (2015-04-09)
parents adedebded23a
children 77d13290c89c
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 --package-name="TazPanel" \
18 --package-version="$(VERSION)" \
19 ./tazpanel ./index.cgi ./network.cgi ./boot.cgi \
20 ./hardware.cgi ./settings.cgi ./lib/libtazpanel ./help.cgi \
21 ./styles/default/header.html ./styles/default/footer.html
23 msgmerge:
24 @for l in $(LINGUAS); do \
25 echo -n "Updating $$l po file."; \
26 msgmerge -U po/$$l.po po/tazpanel.pot; \
27 done;
29 msgfmt:
30 @for l in $(LINGUAS); do \
31 echo "Compiling $$l mo file..."; \
32 mkdir -p po/mo/$$l/LC_MESSAGES; \
33 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpanel.mo po/$$l.po; \
34 done;
36 # Installation
38 install:
39 mkdir -p \
40 $(DESTDIR)$(PREFIX)/bin \
41 $(DESTDIR)$(PREFIX)/share/locale \
42 $(DESTDIR)$(PREFIX)/share/applications \
43 $(DESTDIR)$(SYSCONFDIR) \
44 $(DESTDIR)$(PANEL)/menu.d \
45 $(DESTDIR)/var/log
46 cp -a tazpanel $(DESTDIR)$(PREFIX)/bin
47 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel
48 cp -a *.cgi lib/ styles/ doc/ README* $(DESTDIR)$(PANEL)
49 ln -s . $(DESTDIR)$(PANEL)/user
50 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
51 cp -a data/*.conf $(DESTDIR)$(SYSCONFDIR)
52 cp -a data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
53 cp -a data/icons $(DESTDIR)$(PREFIX)/share
54 touch $(DESTDIR)/var/log/tazpanel.log
56 @# Clean comments in production release
57 sed -i '/^\t*\/\//d' $(DESTDIR)$(PANEL)/lib/tazpanel.js
59 @# Remove this when TazWeb will support OpenType ligatures for web-fonts (maybe, after Webkit upgrade?)
60 mkdir -p $(DESTDIR)/usr/share/fonts/TTF
61 ln -fs $(PANEL)/styles/default/tazpanel.ttf $(DESTDIR)/usr/share/fonts/TTF/tazpanel.ttf
63 # Clean source
65 clean:
66 rm -rf po/mo
67 rm -f po/*.mo
68 rm -f po/*.*~
70 help:
71 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"