Updated German translation for gPodder 2.0
[gpodder.git] / Makefile
blob4abb972a689746dab2bc4e11967cafa02b5772ce
2 # gPodder - A media aggregator and podcast client
3 # Copyright (c) 2005-2009 Thomas Perl and the gPodder Team
5 # gPodder is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # gPodder is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##########################################################################
22 BINFILE=bin/gpodder
23 MESSAGESPOT=data/messages.pot
25 UIFILES=$(wildcard data/ui/*.ui \
26 data/ui/desktop/*.ui \
27 data/ui/maemo/*.ui)
28 UIFILES_H=$(subst .ui,.ui.h,$(UIFILES))
29 TRANSLATABLE_SOURCE=$(wildcard src/gpodder/*.py \
30 src/gpodder/gtkui/*.py \
31 src/gpodder/gtkui/interface/*.py \
32 src/gpodder/gtkui/desktop/*.py \
33 src/gpodder/gtkui/maemo/*.py)
35 HELP2MAN=help2man
36 MANPAGE=doc/man/gpodder.1
37 GPODDERVERSION=`cat $(BINFILE) |grep ^__version__.*=|cut -d\" -f2`
39 GPODDER_ICON_THEME=dist/gpodder
41 ROSETTA_FILES=$(MESSAGESPOT) data/po/*.po
42 ROSETTA_ARCHIVE=gpodder-rosetta-upload.tar.gz
44 CHANGELOG=ChangeLog
45 CHANGELOG_TMP=.ChangeLog.tmp
46 CHANGELOG_EDT=.ChangeLog.edit
47 CHANGELOG_BKP=.ChangeLog.backup
48 EMAIL ?= $$USER@`hostname -f`
50 DESTDIR ?= /
51 PREFIX ?= /usr
53 # default editor of user has not set "EDITOR" env variable
54 EDITOR ?= vim
56 ##########################################################################
58 all: help
60 help:
61 @echo 'make test run gpodder in local directory'
62 @echo 'make unittest run doctests + unittests'
63 @echo 'make mtest run gpodder (for maemo scratchbox)'
64 @echo 'make release create source tarball in "dist/"'
65 @echo 'make releasetest run some tests before the release'
66 @echo 'make install install gpodder into "$(PREFIX)"'
67 @echo 'make uninstall uninstall gpodder from "$(PREFIX)"'
68 @echo 'make generators generate manpage and icons (if needed)'
69 @echo 'make messages rebuild messages.pot from new source'
70 @echo 'make rosetta-upload generate a tarball of all translation files'
71 @echo 'make clean remove generated+temp+*.py{c,o} files'
72 @echo 'make distclean do a "make clean" + remove "dist/"'
73 @echo ''
74 @echo 'make install-git-menuitem Add shortcuts to your menu for this git checkout'
75 @echo 'make remove-git-menuitem Remove shortcuts created by "install-git-menuitem"'
76 @echo ''
77 @echo '(1) Please set environment variable "EMAIL" to your e-mail address'
79 ##########################################################################
81 test:
82 @# set xterm title to know what this window does ;)
83 @echo -ne '\033]0;gPodder console (make test)\007'
84 $(BINFILE) --verbose
86 unittest:
87 PYTHONPATH=src/ python -m gpodder.unittests
89 mtest:
90 @# in maemo scratchbox, we need this for osso/hildon
91 run-standalone.sh python2.5 $(BINFILE) --maemo --verbose
93 deb:
94 debuild
96 release: distclean
97 python setup.py sdist
99 releasetest: unittest
100 desktop-file-validate data/gpodder.desktop
101 make -C data/po validate
103 install: generators
104 python setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
106 update-icons:
107 gtk-update-icon-cache -f -i $(PREFIX)/share/icons/hicolor/
109 uninstall:
110 @echo "##########################################################################"
111 @echo "# MAKE UNINSTALL STILL NOT READY FOR PRIME TIME, WILL DO MY BEST TO #"
112 @echo "# REMOVE FILES INSTALLED BY GPODDER. WATCH INSTALL PROCESS AND REMOVE #"
113 @echo "# THE REST OF THE PACKAGES MANUALLY TO COMPLETELY REMOVE GPODDER. #"
114 @echo "##########################################################################"
115 rm -rf $(PREFIX)/share/gpodder $(PREFIX)/share/pixmaps/gpodder* $(PREFIX)/share/applications/gpodder.desktop $(PREFIX)/share/man/man1/gpodder.1 $(PREFIX)/bin/gpodder $(PREFIX)/lib/python?.?/site-packages/gpodder/ $(PREFIX)/share/locale/*/LC_MESSAGES/gpodder.mo
117 ##########################################################################
119 generators: $(MANPAGE)
120 make -C data/po update
122 messages: gen_gettext
124 $(MANPAGE): src/gpodder/__init__.py
125 $(HELP2MAN) --name="A Media aggregator and Podcast catcher" -N $(BINFILE) >$(MANPAGE)
127 gen_gettext: $(MESSAGESPOT)
128 make -C data/po generators
129 make -C data/po update
131 data/ui/%.ui.h: $(subst .ui.h,.h,$@)
132 intltool-extract --type=gettext/glade $(subst .ui.h,.ui,$@)
134 $(MESSAGESPOT): src/gpodder/*.py $(BINFILE) $(UIFILES_H) $(TRANSLATABLE_SOURCE)
135 xgettext -k_ -kN_ -o $(MESSAGESPOT) $(TRANSLATABLE_SOURCE) $(UIFILES_H) $(BINFILE)
136 sed -i'~' -e 's/SOME DESCRIPTIVE TITLE/gPodder translation template/g' -e 's/YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/2006 Thomas Perl/g' -e 's/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR/Thomas Perl <thp@perli.net>, 2006/g' -e 's/PACKAGE VERSION/gPodder '$(GPODDERVERSION)'/g' -e 's/PACKAGE/gPodder/g' $(MESSAGESPOT)
138 rosetta-upload: $(ROSETTA_ARCHIVE)
139 @echo 'You can now upload the archive to launchpad.net: ' $(ROSETTA_ARCHIVE)
141 $(ROSETTA_ARCHIVE):
142 tar czvf $(ROSETTA_ARCHIVE) $(ROSETTA_FILES)
144 install-git-menuitem:
145 doc/dev/install-desktopentry.sh
147 remove-git-menuitem:
148 doc/dev/install-desktopentry.sh --remove
150 gpodder-icon-theme:
151 rm -rf $(GPODDER_ICON_THEME)
152 mkdir -p $(GPODDER_ICON_THEME)
153 python doc/dev/icon-theme/list-icon-names.py >$(GPODDER_ICON_THEME)/names
154 (cd $(GPODDER_ICON_THEME) && \
155 python ../../doc/dev/icon-theme/pack-icons.py && \
156 python ../../doc/dev/icon-theme/create-index.py >index.theme && \
157 rm -f names)
159 ##########################################################################
161 clean:
162 python setup.py clean
163 rm -f src/gpodder/*.pyc src/gpodder/gtkui/*.pyc src/gpodder/gtkui/interface/*.pyc src/gpodder/gtkui/maemo/*.pyc src/gpodder/gtkui/desktop/*.pyc src/gpodder/*.pyo src/gpodder/*.bak MANIFEST PKG-INFO $(UIFILES_H) data/messages.pot~ data/gpodder-??x??.png $(ROSETTA_ARCHIVE) .coverage
164 rm -rf build
165 make -C data/po clean
167 debclean:
168 fakeroot debian/rules clean
170 distclean: clean
171 rm -rf dist
173 ##########################################################################
175 .PHONY: all test unittest release releasetest install update-icons generators gen_manpage gen_graphics clean distclean messages help install-git-menuitem remove-git-menuitem
177 ##########################################################################