tazirc rev 5
Add the Makefile
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Jan 14 21:42:18 2014 +0100 (2014-01-14) |
parents | cc47a2b744c4 |
children | 92dac62b8fd0 |
files | Makefile |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Tue Jan 14 21:42:18 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +# Makefile for SliTaz IRC. 1.5 +# 1.6 + 1.7 +PREFIX?=/usr 1.8 +DESTDIR?= 1.9 +LINGUAS?=fr 1.10 + 1.11 +VERSION=1.0 1.12 + 1.13 +all: msgfmt 1.14 + 1.15 +# i18n. 1.16 + 1.17 +pot: 1.18 + xgettext -o po/tazirc.pot -L Shell --package-name="TazIRC" \ 1.19 + --package-version="$(VERSION)" ./tazirc ./tazirc-lb 1.20 + 1.21 +msgmerge: 1.22 + @for l in $(LINGUAS); do \ 1.23 + if [ -f "po/$$l.po" ]; then \ 1.24 + echo -n "Updating $$l po file."; \ 1.25 + msgmerge -U po/$$l.po po/tazirc.pot ; \ 1.26 + fi;\ 1.27 + done; 1.28 + 1.29 +msgfmt: 1.30 + @for l in $(LINGUAS); do \ 1.31 + if [ -f "po/$$l.po" ]; then \ 1.32 + echo "Compiling TazIRC $$l mo file..."; \ 1.33 + mkdir -p po/mo/$$l/LC_MESSAGES; \ 1.34 + msgfmt -o po/mo/$$l/LC_MESSAGES/tazirc.mo po/$$l.po ; \ 1.35 + fi;\ 1.36 + done; 1.37 + 1.38 +# Install 1.39 + 1.40 +install: 1.41 + install -m 0777 -d $(DESTDIR)$(PREFIX)/bin 1.42 + #install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications 1.43 + install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale 1.44 + install -m 0755 tazirc $(DESTDIR)$(PREFIX)/bin 1.45 + install -m 0755 tazirc-lb $(DESTDIR)$(PREFIX)/bin 1.46 + #install -m 0644 data/*.desktop \ 1.47 + $(DESTDIR)$(PREFIX)/share/applications 1.48 + cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale 1.49 + 1.50 +# Uninstall 1.51 + 1.52 +uninstall: 1.53 + rm -f $(DESTDIR)$(PREFIX)/bin/tazirc* 1.54 + #rm -f $(DESTDIR)$(PREFIX)/share/applications/tazirc* 1.55 + rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazirc.mo 1.56 + 1.57 +# Clean 1.58 + 1.59 +clean: 1.60 + rm -rf po/*~ 1.61 + rm -rf po/mo