tazinst diff Makefile @ rev 2
Use UUIDs, boot delay on mobile disks, GPT support, boot flag, new slitaz-installer and web frontends
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Feb 14 13:12:12 2013 +0100 (2013-02-14) |
parents | |
children | e62babb3966d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Thu Feb 14 13:12:12 2013 +0100 1.3 @@ -0,0 +1,120 @@ 1.4 +# Makefile for TazUSB. 1.5 +# Check the README for more information. 1.6 +# 1.7 +PREFIX?=/usr 1.8 +DOCDIR?=/usr/share/doc 1.9 +DESTDIR?= 1.10 +TAZPANEL?=/var/www/tazpanel 1.11 +LINGUAS?=el es es_AR fr pt_BR sv ru 1.12 + 1.13 +PACKAGE = tazinst 1.14 +VERSION := $(shell grep ^VERSION ${PACKAGE} | cut -d '=' -f 2) 1.15 +TARBALL = $(PACKAGE)-$(VERSION).tar.gz 1.16 + 1.17 +all: 1.18 + 1.19 +# i18n. 1.20 + 1.21 +pot: 1.22 + xgettext -o po/tazinst/tazinst.pot -L Shell \ 1.23 + --package-name="Tazinst" \ 1.24 + --package-version="$(VERSION)" \ 1.25 + ./tazinst 1.26 + xgettext -o po/slitaz-installer/slitaz-installer.pot -L Shell \ 1.27 + --package-name="slitaz-installer" \ 1.28 + --package-version="$(VERSION)" \ 1.29 + ./slitaz-installer 1.30 + xgettext -o po/installer/installer.pot -L Shell \ 1.31 + --package-name="installer.cgi" \ 1.32 + --package-version="$(VERSION)" \ 1.33 + ./installer.cgi 1.34 + 1.35 +msgmerge: 1.36 + @for l in $(LINGUAS); do \ 1.37 + if [ -f "po/tazinst/$$l.po" ]; then \ 1.38 + echo -n "Updating tazinst $$l po file."; \ 1.39 + msgmerge -U po/tazinst/$$l.po po/tazinst/tazinst.pot ; \ 1.40 + fi;\ 1.41 + if [ -f "po/slitaz-installer/$$l.po" ]; then \ 1.42 + echo -n "Updating slitaz-installer $$l po file."; \ 1.43 + msgmerge -U po/slitaz-installer/$$l.po \ 1.44 + po/slitaz-installer/slitaz-installer.pot ; \ 1.45 + fi;\ 1.46 + if [ -f "po/installer/$$l.po" ]; then \ 1.47 + echo -n "Updating installer $$l po file."; \ 1.48 + msgmerge -U po/installer/$$l.po po/installer/installer.pot ; \ 1.49 + fi;\ 1.50 + done; 1.51 + 1.52 +msgfmt: 1.53 + @for l in $(LINGUAS); do \ 1.54 + if [ -f "po/tazinst/$$l.po" ]; then \ 1.55 + echo "Compiling tazinst $$l mo file..."; \ 1.56 + mkdir -p po/mo/$$l/LC_MESSAGES; \ 1.57 + msgfmt -o po/mo/$$l/LC_MESSAGES/tazinst.mo po/tazinst/$$l.po ; \ 1.58 + fi;\ 1.59 + if [ -f "po/slitaz-installer/$$l.po" ]; then \ 1.60 + echo "Compiling slitaz-installer $$l mo file..."; \ 1.61 + mkdir -p po/mo/$$l/LC_MESSAGES; \ 1.62 + msgfmt -o po/mo/$$l/LC_MESSAGES/slitaz-installer.mo \ 1.63 + po/slitaz-installer/$$l.po ; \ 1.64 + fi;\ 1.65 + if [ -f "po/installer/$$l.po" ]; then \ 1.66 + echo "Compiling installer $$l mo file..."; \ 1.67 + mkdir -p po/mo/$$l/LC_MESSAGES; \ 1.68 + msgfmt -o po/mo/$$l/LC_MESSAGES/installer.mo po/installer/$$l.po ; \ 1.69 + fi;\ 1.70 + done; 1.71 + 1.72 +# Installation. 1.73 + 1.74 +install: msgfmt 1.75 + @echo "Installing Tazinst into $(DESTDIR)$(PREFIX)/sbin..." 1.76 + mkdir -p $(DESTDIR)$(PREFIX)/sbin 1.77 + install -m 0755 tazinst $(DESTDIR)$(PREFIX)/sbin 1.78 + @echo "Installing slitaz-installer into $(DESTDIR)$(PREFIX)/sbin..." 1.79 + mkdir -p $(DESTDIR)$(PREFIX)/sbin 1.80 + install -m 0755 slitaz-installer $(DESTDIR)$(PREFIX)/sbin 1.81 + @echo "Installing installer.cgi into $(DESTDIR)$(TAZPANEL)..." 1.82 + mkdir -p $(DESTDIR)$(TAZPANEL) 1.83 + install -m 0755 installer.cgi $(DESTDIR)$(TAZPANEL) 1.84 + @echo "Installing config file into $(DESTDIR)/etc/slitaz.." 1.85 + mkdir -p $(DESTDIR)/etc/slitaz 1.86 + install -m 0755 etc/tazinst.conf $(DESTDIR)/etc/slitaz 1.87 + 1.88 + @echo "Installing Tazinst documentation..." 1.89 + mkdir -p $(DESTDIR)$(DOCDIR)/tazinst 1.90 + cp -a doc/* $(DESTDIR)$(DOCDIR)/tazinst 1.91 + # i18n 1.92 + mkdir -p $(DESTDIR)$(PREFIX)/share/locale 1.93 + cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale 1.94 + # Desktop integration 1.95 + @echo "Setting up desktop integration..." 1.96 + mkdir -p $(DESTDIR)$(PREFIX)/share 1.97 + cp -a applications $(DESTDIR)$(PREFIX)/share 1.98 + 1.99 +# Uninstallation and tarball clean-up commands. 1.100 + 1.101 +uninstall: 1.102 + rm -f $(DESTDIR)/etc/slitaz/tazinst.conf 1.103 + rm -f $(DESTDIR)$(PREFIX)/sbin/tazinst 1.104 + rm -f $(DESTDIR)$(PREFIX)/sbin/slitaz_installer 1.105 + rm -f $(DESTDIR)$(TAZPANEL)/installer.cgi 1.106 + rm -rf $(DESTDIR)$(DOCDIR)/tazinst 1.107 + rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazinst*.mo 1.108 + rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/slitaz-installer*.mo 1.109 + rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/installer*.mo 1.110 + rm -f $(DESTDIR)$(PREFIX)/share/applications/tazinst.desktop 1.111 + 1.112 +clean: 1.113 + rm -rf _pkg 1.114 + rm -rf po/mo 1.115 + rm -f po/*/*~ 1.116 + 1.117 +dist-clean: 1.118 + rm -rf $(DISTDIR) 1.119 + 1.120 +# Build tarball and MD5 file for packaging. 1.121 +dist: dist-clean 1.122 + hg archive -t tgz $(TARBALL) 1.123 + md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5