tazpkg view Makefile @ rev 346

Add tazpkg pot file (can be used by translators)
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jun 20 17:59:59 2010 +0200 (2010-06-20)
parents f6dba4eac84a
children 9273e7309025
line source
1 # Makefile for Tazpkg.
2 #
3 PREFIX?=/usr
4 DOCDIR?=$(PREFIX)/share/doc
5 LIBDIR?=$(PREFIX)/lib/slitaz
6 SYSCONFDIR?=/etc/slitaz
7 DESTDIR?=
8 LINGUAS?=fr
10 all:
12 # i18n.
14 pot:
15 xgettext -o po/tazpkg/tazpkg.pot -L Shell --package-name=Tazpkg ./tazpkg
17 msgmerge:
18 @for l in $(LINGUAS); do \
19 echo -n "Updating $$l po file."; \
20 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \
21 done;
23 msgfmt:
24 @for l in $(LINGUAS); do \
25 echo "Compiling $$l mo file..."; \
26 mkdir -p po/mo/$$l/LC_MESSAGES; \
27 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo po/tazpkg/$$l.po ; \
28 done;
30 # Installation.
32 install: msgfmt
33 # Tazpkg command line interface
34 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
35 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
36 install -m 0777 tazpkgbox $(DESTDIR)$(PREFIX)/bin
37 # Tazpkgbox GUI
38 install -m 0755 -d $(DESTDIR)$(LIBDIR)
39 cp -a lib/tazpkgbox $(DESTDIR)$(LIBDIR)
40 # Configuration files
41 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
42 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
43 # Documentation
44 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
45 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
46 # The i18n files
47 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
48 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
49 # Desktop integration
50 mkdir -p $(DESTDIR)$(PREFIX)/share
51 cp -a applications $(DESTDIR)$(PREFIX)/share
53 # Uninstallation and clean-up commands.
55 uninstall:
56 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
57 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkgbox
58 rm -rf $(DESTDIR)$(LIBDIR)/tazpkgbox
59 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
60 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
61 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
63 clean:
64 rm -rf _pkg
65 rm -rf po/mo