tazinst annotate Makefile @ rev 30

Added tag 3.95 for changeset a0bb82fa1e38
author Dominique Corbex <domcox@slitaz.org>
date Wed Feb 12 22:55:36 2014 +0100 (2014-02-12)
parents 02aae5848073
children 661566d3b980
rev   line source
al@6 1 # Makefile for TazInst.
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 \
al@6 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)..."
pascal@8 79 mkdir -p $(DESTDIR)$(TAZPANEL)/menu.d
domcox@2 80 install -m 0755 installer.cgi $(DESTDIR)$(TAZPANEL)
pascal@8 81 @echo "Installing installer.menu into $(DESTDIR)$(TAZPANEL)/menu.d..."
pascal@9 82 ln -s ../installer.cgi $(DESTDIR)$(TAZPANEL)/menu.d/installer.cgi
pascal@8 83 @echo "Installing config file into $(DESTDIR)/etc/slitaz..."
domcox@2 84 mkdir -p $(DESTDIR)/etc/slitaz
domcox@2 85 install -m 0755 etc/tazinst.conf $(DESTDIR)/etc/slitaz
domcox@2 86
domcox@2 87 @echo "Installing Tazinst documentation..."
domcox@2 88 mkdir -p $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 89 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 90 # i18n
domcox@2 91 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
domcox@2 92 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
domcox@2 93 # Desktop integration
domcox@2 94 @echo "Setting up desktop integration..."
domcox@2 95 mkdir -p $(DESTDIR)$(PREFIX)/share
domcox@2 96 cp -a applications $(DESTDIR)$(PREFIX)/share
domcox@2 97
domcox@2 98 # Uninstallation and tarball clean-up commands.
domcox@2 99
domcox@2 100 uninstall:
domcox@2 101 rm -f $(DESTDIR)/etc/slitaz/tazinst.conf
domcox@2 102 rm -f $(DESTDIR)$(PREFIX)/sbin/tazinst
domcox@2 103 rm -f $(DESTDIR)$(PREFIX)/sbin/slitaz_installer
domcox@2 104 rm -f $(DESTDIR)$(TAZPANEL)/installer.cgi
pascal@8 105 rm -f $(DESTDIR)$(TAZPANEL)/menu.d/installer.menu
domcox@2 106 rm -rf $(DESTDIR)$(DOCDIR)/tazinst
domcox@2 107 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazinst*.mo
domcox@2 108 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/slitaz-installer*.mo
domcox@2 109 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/installer*.mo
domcox@2 110 rm -f $(DESTDIR)$(PREFIX)/share/applications/tazinst.desktop
domcox@2 111
domcox@2 112 clean:
domcox@2 113 rm -rf _pkg
domcox@2 114 rm -rf po/mo
domcox@2 115 rm -f po/*/*~
domcox@2 116
domcox@2 117 dist-clean:
domcox@2 118 rm -rf $(DISTDIR)
domcox@2 119
domcox@2 120 # Build tarball and MD5 file for packaging.
domcox@2 121 dist: dist-clean
domcox@2 122 hg archive -t tgz $(TARBALL)
domcox@2 123 md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5