tazusb view Makefile @ rev 83

tazusb: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 07 10:13:44 2011 +0200 (2011-06-07)
parents 671df117fb6f
children 616060482c3a
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?=fr pt
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/tazusbbox/tazusbbox.pot -L Shell ./tazusbbox
20 msgmerge:
21 @for l in $(LINGUAS); do \
22 echo -n "Updating $$l po file."; \
23 msgmerge -U po/tazusbbox/$$l.po po/tazusbbox/tazusbbox.pot ; \
24 done;
26 msgfmt:
27 @for l in $(LINGUAS); do \
28 echo "Compiling $$l mo file..."; \
29 mkdir -p po/mo/$$l/LC_MESSAGES; \
30 msgfmt -o po/mo/$$l/LC_MESSAGES/tazusbbox.mo po/tazusbbox/$$l.po ; \
31 done;
33 # Installation.
35 install: msgfmt
36 @echo "Installing TazUSB into $(DESTDIR)$(PREFIX)/bin..."
37 mkdir -p $(DESTDIR)$(PREFIX)/bin
38 install -m 0777 tazusb $(DESTDIR)$(PREFIX)/bin
39 install -m 0777 tazusbbox $(DESTDIR)$(PREFIX)/bin
40 @echo "Installing Tazusb documentation..."
41 mkdir -p $(DESTDIR)$(DOCDIR)/tazusb
42 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazusb
43 # i18n
44 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
45 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
46 # Desktop integration
47 @echo "Setting up desktop integration..."
48 mkdir -p $(DESTDIR)$(PREFIX)/share
49 cp -a applications $(DESTDIR)$(PREFIX)/share
51 # Uninstallation and tarball clean-up commands.
53 uninstall:
54 rm -f $(DESTDIR)$(PREFIX)/bin/tazusb
55 rm -f $(DESTDIR)$(PREFIX)/bin/tazusbbox
56 rm -rf $(DESTDIR)$(DOCDIR)/tazusb
57 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazusb*.mo
59 clean:
60 rm -rf _pkg
61 rm -rf po/mo
62 rm po/*/*~
64 dist-clean:
65 rm -rf $(DISTDIR)
66 rm -f $(DISTDIR).*
68 # Build tarball and MD5 file for packaging.
69 dist: dist-clean
70 hg archive -t tgz $(TARBALL)
71 md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5