tazpkg view Makefile @ rev 344

Gettextize tazpkg
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jun 20 17:23:34 2010 +0200 (2010-06-20)
parents d6183a5cf8c4
children c0b11abd0df1
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 @echo "Installing Tazpkg..."
34 install -g root -o root -m 0755 -d $(DESTDIR)$(PREFIX)/bin
35 install -g root -o root -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
36 install -g root -o root -m 0777 tazpkgbox $(DESTDIR)$(PREFIX)/bin
37 @echo "Installing Tazpkgbox libraries..."
38 install -g root -o root -m 0755 -d $(DESTDIR)$(LIBDIR)
39 cp -a lib/tazpkgbox $(DESTDIR)$(LIBDIR)
40 @echo "Installing configuration files..."
41 install -g root -o root -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
42 install -g root -o root -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
43 @echo "Installing documentation files..."
44 install -g root -o root -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
45 install -g root -o root -m 0644 doc/* $(DESTDIR)$(DOCDIR)/tazpkg
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 clean-up commands.
56 uninstall:
57 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
58 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkgbox
59 rm -rf $(DESTDIR)$(LIBDIR)/tazpkgbox
60 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
61 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
62 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
64 clean:
65 rm -rf _pkg
66 rm -rf po/mo