tazweb diff Makefile @ rev 121

Add i18n to src, Makefile & README; BSD license from Wikipedia; add comment to .desktop file; add Russian translation to .po and .desktop file
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Feb 27 18:15:40 2013 +0000 (2013-02-27)
parents 4742464dd376
children 2cc313c79f49
line diff
     1.1 --- a/Makefile	Sat Mar 24 15:38:05 2012 +0100
     1.2 +++ b/Makefile	Wed Feb 27 18:15:40 2013 +0000
     1.3 @@ -5,13 +5,36 @@
     1.4  DESTDIR?=
     1.5  
     1.6  PACKAGE=tazweb
     1.7 -VERSION=1.5
     1.8 +VERSION=1.6.4
     1.9 +LINGUAS?=ru
    1.10  
    1.11  all:
    1.12  	gcc src/main.c -o $(PACKAGE) \
    1.13  		`pkg-config --cflags --libs gtk+-2.0 webkit-1.0`
    1.14  	@du -sh $(PACKAGE)
    1.15  
    1.16 +# i18n
    1.17 +
    1.18 +pot:
    1.19 +	xgettext -o po/$(PACKAGE).pot -L C -k_ \
    1.20 +		--package-name="TazWeb" \
    1.21 +		--package-version="$(VERSION)" \
    1.22 +		./src/main.c
    1.23 +
    1.24 +msgmerge:
    1.25 +	@for l in $(LINGUAS); do \
    1.26 +		echo -n "Updating $$l po file."; \
    1.27 +		msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
    1.28 +	done;
    1.29 +
    1.30 +msgfmt:
    1.31 +	@for l in $(LINGUAS); do \
    1.32 +		echo "Compiling $$l mo file..."; \
    1.33 +		mkdir -p po/mo/$$l/LC_MESSAGES; \
    1.34 +		msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
    1.35 +	done;
    1.36 +
    1.37 +
    1.38  install:
    1.39  	mkdir -p \
    1.40  		$(DESTDIR)$(DOCDIR)/$(PACKAGE) \
    1.41 @@ -28,6 +51,13 @@
    1.42  	cp -a data/*.html $(DESTDIR)$(PREFIX)/share/tazweb
    1.43  	install -m 0644 data/style.css \
    1.44  		$(DESTDIR)$(PREFIX)/share/tazweb
    1.45 +	cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.46  
    1.47  clean:
    1.48  	rm -f $(PACKAGE)
    1.49 +	rm -rf po/mo
    1.50 +	rm -f po/*.mo
    1.51 +	rm -f po/*.*~
    1.52 +
    1.53 +help:
    1.54 +	@echo "make [ pot | msgmerge | msgfmt | install | clean ]"