tazpkg view Makefile @ rev 630
Undo eval_gettext typos
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jul 01 10:27:49 2013 +0200 (2013-07-01) |
parents | 444ffc6d1a00 |
children | 5317ffe7bfbb |
line source
1 # Makefile for Tazpkg.
2 #
3 PREFIX?=/usr
4 DOCDIR?=$(PREFIX)/share/doc
5 SYSCONFDIR?=/etc/slitaz
6 DESTDIR?=
7 LINGUAS?=el es fr pt_BR ru
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)" -kaction -ktitle ./tazpkg ./tazpkg-box
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 # tazpanel files
72 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d
73 cp -a pkgs.cgi $(DESTDIR)/var/www/tazpanel
74 cp -a pkgs $(DESTDIR)/var/www/tazpanel/menu.d
75 # The i18n files
76 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
77 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
78 # Desktop integration
79 mkdir -p $(DESTDIR)$(PREFIX)/share
80 cp -a applications $(DESTDIR)$(PREFIX)/share
81 cp -a mime $(DESTDIR)$(PREFIX)/share
82 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
84 # Uninstallation and clean-up commands.
86 uninstall:
87 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
88 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box
89 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/menu.d/pkgs
90 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/pkgs.cgi
91 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
92 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
93 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
94 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
96 clean:
97 rm -rf _pkg
98 rm -rf tar-install
99 rm -rf po/mo
100 rm -f po/*/*~
101 rm -f po/*/*.mo
104 targz:
105 rm -rf ${tmpdir}
106 mkdir -p ${tmpdir}
108 make DESTDIR=${tmpdir} install
110 cd tar-install ; \
111 tar cvzf ${tarball} tazpkg-$(VERSION) ; \
112 cd -
114 @echo "** Tarball successfully created in tar-install/${tarball}"