tazinst annotate 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
rev   line source
domcox@2 1 # Makefile for TazUSB.
domcox@2 2 # Check the README for more information.
domcox@2 3 #
domcox@2 4 PREFIX?=/usr
domcox@2 5 DOCDIR?=/usr/share/doc
domcox@2 6 DESTDIR?=
domcox@2 7 TAZPANEL?=/var/www/tazpanel
domcox@2 8 LINGUAS?=el es es_AR fr pt_BR sv ru
domcox@2 9
domcox@2 10 PACKAGE = tazinst
domcox@2 11 VERSION := $(shell grep ^VERSION ${PACKAGE} | cut -d '=' -f 2)
domcox@2 12 TARBALL = $(PACKAGE)-$(VERSION).tar.gz
domcox@2 13
domcox@2 14 all:
domcox@2 15
domcox@2 16 # i18n.
domcox@2 17
domcox@2 18 pot:
domcox@2 19 xgettext -o po/tazinst/tazinst.pot -L Shell \
domcox@2 20 --package-name="Tazinst" \
domcox@2 21 --package-version="$(VERSION)" \
domcox@2 22 ./tazinst
domcox@2 23 xgettext -o po/slitaz-installer/slitaz-installer.pot -L Shell \
domcox@2 24 --package-name="slitaz-installer" \
domcox@2 25 --package-version="$(VERSION)" \
domcox@2 26 ./slitaz-installer
domcox@2 27 xgettext -o po/installer/installer.pot -L Shell \
domcox@2 28 --package-name="installer.cgi" \
domcox@2 29 --package-version="$(VERSION)" \
domcox@2 30 ./installer.cgi
domcox@2 31
domcox@2 32 msgmerge:
domcox@2 33 @for l in $(LINGUAS); do \
domcox@2 34 if [ -f "po/tazinst/$$l.po" ]; then \
domcox@2 35 echo -n "Updating tazinst $$l po file."; \
domcox@2 36 msgmerge -U po/tazinst/$$l.po po/tazinst/tazinst.pot ; \
domcox@2 37 fi;\
domcox@2 38 if [ -f "po/slitaz-installer/$$l.po" ]; then \
domcox@2 39 echo -n "Updating slitaz-installer $$l po file."; \
domcox@2 40 msgmerge -U po/slitaz-installer/$$l.po \
domcox@2 41 po/slitaz-installer/slitaz-installer.pot ; \
domcox@2 42 fi;\
domcox@2 43 if [ -f "po/installer/$$l.po" ]; then \
domcox@2 44 echo -n "Updating installer $$l po file."; \
domcox@2 45 msgmerge -U po/installer/$$l.po po/installer/installer.pot ; \
domcox@2 46 fi;\
domcox@2 47 done;
domcox@2 48
domcox@2 49 msgfmt:
domcox@2 50 @for l in $(LINGUAS); do \
domcox@2 51 if [ -f "po/tazinst/$$l.po" ]; then \
domcox@2 52 echo "Compiling tazinst $$l mo file..."; \
domcox@2 53 mkdir -p po/mo/$$l/LC_MESSAGES; \
domcox@2 54 msgfmt -o po/mo/$$l/LC_MESSAGES/tazinst.mo po/tazinst/$$l.po ; \
domcox@2 55 fi;\
domcox@2 56 if [ -f "po/slitaz-installer/$$l.po" ]; then \
domcox@2 57 echo "Compiling slitaz-installer $$l mo file..."; \
domcox@2 58 mkdir -p po/mo/$$l/LC_MESSAGES; \
domcox@2 59 msgfmt -o po/mo/$$l/LC_MESSAGES/slitaz-installer.mo \
domcox@2 60 po/slitaz-installer/$$l.po ; \
domcox@2 61 fi;\
domcox@2 62 if [ -f "po/installer/$$l.po" ]; then \
domcox@2 63 echo "Compiling installer $$l mo file..."; \
domcox@2 64 mkdir -p po/mo/$$l/LC_MESSAGES; \
domcox@2 65 msgfmt -o po/mo/$$l/LC_MESSAGES/installer.mo po/installer/$$l.po ; \
domcox@2 66 fi;\
domcox@2 67 done;
domcox@2 68
domcox@2 69 # Installation.
domcox@2 70
domcox@2 71 install: msgfmt
domcox@2 72 @echo "Installing Tazinst into $(DESTDIR)$(PREFIX)/sbin..."
domcox@2 73 mkdir -p $(DESTDIR)$(PREFIX)/sbin
domcox@2 74 install -m 0755 tazinst $(DESTDIR)$(PREFIX)/sbin
domcox@2 75 @echo "Installing slitaz-installer into $(DESTDIR)$(PREFIX)/sbin..."
domcox@2 76 mkdir -p $(DESTDIR)$(PREFIX)/sbin
domcox@2 77 install -m 0755 slitaz-installer $(DESTDIR)$(PREFIX)/sbin
domcox@2 78 @echo "Installing installer.cgi into $(DESTDIR)$(TAZPANEL)..."
domcox@2 79 mkdir -p $(DESTDIR)$(TAZPANEL)
domcox@2 80 install -m 0755 installer.cgi $(DESTDIR)$(TAZPANEL)
domcox@2 81 @echo "Installing config file into $(DESTDIR)/etc/slitaz.."
domcox@2 82 mkdir -p $(DESTDIR)/etc/slitaz
domcox@2 83 install -m 0755 etc/tazinst.conf $(DESTDIR)/etc/slitaz
domcox@2 84
domcox@2 85 @echo "Installing Tazinst documentation..."
domcox@2 86 mkdir -p $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 87 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 88 # i18n
domcox@2 89 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
domcox@2 90 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
domcox@2 91 # Desktop integration
domcox@2 92 @echo "Setting up desktop integration..."
domcox@2 93 mkdir -p $(DESTDIR)$(PREFIX)/share
domcox@2 94 cp -a applications $(DESTDIR)$(PREFIX)/share
domcox@2 95
domcox@2 96 # Uninstallation and tarball clean-up commands.
domcox@2 97
domcox@2 98 uninstall:
domcox@2 99 rm -f $(DESTDIR)/etc/slitaz/tazinst.conf
domcox@2 100 rm -f $(DESTDIR)$(PREFIX)/sbin/tazinst
domcox@2 101 rm -f $(DESTDIR)$(PREFIX)/sbin/slitaz_installer
domcox@2 102 rm -f $(DESTDIR)$(TAZPANEL)/installer.cgi
domcox@2 103 rm -rf $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 104 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazinst*.mo
domcox@2 105 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/slitaz-installer*.mo
domcox@2 106 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/installer*.mo
domcox@2 107 rm -f $(DESTDIR)$(PREFIX)/share/applications/tazinst.desktop
domcox@2 108
domcox@2 109 clean:
domcox@2 110 rm -rf _pkg
domcox@2 111 rm -rf po/mo
domcox@2 112 rm -f po/*/*~
domcox@2 113
domcox@2 114 dist-clean:
domcox@2 115 rm -rf $(DISTDIR)
domcox@2 116
domcox@2 117 # Build tarball and MD5 file for packaging.
domcox@2 118 dist: dist-clean
domcox@2 119 hg archive -t tgz $(TARBALL)
domcox@2 120 md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5