tazpkg view Makefile @ rev 514
tazpkg: Fixed typo in usage.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Jun 03 13:24:52 2011 +0000 (2011-06-03) |
parents | 3c5a8949732f |
children | 22f7288b8253 |
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_BR
9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
11 all: msgfmt
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 po/tazpkg-notify/tazpkg-notify.pot; \
32 fi; \
33 done
35 msgfmt:
36 @for l in $(LINGUAS); do \
37 if [ -f "po/tazpkg/$$l.po" ]; then \
38 echo -n "Compiling tazpkg $$l mo file... "; \
39 mkdir -p po/mo/$$l/LC_MESSAGES; \
40 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \
41 po/tazpkg/$$l.po ; \
42 echo "done"; \
43 fi; \
44 if [ -f "po/tazpkg-notify/$$l.po" ]; then \
45 echo -n "Compiling tazpkg-notify $$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 echo "done"; \
50 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 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
70 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