tazpkg view Makefile @ rev 593
Disable multi pkg install, it's not well implemented
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 14 19:08:47 2012 +0200 (2012-04-14) |
parents | 230623a89764 |
children | de952705379e |
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 es
9 VERSION:=$(shell grep ^VERSION=[0-9] tazpkg | cut -d '=' -f 2)
11 tmpdir = tar-install/tazpkg-$(VERSION)
12 tarball = tazpkg-$(VERSION).tar.gz
14 all: msgfmt
16 # i18n.
18 pot:
19 xgettext -o po/tazpkg/tazpkg.pot -L Shell \
20 --package-name=Tazpkg \
21 --package-version="$(VERSION)" ./tazpkg
22 xgettext -o po/tazpkg-notify/tazpkg-notify.pot -L Shell \
23 --package-name="Tazpkg Notification" \
24 --package-version="$(VERSION)" ./tazpkg-notify
26 msgmerge:
27 @for l in $(LINGUAS); do \
28 if [ -f "po/tazpkg/$$l.po" ]; then \
29 echo -n "Updating $$l po file."; \
30 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \
31 fi; \
32 if [ -f "po/tazpkg-notify/$$l.po" ]; then \
33 echo -n "Updating $$l po file."; \
34 msgmerge -U po/tazpkg-notify/$$l.po po/tazpkg-notify/tazpkg-notify.pot; \
35 fi; \
36 done
38 msgfmt:
39 @for l in $(LINGUAS); do \
40 if [ -f "po/tazpkg/$$l.po" ]; then \
41 echo -n "Compiling tazpkg $$l mo file... "; \
42 mkdir -p po/mo/$$l/LC_MESSAGES; \
43 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \
44 po/tazpkg/$$l.po ; \
45 echo "done"; \
46 fi; \
47 if [ -f "po/tazpkg-notify/$$l.po" ]; then \
48 echo -n "Compiling tazpkg-notify $$l mo file... "; \
49 mkdir -p po/mo/$$l/LC_MESSAGES; \
50 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg-notify.mo \
51 po/tazpkg-notify/$$l.po ; \
52 echo "done"; \
53 fi; \
54 done;
56 # Installation.
58 install: msgfmt
59 # Tazpkg command line interface
60 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
61 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
62 # Tazpkg-box GUI
63 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin
64 install -m 0777 tazpkg-box $(DESTDIR)$(PREFIX)/bin
65 # Configuration files
66 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
67 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
68 # Documentation
69 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
70 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
71 # The i18n files
72 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
73 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
74 # Desktop integration
75 mkdir -p $(DESTDIR)$(PREFIX)/share
76 cp -a applications $(DESTDIR)$(PREFIX)/share
77 cp -a mime $(DESTDIR)$(PREFIX)/share
78 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
80 # Uninstallation and clean-up commands.
82 uninstall:
83 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
84 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box
85 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
86 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
87 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
88 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
90 clean:
91 rm -rf _pkg
92 rm -rf tar-install
93 rm -rf po/mo
94 rm -f po/*/*~
95 rm -f po/*/*.mo
98 targz:
99 rm -rf ${tmpdir}
100 mkdir -p ${tmpdir}
102 make DESTDIR=${tmpdir} install
104 cd tar-install ; \
105 tar cvzf ${tarball} tazpkg-$(VERSION) ; \
106 cd -
108 @echo "** Tarball successfully created in tar-install/${tarball}"