tazpkg view Makefile @ rev 641

Added /etc/xdg/autostart/tazpkg-notify.desktop so TazPKG Notify will start with user session
author Christophe Lincoln <pankso@slitaz.org>
date Mon Dec 23 13:38:43 2013 +0100 (2013-12-23)
parents 5317ffe7bfbb
children 91458aa88694
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
70 # TazPKG Notify XDG autostart
71 mkdir -p $(DESTDIR)/etc/xdg
72 cp -a xdg/autostart $(DESTDIR)/etc/xdg
75 # Uninstallation and clean-up commands.
77 uninstall:
78 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg
79 rm -f $(DESTDIR)$(PREFIX)/bin/tazpkg-box
80 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/menu.d/pkgs
81 rm -f $(DESTDIR)$(PREFIX)/var/www/tazpanel/pkgs.cgi
82 rm -rf $(DESTDIR)$(PREFIX)/tazpkg-notify
83 rm -rf $(DESTDIR)$(DOCDIR)/tazpkg
84 rm -f $(DESTDIR)$(SYSCONFDIR)/tazpkg.conf
85 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg*.mo
87 clean:
88 rm -rf _pkg
89 rm -rf tar-install
90 rm -rf po/mo
91 rm -f po/*~
92 rm -f po/*.mo
95 targz:
96 rm -rf ${tmpdir}
97 mkdir -p ${tmpdir}
99 make DESTDIR=${tmpdir} install
101 cd tar-install ; \
102 tar cvzf ${tarball} tazpkg-$(VERSION) ; \
103 cd -
105 @echo "** Tarball successfully created in tar-install/${tarball}"
107 help:
108 @echo "make [ pot | msgmerge | msgfmt | all | install | uninstall | clear | targz ]"