Install "panucci.backends" module
[panucci.git] / Makefile
blob00e8507aa4766179098a706b50ad93cdc5c7efc0
2 # This file is part of Panucci.
3 # Copyright (c) 2008-2010 The Panucci Audiobook and Podcast Player Project
5 # Panucci 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 # Panucci 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 Panucci. If not, see <http://www.gnu.org/licenses/>.
19 PREFIX ?= /usr
20 DESTDIR ?= /
22 PANUCCIBIN = bin/panucci
23 PANUCCIVERSION = `grep -m 1 app_version bin/panucci | cut -d "'" -f 2`
24 MESSAGESPOT = data/messages.pot
27 PYTHON ?= /usr/bin/python2.5
29 all:
30 @echo "Possible make targets:"
31 @echo " install - install the package"
32 @echo " clean - remove the build files"
33 @echo " distclean - remove build files + dist target"
34 @echo " test - test the application"
36 install: gen_gettext python-install dbus-service-install post-install install-schemas
38 dbus-service-install:
39 sed 's|@INSTALL_PREFIX@|'/$(PREFIX)'|g' < \
40 data/panucci.service.in > data/panucci.service
41 mkdir -p $(DESTDIR)/$(PREFIX)/share/dbus-1/services/
42 install data/panucci.service $(DESTDIR)/$(PREFIX)/share/dbus-1/services/
44 python-install:
45 $(PYTHON) setup.py install --optimize 2 --root=$(DESTDIR) --prefix=$(PREFIX)
47 copy-schemas:
48 mkdir -p $(DESTDIR)/etc/gconf/schemas
49 install data/panucci.schemas $(DESTDIR)/etc/gconf/schemas
51 install-schemas:
52 GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
53 gconftool-2 --makefile-install-rule data/panucci.schemas
54 # This isn't a problem, gconf gets started when it's needed
55 # DON'T WORRY IF THIS FAILS, kay?
56 -killall gconfd-2
58 post-install:
59 gtk-update-icon-cache -f -i $(DESTDIR)$(PREFIX)/share/icons/hicolor/
60 update-desktop-database $(DESTDIR)$(PREFIX)/share/applications/
62 clean:
63 rm -rf build
64 rm -f src/panucci/*.pyc src/panucci/*.pyo
65 rm -f src/panucci/backends/*.pyc src/panucci/backends/*.pyo
66 rm -f data/panucci.service
67 make -C data/po clean
69 distclean: clean
70 rm -rf dist
72 test:
73 PYTHONPATH=src/ python bin/panucci --debug
75 ptest:
76 LD_LIBRARY_PATH=/usr/lib/gtk-2.0/modules GTK_MODULES=gtkparasite \
77 PYTHONPATH=src/ python bin/panucci --debug
79 build-package:
80 # See: http://wiki.maemo.org/Uploading_to_Extras#Debian_tooling
81 dpkg-buildpackage -rfakeroot -sa -i -I.git
83 messagespot:
84 xgettext -k_ --from-code utf-8 --language Python \
85 -o $(MESSAGESPOT) bin/panucci src/panucci/*.py src/panucci/backends/*.py
86 sed -i \
87 -e 's/SOME DESCRIPTIVE TITLE/Panucci translation template/g' \
88 -e 's/THE PACKAGE'"'"'S COPYRIGHT HOLDER/Panucci Contributors/g' \
89 -e 's/YEAR/2009/g' \
90 -e 's/FIRST AUTHOR <EMAIL@ADDRESS>/Nick Nobody <me@nikosapi.org>/g' \
91 -e 's/PACKAGE VERSION/Panucci '$(PANUCCIVERSION)'/g' \
92 -e 's/-Bugs-To: /-Bugs-To: gpodder-panucci@lists.berlios.de/g' \
93 -e 's/PACKAGE/Panucci/g' $(MESSAGESPOT)
95 gen_gettext: messagespot
96 make -C data/po generators
97 make -C data/po update