tazlito annotate Makefile @ rev 512
loram: add 64 bits support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 07 10:44:25 2018 +0200 (2018-06-07) |
parents | 8394ff382a7a |
children | 69ddff8a21b0 |
rev | line source |
---|---|
pankso@4 | 1 # Makefile for Tazlito. |
MikeDSmith25@83 | 2 # Check the README for more information. |
pankso@4 | 3 # |
pankso@4 | 4 SBINDIR?=/sbin |
pankso@4 | 5 PREFIX?=/usr |
pankso@4 | 6 DOCDIR?=/usr/share/doc |
al@416 | 7 MANDIR?=/usr/share/man |
al@480 | 8 LINGUAS?=el es fr it pl pt_BR ru vi zh_CN zh_TW |
al@416 | 9 MODULES:=$(shell ls modules) |
pankso@4 | 10 |
pankso@4 | 11 all: |
pankso@4 | 12 |
pankso@188 | 13 # i18n. |
pankso@188 | 14 |
pankso@188 | 15 pot: |
al@399 | 16 xgettext -o po/tazlito.pot -L Shell -k_ -k_n -k_p:1,2 \ |
al@399 | 17 --package-name="TazLito" ./live.cgi ./tazlito-wiz |
pankso@188 | 18 |
pankso@188 | 19 msgmerge: |
pankso@188 | 20 @for l in $(LINGUAS); do \ |
pankso@188 | 21 echo -n "Updating $$l po file."; \ |
al@399 | 22 msgmerge -U po/$$l.po po/tazlito.pot ; \ |
pankso@188 | 23 done; |
pankso@188 | 24 |
pankso@188 | 25 msgfmt: |
pankso@188 | 26 @for l in $(LINGUAS); do \ |
pankso@188 | 27 echo "Compiling $$l mo file..."; \ |
pankso@188 | 28 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@399 | 29 msgfmt -o po/mo/$$l/LC_MESSAGES/tazlito.mo po/$$l.po ; \ |
pankso@188 | 30 done; |
pankso@188 | 31 |
pankso@4 | 32 # Installation. |
pankso@4 | 33 # Config file goes in /etc/tazlito |
pankso@4 | 34 |
pankso@188 | 35 install: msgfmt |
pankso@256 | 36 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin |
pankso@256 | 37 install -m 0777 tazlito $(DESTDIR)$(PREFIX)/bin |
pascal@427 | 38 -[ "$(VERSION)" ] && sed -i 's/^VERSION=.*/VERSION=$(VERSION)/' $(DESTDIR)$(PREFIX)/bin/tazlito |
al@416 | 39 ln -sf tazlito $(DESTDIR)$(PREFIX)/bin/deduplicate |
al@416 | 40 ln -sf tazlito $(DESTDIR)$(PREFIX)/bin/reduplicate |
pankso@256 | 41 install -m 0777 tazlito-wiz $(DESTDIR)$(PREFIX)/bin |
al@416 | 42 |
al@416 | 43 install -m 0755 -d $(DESTDIR)$(PREFIX)/libexec/tazlito |
al@416 | 44 @for module in $(MODULES); do \ |
al@416 | 45 install -m 0777 modules/$$module $(DESTDIR)$(PREFIX)/libexec/tazlito; \ |
al@416 | 46 done; |
al@416 | 47 |
pankso@256 | 48 install -m 0755 -d $(DESTDIR)/etc/tazlito |
pankso@256 | 49 install -m 0644 tazlito.conf $(DESTDIR)/etc/tazlito |
al@416 | 50 |
pankso@265 | 51 install -m 0755 -d $(DESTDIR)/usr/share/doc |
pascal@321 | 52 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d/boot |
pascal@321 | 53 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default/images |
pankso@265 | 54 cp -a applications $(DESTDIR)/usr/share |
pankso@265 | 55 cp -a doc $(DESTDIR)/usr/share/doc/tazlito |
al@416 | 56 |
pascal@320 | 57 cp -a live.cgi $(DESTDIR)/var/www/tazpanel |
al@416 | 58 ln -sf ../../live.cgi $(DESTDIR)/var/www/tazpanel/menu.d/boot/live |
pascal@321 | 59 cp -a tazlito.png $(DESTDIR)/var/www/tazpanel/styles/default/images |
al@416 | 60 |
pankso@188 | 61 mkdir -p $(DESTDIR)$(PREFIX)/share/locale |
pankso@188 | 62 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@4 | 63 |
al@416 | 64 install -m 0755 -d $(DESTDIR)$(MANDIR)/man1 |
al@416 | 65 install -m 0755 -d $(DESTDIR)$(MANDIR)/man5 |
al@416 | 66 install -m 0644 man/tazlito.1 $(DESTDIR)$(MANDIR)/man1 |
al@416 | 67 install -m 0644 man/tazlito.conf.5 $(DESTDIR)$(MANDIR)/man5 |
al@416 | 68 install -m 0644 man/flavor.5 $(DESTDIR)$(MANDIR)/man5 |
al@416 | 69 |
pankso@4 | 70 # Uninstallation commands. |
pankso@4 | 71 |
pankso@4 | 72 uninstall: |
pankso@4 | 73 rm -f $(PREFIX)/bin/tazlito |
pascal@365 | 74 rm -f $(PREFIX)/bin/deduplicate |
pascal@365 | 75 rm -f $(PREFIX)/bin/reduplicate |
pankso@253 | 76 rm -f $(PREFIX)/bin/tazlito-wiz |
al@416 | 77 rm -f /var/www/tazpanel/menu.d/boot/live |
al@416 | 78 rm -f /var/www/tazpanel/styles/default/images/tazlito.png |
al@416 | 79 rm -f /var/www/tazpanel/live.cgi |
al@416 | 80 rm -rf $(PREFIX)/libexec/tazlito |
al@416 | 81 rm -rf /etc/tazlito |
al@416 | 82 rm -rf $(PREFIX)/share/doc/tazlito |
al@416 | 83 rm -rf $(PREFIX)/share/applications/tazlito*.desktop |
al@399 | 84 rm -rf $(PREFIX)/share/locale/*/LC_MESSAGES/tazlito.mo |
pankso@4 | 85 |
pankso@188 | 86 clean: |
pankso@188 | 87 rm -rf po/mo |
al@399 | 88 rm -f po/*.mo |
al@399 | 89 rm -f po/*.*~ |