-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (52 loc) · 1.74 KB
/
Makefile
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
# Makefile for SliTaz Pizza.
#
PACKAGE="pizza"
PREFIX?=/usr
DESTDIR?=
LINGUAS?=el fa fr it ja pl pt_BR ru sv vi zh_CN
all:
# i18n
pot:
xgettext -o po/pizza.pot -L Shell --package-name="SliTaz Pizza" \
./web/pizza.cgi ./web/pkgs.cgi ./web/rootfs.cgi
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/pizza.mo po/$$l.po; \
done;
# Installation
install: msgfmt
install -m 0755 -d $(DESTDIR)/etc/slitaz
install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pizza/public
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pizza/web
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pizza/web/images
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/pizza/web/lib
install -m 0755 -d $(DESTDIR)$(PREFIX)/share/doc/pizza
install -m 0755 pizza $(DESTDIR)$(PREFIX)/bin
install -m 0755 pizza-bot $(DESTDIR)$(PREFIX)/share/pizza
install -m 0755 public/index.cgi $(DESTDIR)$(PREFIX)/share/pizza/public
install -m 0755 data/* $(DESTDIR)$(PREFIX)/share/pizza
install -m 0644 pizza.conf $(DESTDIR)/etc/slitaz
install -m 0644 README $(DESTDIR)$(PREFIX)/share/doc/pizza
cp -a doc/* $(DESTDIR)$(PREFIX)/share/doc/pizza
cp -a po/mo $(DESTDIR)$(PREFIX)/share/locale
cp -a web $(DESTDIR)$(PREFIX)/share/pizza
chown -R root.root $(DESTDIR)$(PREFIX)/share/pizza
chmod 755 $(DESTDIR)$(PREFIX)/share/pizza/web/*.cgi
uninstall:
rm -rf \
$(DESTDIR)$(PREFIX)/bin/pizza \
$(DESTDIR)/etc/slitaz/pizza.conf \
$(DESTDIR)$(PREFIX)/share/pizza \
$(DESTDIR)$(PREFIX)/share/doc/pizza
clean:
rm -rf po/*~
rm -rf po/mo
rm -rf po/*.mo