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