tazpkg view Makefile @ rev 495

tazpkg: fix warnings for PACKAGE_FILE
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 18 21:17:11 2011 +0200 (2011-05-18)
parents f0cb9cf0dce3
children 345c64fbdc04
line source
1 # Makefile for Tazpkg.
2 #
3 PREFIX?=/usr
4 DOCDIR?=$(PREFIX)/share/doc
5 SYSCONFDIR?=/etc/slitaz
6 DESTDIR?=
7 LINGUAS?=fr pt
9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
11 all:
13 # i18n.
15 pot:
16 xgettext -o po/tazpkg/tazpkg.pot -L Shell \
17 --package-name=Tazpkg \
18 --package-version="$(VERSION)" ./tazpkg
19 xgettext -o po/tazpkg-notify/tazpkg-notify.pot -L Shell \
20 --package-name="Tazpkg Notification" \
21 --package-version="$(VERSION)" ./tazpkg-notify
23 msgmerge:
24 @for l in $(LINGUAS); do \
25 if [ -f "po/tazpkg/$$l.po" ]; then; \
26 echo -n "Updating $$l po file."; \
27 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \
28 fi; \
29 if [ -f "po/tazpkg-notify/$$l.po" ]; then; \
30 echo -n "Updating $$l po file."; \
31 msgmerge -U po/tazpkg-notify/$$l.po \
32 po/tazpkg-notify/tazpkg-notify.pot; \
33 fi; \
34 done;
36 msgfmt:
37 @for l in $(LINGUAS); do \
38 if [ -f "po/tazpkg/$$l.po" ]; then; \
39 echo "Compiling $$l mo file..."; \
40 mkdir -p po/mo/$$l/LC_MESSAGES; \
41 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \
42 po/tazpkg/$$l.po ; \
43 fi; \
44 if [ -f "po/tazpkg-notify/$$l.po" ]; then; \
45 echo "Compiling $$l mo file..."; \
46 mkdir -p po/mo/$$l/LC_MESSAGES; \
47 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg-notify.mo \
48 po/tazpkg-notify/$$l.po ; \
49 fi; \
51 done;
53 # Installation.
55 install:
56 # Tazpkg command line interface
57 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
58 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
59 # Tazpkgbox GUI
60 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin
61 install -m 0777 tazpkgbox-install $(DESTDIR)$(PREFIX)/bin
62 # Configuration files
63 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
64 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
65 # Documentation
66 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
67 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
68 # The i18n files
69 #cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
71 # Desktop integration
72 mkdir -p $(DESTDIR)$(PREFIX)/share
73 cp -a applications $(DESTDIR)$(PREFIX)/share
74 cp -a mime $(DESTDIR)$(PREFIX)/share
75 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
77 # Uninstallation and clean-up commands.
79 uninstall:
80 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
81 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkgbox
82 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
83 rm -f $(DESTDIR)$(PREFIX)/tazpkgbox-install
84 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
85 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
86 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
88 clean:
89 rm -rf _pkg
90 rm -rf po/mo
91 rm -f po/*/*~
92 rm -f po/*/*.mo