tazusb view Makefile @ rev 86

Up AUTHORS and prepa for release
author Christophe Lincoln <pankso@slitaz.org>
date Tue Jun 07 12:21:45 2011 +0200 (2011-06-07)
parents 8f616d2e1490
children b7bdee64a948
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 \
19 --package-name="TazUSB" \
20 --package-version="$(VERSION)" \
21 ./tazusbbox
23 msgmerge:
24 @for l in $(LINGUAS); do \
25 echo -n "Updating $$l po file."; \
26 msgmerge -U po/tazusbbox/$$l.po po/tazusbbox/tazusbbox.pot ; \
27 done;
29 msgfmt:
30 @for l in $(LINGUAS); do \
31 echo "Compiling $$l mo file..."; \
32 mkdir -p po/mo/$$l/LC_MESSAGES; \
33 msgfmt -o po/mo/$$l/LC_MESSAGES/tazusbbox.mo po/tazusbbox/$$l.po ; \
34 done;
36 # Installation.
38 install: msgfmt
39 @echo "Installing TazUSB into $(DESTDIR)$(PREFIX)/bin..."
40 mkdir -p $(DESTDIR)$(PREFIX)/bin
41 install -m 0777 tazusb $(DESTDIR)$(PREFIX)/bin
42 install -m 0777 tazusbbox $(DESTDIR)$(PREFIX)/bin
43 @echo "Installing Tazusb documentation..."
44 mkdir -p $(DESTDIR)$(DOCDIR)/tazusb
45 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazusb
46 # i18n
47 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
48 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
49 # Desktop integration
50 @echo "Setting up desktop integration..."
51 mkdir -p $(DESTDIR)$(PREFIX)/share
52 cp -a applications $(DESTDIR)$(PREFIX)/share
54 # Uninstallation and tarball clean-up commands.
56 uninstall:
57 rm -f $(DESTDIR)$(PREFIX)/bin/tazusb
58 rm -f $(DESTDIR)$(PREFIX)/bin/tazusbbox
59 rm -rf $(DESTDIR)$(DOCDIR)/tazusb
60 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazusb*.mo
62 clean:
63 rm -rf _pkg
64 rm -rf po/mo
65 rm po/*/*~
67 dist-clean:
68 rm -rf $(DISTDIR)
69 rm -f $(DISTDIR).*
71 # Build tarball and MD5 file for packaging.
72 dist: dist-clean
73 hg archive -t tgz $(TARBALL)
74 md5sum $(TARBALL) > $(PACKAGE)-$(VERSION).md5