tazlito view Makefile @ rev 448
Update Vietnamese translations (thanks Anh Binh)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jan 16 09:34:59 2017 +0200 (2017-01-16) |
parents | d7d87b67adeb |
children | 740d8686ea2c |
line source
1 # Makefile for Tazlito.
2 # Check the README for more information.
3 #
4 SBINDIR?=/sbin
5 PREFIX?=/usr
6 DOCDIR?=/usr/share/doc
7 MANDIR?=/usr/share/man
8 LINGUAS?=el es fr pl pt_BR ru vi zh_CN zh_TW
9 MODULES:=$(shell ls modules)
11 all:
13 # i18n.
15 pot:
16 xgettext -o po/tazlito.pot -L Shell -k_ -k_n -k_p:1,2 \
17 --package-name="TazLito" ./live.cgi ./tazlito-wiz
19 msgmerge:
20 @for l in $(LINGUAS); do \
21 echo -n "Updating $$l po file."; \
22 msgmerge -U po/$$l.po po/tazlito.pot ; \
23 done;
25 msgfmt:
26 @for l in $(LINGUAS); do \
27 echo "Compiling $$l mo file..."; \
28 mkdir -p po/mo/$$l/LC_MESSAGES; \
29 msgfmt -o po/mo/$$l/LC_MESSAGES/tazlito.mo po/$$l.po ; \
30 done;
32 # Installation.
33 # Config file goes in /etc/tazlito
35 install: msgfmt
36 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
37 install -m 0777 tazlito $(DESTDIR)$(PREFIX)/bin
38 -[ "$(VERSION)" ] && sed -i 's/^VERSION=.*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazlito
39 ln -sf tazlito $(DESTDIR)$(PREFIX)/bin/deduplicate
40 ln -sf tazlito $(DESTDIR)$(PREFIX)/bin/reduplicate
41 install -m 0777 tazlito-wiz $(DESTDIR)$(PREFIX)/bin
43 install -m 0755 -d $(DESTDIR)$(PREFIX)/libexec/tazlito
44 @for module in $(MODULES); do \
45 install -m 0777 modules/$$module $(DESTDIR)$(PREFIX)/libexec/tazlito; \
46 done;
48 install -m 0755 -d $(DESTDIR)/etc/tazlito
49 install -m 0644 tazlito.conf $(DESTDIR)/etc/tazlito
51 install -m 0755 -d $(DESTDIR)/usr/share/doc
52 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d/boot
53 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default/images
54 cp -a applications $(DESTDIR)/usr/share
55 cp -a doc $(DESTDIR)/usr/share/doc/tazlito
57 cp -a live.cgi $(DESTDIR)/var/www/tazpanel
58 ln -sf ../../live.cgi $(DESTDIR)/var/www/tazpanel/menu.d/boot/live
59 cp -a tazlito.png $(DESTDIR)/var/www/tazpanel/styles/default/images
61 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
62 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
64 install -m 0755 -d $(DESTDIR)$(MANDIR)/man1
65 install -m 0755 -d $(DESTDIR)$(MANDIR)/man5
66 install -m 0644 man/tazlito.1 $(DESTDIR)$(MANDIR)/man1
67 install -m 0644 man/tazlito.conf.5 $(DESTDIR)$(MANDIR)/man5
68 install -m 0644 man/flavor.5 $(DESTDIR)$(MANDIR)/man5
70 # Uninstallation commands.
72 uninstall:
73 rm -f $(PREFIX)/bin/tazlito
74 rm -f $(PREFIX)/bin/deduplicate
75 rm -f $(PREFIX)/bin/reduplicate
76 rm -f $(PREFIX)/bin/tazlito-wiz
77 rm -f /var/www/tazpanel/menu.d/boot/live
78 rm -f /var/www/tazpanel/styles/default/images/tazlito.png
79 rm -f /var/www/tazpanel/live.cgi
80 rm -rf $(PREFIX)/libexec/tazlito
81 rm -rf /etc/tazlito
82 rm -rf $(PREFIX)/share/doc/tazlito
83 rm -rf $(PREFIX)/share/applications/tazlito*.desktop
84 rm -rf $(PREFIX)/share/locale/*/LC_MESSAGES/tazlito.mo
86 clean:
87 rm -rf po/mo
88 rm -f po/*.mo
89 rm -f po/*.*~