tazpkg view Makefile @ rev 468

Update tazpkg xhtml-list to look better...
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 08 15:19:52 2011 +0200 (2011-04-08)
parents 18a0552011da
children 7e0df4f72628
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 pt
10 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
12 all:
14 # i18n.
16 pot:
17 xgettext -o po/tazpkg/tazpkg.pot -L Shell \
18 --package-name=Tazpkg \
19 --package-version="$(VERSION)" ./tazpkg
20 xgettext -o po/tazpkg-notify/tazpkg-notify.pot -L Shell \
21 --package-name="Tazpkg Notification" \
22 --package-version="$(VERSION)" ./tazpkg-notify
24 msgmerge:
25 @for l in $(LINGUAS); do \
26 echo -n "Updating $$l po file."; \
27 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \
28 done;
30 msgfmt:
31 @for l in $(LINGUAS); do \
32 echo "Compiling $$l mo file..."; \
33 mkdir -p po/mo/$$l/LC_MESSAGES; \
34 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo po/tazpkg/$$l.po ; \
35 done;
37 # Installation.
39 install: msgfmt
40 # Tazpkg command line interface
41 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
42 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
43 # Tazpkgbox GUI
44 install -m 0777 tazpkgbox $(DESTDIR)$(PREFIX)/bin
45 install -m 0777 tazpkgbox-install $(DESTDIR)$(PREFIX)/bin
46 install -m 0755 -d $(DESTDIR)$(LIBDIR)
47 install -m 0777 lib/libtazpkgbox $(DESTDIR)$(LIBDIR)
48 # Configuration files
49 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
50 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
51 # Documentation
52 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
53 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
54 # The i18n files
55 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
56 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
57 # Desktop integration
58 mkdir -p $(DESTDIR)$(PREFIX)/share
59 cp -a applications $(DESTDIR)$(PREFIX)/share
60 cp -a mime $(DESTDIR)$(PREFIX)/share
61 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
63 # Uninstallation and clean-up commands.
65 uninstall:
66 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
67 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkgbox
68 rm -rf $(DESTDIR)$(LIBDIR)/tazpkgbox
69 rm -f $(DESTDIR)$(LIBDIR)/libtazpkgbox
70 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
71 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
72 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
74 clean:
75 rm -rf _pkg
76 rm -rf po/mo
77 rm -f po/*/*~