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