tazusb view Makefile @ rev 161
zh_TW.po typo
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sat Jun 07 21:00:17 2014 +0100 (2014-06-07) |
parents | ef01c9917fe8 |
children | 58e30cef8317 |
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 LINGUAS?=el fr pl pt_BR
9 PACKAGE = tazusb
10 VERSION := $(shell grep ^VERSION ${PACKAGE} | cut -d '=' -f 2)
11 TARBALL = $(PACKAGE)-$(VERSION).tar.gz
13 all:
15 # i18n.
17 pot:
18 xgettext -o po/tazusb-box/tazusb-box.pot -L Shell \
19 --package-name="TazUSB" \
20 --package-version="$(VERSION)" \
21 ./tazusb-box
22 xgettext -o po/tazusb/tazusb.pot -L Shell \
23 --package-name="TazUSB" \
24 --package-version="$(VERSION)" \
25 ./tazusb
27 msgmerge:
28 @for l in $(LINGUAS); do \
29 if [ -f "po/tazusb-box/$$l.po" ]; then \
30 echo -n "Updating $$l po file."; \
31 msgmerge -U po/tazusb-box/$$l.po po/tazusb-box/tazusb-box.pot ; \
32 fi;\
33 if [ -f "po/tazusb/$$l.po" ]; then \
34 echo -n "Updating $$l po file."; \
35 msgmerge -U po/tazusb/$$l.po po/tazusb/tazusb.pot ; \
36 fi;\
37 done;
39 msgfmt:
40 @for l in $(LINGUAS); do \
41 if [ -f "po/tazusb-box/$$l.po" ]; then \
42 echo "Compiling tazusb-box $$l mo file..."; \
43 mkdir -p po/mo/$$l/LC_MESSAGES; \
44 msgfmt -o po/mo/$$l/LC_MESSAGES/tazusb-box.mo po/tazusb-box/$$l.po ; \
45 fi;\
46 if [ -f "po/tazusb/$$l.po" ]; then \
47 echo "Compiling tazusb $$l mo file..."; \
48 mkdir -p po/mo/$$l/LC_MESSAGES; \
49 msgfmt -o po/mo/$$l/LC_MESSAGES/tazusb.mo po/tazusb/$$l.po ; \
50 fi;\
51 done;
53 # Installation.
55 install: msgfmt
56 @echo "Installing TazUSB into $(DESTDIR)$(PREFIX)/bin..."
57 mkdir -p $(DESTDIR)$(PREFIX)/bin
58 install -m 0755 tazusb $(DESTDIR)$(PREFIX)/bin
59 install -m 0755 tazusb-box $(DESTDIR)$(PREFIX)/bin
60 @echo "Installing Tazusb documentation..."
61 mkdir -p $(DESTDIR)$(DOCDIR)/tazusb
62 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazusb
63 # i18n
64 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
65 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
66 # Desktop integration
67 @echo "Setting up desktop integration..."
68 mkdir -p $(DESTDIR)$(PREFIX)/share
69 cp -a applications $(DESTDIR)$(PREFIX)/share
71 # Uninstallation and tarball clean-up commands.
73 uninstall:
74 rm -f $(DESTDIR)$(PREFIX)/bin/tazusb
75 rm -f $(DESTDIR)$(PREFIX)/bin/tazusb-box
76 rm -rf $(DESTDIR)$(DOCDIR)/tazusb
77 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazusb*.mo
79 clean:
80 rm -rf _pkg
81 rm -rf po/mo
82 rm -f po/*/*~
84 dist-clean:
85 rm -rf $(DISTDIR)
86 rm -f $(DISTDIR).*
88 # Build tarball and MD5 file for packaging.
89 dist: dist-clean
90 hg archive -t tgz $(TARBALL)
91 md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5