tazpkg view Makefile @ rev 633

Add Polish translation (thanks Pawel Pyrczak); merge tazpkg, tazpkg-notify and other *pkg* translations into one; simplify plural translations using $num; normalize name (Tazpkg, TazPKG -> TazPkg); move markup outside translations; re-use categories names in tazpkg and tazpanel; other tiny improvements.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jul 25 01:47:48 2013 +0300 (2013-07-25)
parents 182ffcf8e9eb
children 4019a25fde20
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 pl pt_BR ru sv
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.pot -L Shell \
20 --package-name=TazPkg \
21 --package-version="$(VERSION)" -kaction -ktitle \
22 ./tazpkg ./tazpkg-box ./pkgs ./pkgs.cgi ./tazpkg-notify
24 msgmerge:
25 @for l in $(LINGUAS); do \
26 if [ -f "po/$$l.po" ]; then \
27 echo -n "Updating $$l po file."; \
28 msgmerge -U po/$$l.po po/tazpkg.pot ; \
29 fi; \
30 done
32 msgfmt:
33 @for l in $(LINGUAS); do \
34 if [ -f "po/$$l.po" ]; then \
35 echo -n "Compiling tazpkg $$l mo file... "; \
36 mkdir -p po/mo/$$l/LC_MESSAGES; \
37 msgfmt -o po/mo/$$l/LC_MESSAGES/tazpkg.mo \
38 po/$$l.po ; \
39 echo "done"; \
40 fi; \
41 done;
43 # Installation.
45 install: msgfmt
46 # TazPkg command line interface
47 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
48 install -m 0777 tazpkg $(DESTDIR)$(PREFIX)/bin
49 # TazPkg-box GUI
50 install -m 0777 tazpkg-notify $(DESTDIR)$(PREFIX)/bin
51 install -m 0777 tazpkg-box $(DESTDIR)$(PREFIX)/bin
52 # Configuration files
53 install -m 0755 -d $(DESTDIR)$(SYSCONFDIR)
54 install -m 0644 tazpkg.conf $(DESTDIR)$(SYSCONFDIR)
55 # Documentation
56 install -m 0755 -d $(DESTDIR)$(DOCDIR)/tazpkg
57 cp -a doc/* $(DESTDIR)$(DOCDIR)/tazpkg
58 # TazPanel files
59 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/menu.d
60 cp -a pkgs.cgi $(DESTDIR)/var/www/tazpanel
61 cp -a pkgs $(DESTDIR)/var/www/tazpanel/menu.d
62 # The i18n files
63 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
64 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
65 # Desktop integration
66 mkdir -p $(DESTDIR)$(PREFIX)/share
67 cp -a applications $(DESTDIR)$(PREFIX)/share
68 cp -a mime $(DESTDIR)$(PREFIX)/share
69 cp -a pixmaps $(DESTDIR)$(PREFIX)/share
71 # Uninstallation and clean-up commands.
73 uninstall:
74 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
75 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box
76 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/menu.d/pkgs
77 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/pkgs.cgi
78 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
79 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
80 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
81 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
83 clean:
84 rm -rf _pkg
85 rm -rf tar-install
86 rm -rf po/mo
87 rm -f po/*~
88 rm -f po/*.mo
91 targz:
92 rm -rf ${tmpdir}
93 mkdir -p ${tmpdir}
95 make DESTDIR=${tmpdir} install
97 cd tar-install ; \
98 tar cvzf ${tarball} tazpkg-$(VERSION) ; \
99 cd -
101 @echo "** Tarball successfully created in tar-install/${tarball}"
103 help:
104 @echo "make [ pot | msgmerge | msgfmt | all | install | uninstall | clear | targz ]"