mediabox view Makefile @ rev 8
Tiny edit
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Fri Feb 24 19:47:21 2017 +0000 (2017-02-24) |
parents | |
children |
line source
1 # Makefile for CGI/SHell Media Box
2 #
4 PACKAGE="mediabox"
5 DESTDIR?=
6 PREFIX?=/usr
7 CGI_BIN?=/var/www/cgi-bin
8 LINGUAS?=fr
10 all: msgfmt
12 pot:
13 xgettext -o po/mediabox.pot -L Shell --package-name="MediaBox" \
14 ./index.cgi ./mediabox
16 msgmerge:
17 @for l in $(LINGUAS); do \
18 echo -n "Updating $$l po file."; \
19 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
20 done;
22 msgfmt:
23 @for l in $(LINGUAS); do \
24 echo "Compiling $$l mo file..."; \
25 mkdir -p po/mo/$$l/LC_MESSAGES; \
26 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
27 done;
29 install:
30 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
31 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
32 install -m 0755 mediabox $(DESTDIR)$(PREFIX)/bin
33 install -m 0644 data/mediabox.desktop $(DESTDIR)$(PREFIX)/share/applications
34 # Web interface
35 install -m 0755 -d $(DESTDIR)$(CGI_BIN)/mediabox
36 install -m 0777 -d $(DESTDIR)$(CGI_BIN)/mediabox/cache
37 install -m 0755 index.cgi $(DESTDIR)$(CGI_BIN)/mediabox
38 cp -r images/ $(DESTDIR)$(CGI_BIN)/mediabox
39 cp -r lib/ $(DESTDIR)$(CGI_BIN)/mediabox
40 cp README $(DESTDIR)$(CGI_BIN)/mediabox
41 # i18n
42 install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
43 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
45 uninstall:
46 rm -f $(DESTDIR)$(PREFIX)/bin/mediabox
47 rm -rf $(DESTDIR)$(CGI_BIN)/mediabox
48 rm -f $(DESTDIR)$(PREFIX)/share/locale/*/mediabox.mo
50 clean:
51 rm -rf po/*~
52 rm -rf po/mo