tazpanel annotate Makefile @ rev 617

revision of german messages
author Hans-G?nter Theisgen
date Mon Oct 09 17:15:22 2017 +0100 (2017-10-09)
parents ab0386012560
children 35a202701366
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?=
al@610 6 LINGUAS?=de el es fr ja pl pt_BR ru sv vi_VN zh_CN
pankso@12 7 PANEL?=/var/www/tazpanel
al@527 8 BASECGI?=boot.cgi hardware.cgi help.cgi index.cgi network.cgi hosts.cgi settings.cgi
pascal@579 9 EXTRACGI?=floppy.cgi test.cgi powersaving.cgi
pankso@6 10
al@525 11 VERSION:=$(shell grep ^VERSION tazpanel | cut -d= -f2)
pankso@14 12
pankso@183 13 all: msgfmt
al@525 14 mkdir build
al@525 15 cp -a *.cgi bootloader tazpanel \
al@525 16 lib/libtazpanel lib/*.js \
al@525 17 styles/default/*.html styles/default/*.css \
al@558 18 doc/tazpanel.*.html build
al@525 19 ./stripall.sh
pankso@183 20
pankso@6 21 # i18n
pankso@6 22
pankso@6 23 pot:
al@443 24 xgettext -o po/tazpanel.pot -L Shell -k_ -k_n -k_p:1,2 \
al@501 25 --from-code="UTF-8" \
pankso@38 26 --package-name="TazPanel" \
pankso@38 27 --package-version="$(VERSION)" \
pascal@583 28 ./tazpanel ./lib/libtazpanel $(BASECGI) $(EXTRACGI) \
domcox@349 29 ./styles/default/header.html ./styles/default/footer.html
pankso@6 30
pankso@6 31 msgmerge:
pankso@6 32 @for l in $(LINGUAS); do \
pankso@6 33 echo -n "Updating $$l po file."; \
pankso@42 34 msgmerge -U po/$$l.po po/tazpanel.pot; \
pankso@6 35 done;
pankso@6 36
pankso@6 37 msgfmt:
pankso@6 38 @for l in $(LINGUAS); do \
pankso@6 39 echo "Compiling $$l mo file..."; \
pankso@6 40 mkdir -p po/mo/$$l/LC_MESSAGES; \
pankso@38 41 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpanel.mo po/$$l.po; \
pankso@6 42 done;
pankso@6 43
pankso@12 44 # Installation
pankso@6 45
pankso@183 46 install:
al@419 47 mkdir -p \
al@419 48 $(DESTDIR)$(PREFIX)/bin \
pankso@12 49 $(DESTDIR)$(PREFIX)/share/locale \
pankso@169 50 $(DESTDIR)$(PREFIX)/share/applications \
pankso@12 51 $(DESTDIR)$(SYSCONFDIR) \
pascal@353 52 $(DESTDIR)$(PANEL)/menu.d \
al@525 53 $(DESTDIR)/var/log \
al@525 54 $(DESTDIR)$(PANEL)/lib \
al@558 55 $(DESTDIR)$(PANEL)/styles/default \
al@558 56 $(DESTDIR)$(PANEL)/doc
al@525 57
al@525 58 cp -a build/tazpanel $(DESTDIR)$(PREFIX)/bin
pascal@397 59 -[ "$(VERSION)" ] && sed -i 's/^VERSION=[0-9].*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazpanel
al@525 60
al@558 61 cp -a README README.html $(DESTDIR)$(PANEL)
al@558 62 cp -a build/tazpanel.*.html $(DESTDIR)$(PANEL)/doc
al@558 63 ln -sf tazpanel.en.html $(DESTDIR)$(PANEL)/doc/tazpanel.html
al@525 64 cp -a build/libtazpanel build/gz/*.js.gz $(DESTDIR)$(PANEL)/lib
al@525 65 cp -a build/gz/*.css.gz build/*.html styles/default/*.ico styles/default/*.ttf $(DESTDIR)$(PANEL)/styles/default
al@525 66
pascal@516 67 @for c in $(BASECGI); do \
al@525 68 cp -a build/$$c $(DESTDIR)$(PANEL); \
pascal@516 69 done;
al@525 70
al@448 71 if [ -e $(DESTDIR)$(PANEL)/user ] ; then rm -rf $(DESTDIR)$(PANEL)/user; fi
pascal@441 72 ln -s . $(DESTDIR)$(PANEL)/user
al@525 73
al@419 74 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
al@419 75 cp -a data/*.conf $(DESTDIR)$(SYSCONFDIR)
pankso@169 76 cp -a data/*.desktop $(DESTDIR)$(PREFIX)/share/applications
al@419 77 cp -a data/icons $(DESTDIR)$(PREFIX)/share
pankso@194 78 touch $(DESTDIR)/var/log/tazpanel.log
pankso@12 79
al@419 80 @# Remove this when TazWeb will support OpenType ligatures for web-fonts (maybe, after Webkit upgrade?)
al@419 81 mkdir -p $(DESTDIR)/usr/share/fonts/TTF
al@419 82 ln -fs $(PANEL)/styles/default/tazpanel.ttf $(DESTDIR)/usr/share/fonts/TTF/tazpanel.ttf
al@419 83
al@538 84 # TazPanel cache directory, rw access for all
al@538 85 install -m 0777 -d $(DESTDIR)/var/cache/tazpanel
al@538 86
al@538 87
pascal@516 88 install_extra:
pascal@516 89 mkdir -p \
pascal@516 90 $(DESTDIR)$(PANEL)/menu.d/boot \
pascal@517 91 $(DESTDIR)$(PANEL)/menu.d/hardware \
pascal@517 92 $(DESTDIR)/usr/bin
pascal@516 93 @for c in $(EXTRACGI); do \
al@525 94 cp -a build/$$c $(DESTDIR)$(PANEL); \
pascal@516 95 done;
al@525 96 cp -a build/bootloader $(DESTDIR)/usr/bin
al@556 97 ln -sf ../../floppy.cgi $(DESTDIR)$(PANEL)/menu.d/boot/floppy
al@556 98 ln -sf ../../powersaving.cgi $(DESTDIR)$(PANEL)/menu.d/hardware/powersaving
pascal@516 99
pankso@26 100 # Clean source
pankso@26 101
pankso@26 102 clean:
al@525 103 rm -rf build
pankso@26 104 rm -rf po/mo
pankso@48 105 rm -f po/*.mo
pankso@42 106 rm -f po/*.*~
pankso@26 107
al@303 108 help:
al@372 109 @echo "make [ pot | msgmerge | msgfmt | all | install | clean ]"