tazbug view Makefile @ rev 159

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 08:28:10 2019 +0100 (2019-02-26)
parents 1f5468a81629
children
line source
1 # Makefile for SliTaz Bugs.
2 #
4 PACKAGE="tazbug"
5 PREFIX?=/usr
6 DESTDIR?=
7 WEB?=/var/www
8 VAR?=/var/lib/slitaz
9 LINGUAS?=de el es fr ja pl pt_BR ru vi zh_CN
11 all: msgfmt
13 # i18n
15 pot:
16 xgettext -o po/tazbug.pot -L Shell --package-name="SliTaz Bugs" \
17 ./web/bugs.cgi \
18 ./web/plugins/dashboard/dashboard.cgi \
19 ./web/plugins/mybugs/mybugs.cgi \
20 ./web/plugins/packages/packages.cgi \
21 ./web/plugins/users/users.cgi
22 xgettext -o po/cli/tazbug-cli.pot -L Shell --package-name="Tazbug cli" \
23 ./tazbug
25 msgmerge:
26 @for l in $(LINGUAS); do \
27 echo -n "Updating $$l po file."; \
28 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
29 done;
31 msgfmt:
32 @for l in $(LINGUAS); do \
33 echo "Compiling $$l mo file..."; \
34 mkdir -p po/mo/$$l/LC_MESSAGES; \
35 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
36 done;
38 # Client install only. Server part is not packaged
40 install:
41 install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
42 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
43 install -m 0755 tazbug $(DESTDIR)$(PREFIX)/bin
44 install -m 0644 data/tazbug.desktop \
45 $(DESTDIR)$(PREFIX)/share/applications
47 # On SliTaz vhost: make install-web WEB=/home/slitaz/www
49 install-web:
50 install -m 0700 -d $(DESTDIR)$(VAR)/people
51 install -m 0700 -d $(DESTDIR)$(VAR)/auth
52 install -m 0777 -d $(DESTDIR)$(WEB)/bugs
53 # authfile
54 touch $(DESTDIR)$(VAR)/auth/people
55 chmod 0600 $(DESTDIR)$(VAR)/auth/people
56 # admin users
57 touch $(DESTDIR)$(VAR)/auth/admin
58 chmod 0600 $(DESTDIR)$(VAR)/auth/people
59 cp -a web/* $(DESTDIR)$(WEB)/bugs
60 cp README $(DESTDIR)$(WEB)/bugs
61 chown -R www.www $(DESTDIR)$(VAR)/*
62 chown -R www.www $(DESTDIR)$(WEB)/bugs/bug
63 # i18n
64 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
65 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
67 # Uninstall client
69 uninstall:
70 rm -f $(DESTDIR)$(PREFIX)/bin/tazbug*
71 rm -f $(DESTDIR)$(PREFIX)/share/applications/tazbug*
72 rm -f $(DESTDIR)$(PREFIX)/etc/slitaz/tazbug.conf
74 # Clean source
76 clean:
77 rm -rf po/mo
78 rm -f po/*~