ssfs view Makefile @ rev 107

Makefile: add "de" to LINGUAS
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Dec 01 23:43:36 2016 +0200 (2016-12-01)
parents d58d297540cd
children
line source
1 # Makefile for Ssfs
2 #
3 PREFIX?=/usr
4 DOCDIR?=$(PREFIX)/share/doc
5 DESTDIR?=
7 PACKAGE=ssfs
8 VERSION=1.0
9 PROJECTS=ssfs-server ssfs
10 LINGUAS=de el fr pt_BR ru zh_CN zh_TW
12 all: msgfmt
14 # i18n
16 pot:
17 xgettext -o po/ssfs/ssfs.pot -L Shell \
18 --package-name="Ssfs Client" \
19 --package-version="$(VERSION)" \
20 ./ssfs ./ssfs-box
21 xgettext -o po/ssfs-server/ssfs-server.pot -L Shell \
22 --package-name="Ssfs Server" \
23 --package-version="$(VERSION)" \
24 ./ssfs-server
26 msgmerge:
27 @for p in $(PROJECTS); do \
28 for l in $(LINGUAS); do \
29 if [ -f "po/$$p/$$l.po" ]; then \
30 echo -n "Updating $$p $$l po file."; \
31 msgmerge -U po/$$p/$$l.po po/$$p/$$p.pot; \
32 fi; \
33 done; \
34 done;
36 msgfmt:
37 @for p in $(PROJECTS); do \
38 for l in $(LINGUAS); do \
39 if [ -f "po/$$p/$$l.po" ]; then \
40 echo -e "Compiling $$p $$l mo file...\n"; \
41 mkdir -p po/mo/$$l; \
42 msgfmt -o po/mo/$$l/$$p.mo po/$$p/$$l.po; \
43 fi; \
44 done; \
45 done;
47 # Installation
49 install:
50 mkdir -p $(DESTDIR)/bin \
51 $(DESTDIR)/etc/$(PACKAGE) \
52 $(DESTDIR)$(DOCDIR)/$(PACKAGE) \
53 $(DESTDIR)$(PREFIX)/bin \
54 $(DESTDIR)$(PREFIX)/sbin \
55 $(DESTDIR)/var/lib/$(PACKAGE) \
56 $(DESTDIR)$(PREFIX)/share/applications \
57 $(DESTDIR)$(PREFIX)/share/pixmaps \
58 $(DESTDIR)$(PREFIX)/share/locale \
59 $(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin
60 install -m 0755 $(PACKAGE)-sh $(DESTDIR)/bin
61 install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin
62 install -m 0755 $(PACKAGE)-box $(DESTDIR)$(PREFIX)/bin
63 install -m 0755 $(PACKAGE)-server $(DESTDIR)$(PREFIX)/sbin
64 install -m 0644 README $(DESTDIR)$(DOCDIR)/$(PACKAGE)
65 install -m 0644 data/$(PACKAGE)-server.conf $(DESTDIR)/etc/$(PACKAGE)
66 install -m 0644 data/$(PACKAGE).png $(DESTDIR)$(PREFIX)/share/pixmaps
67 install -m 0644 data/$(PACKAGE).desktop \
68 $(DESTDIR)$(PREFIX)/share/applications
69 install -m 0755 $(PACKAGE)-env \
70 $(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin
71 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
72 touch $(DESTDIR)/var/lib/$(PACKAGE)/vdisk.files
74 clean:
75 rm -rf po/mo
76 rm -f po/*/*~
78 help:
79 @echo ""
80 @echo "make: pot msgmerge msgfmt install clean"
81 @echo ""