-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (64 loc) · 1.92 KB
/
Makefile
File metadata and controls
78 lines (64 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Makefile for SliTaz Bugs.
#
PACKAGE="tazbug"
PREFIX?=/usr
DESTDIR?=
WEB?=/var/www
VAR?=/var/lib/slitaz
LINGUAS?=de el es fr ja pl pt_BR ru vi zh_CN
all: msgfmt
# i18n
pot:
xgettext -o po/tazbug.pot -L Shell --package-name="SliTaz Bugs" \
./web/bugs.cgi \
./web/plugins/dashboard/dashboard.cgi \
./web/plugins/mybugs/mybugs.cgi \
./web/plugins/packages/packages.cgi \
./web/plugins/users/users.cgi
xgettext -o po/cli/tazbug-cli.pot -L Shell --package-name="Tazbug cli" \
./tazbug
msgmerge:
@for l in $(LINGUAS); do \
echo -n "Updating $$l po file."; \
msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
done;
msgfmt:
@for l in $(LINGUAS); do \
echo "Compiling $$l mo file..."; \
mkdir -p po/mo/$$l/LC_MESSAGES; \
msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
done;
# Client install only. Server part is not packaged
install:
install -m 0777 -d $(DESTDIR)$(PREFIX)/bin
install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications
install -m 0755 tazbug $(DESTDIR)$(PREFIX)/bin
install -m 0644 data/tazbug.desktop \
$(DESTDIR)$(PREFIX)/share/applications
# On SliTaz vhost: make install-web WEB=/home/slitaz/www
install-web:
install -m 0700 -d $(DESTDIR)$(VAR)/people
install -m 0700 -d $(DESTDIR)$(VAR)/auth
install -m 0777 -d $(DESTDIR)$(WEB)/bugs
# authfile
touch $(DESTDIR)$(VAR)/auth/people
chmod 0600 $(DESTDIR)$(VAR)/auth/people
# admin users
touch $(DESTDIR)$(VAR)/auth/admin
chmod 0600 $(DESTDIR)$(VAR)/auth/people
cp -a web/* $(DESTDIR)$(WEB)/bugs
cp README $(DESTDIR)$(WEB)/bugs
chown -R www.www $(DESTDIR)$(VAR)/*
chown -R www.www $(DESTDIR)$(WEB)/bugs/bug
# i18n
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale
cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
# Uninstall client
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/tazbug*
rm -f $(DESTDIR)$(PREFIX)/share/applications/tazbug*
rm -f $(DESTDIR)$(PREFIX)/etc/slitaz/tazbug.conf
# Clean source
clean:
rm -rf po/mo
rm -f po/*~