Updated changelog to 0.2-2
[jamaendo] / Makefile
1 #
2 # This file is part of Jamaendo.
3 # Copyright (c) 2010 Kristoffer Gronlund
4 #
5 # Jamaendo 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.
9 #
10 # Jamaendo 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.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Jamaendo.  If not, see <http://www.gnu.org/licenses/>.
17 #
18
19 PREFIX ?= /usr
20 DESTDIR ?= /
21
22 JAMAENDOBIN = scripts/jamaendo
23 JAMAENDOVERSION = `grep -m 1 VERSION jamaui/ui.py | cut -d "'" -f 2`
24 #MESSAGESPOT = data/messages.pot
25
26
27 PYTHON ?= /usr/bin/python2.5
28
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
35 install: python-install post-install install-schemas
36
37 python-install:
38         $(PYTHON) setup.py install --optimize 2 --root=$(DESTDIR) --prefix=$(PREFIX)
39
40 post-install:
41         gtk-update-icon-cache -f -i $(DESTDIR)$(PREFIX)/share/icons/hicolor/
42         update-desktop-database $(DESTDIR)$(PREFIX)/share/applications/
43
44 clean:
45         rm -rf build
46         rm -f jamaendo/*.pyc jamaendo/*.pyo
47         rm -f jamaui/*.pyc jamaui/*.pyo
48 #       make -C data/po clean
49
50 distclean: clean
51         rm -rf dist
52
53 # See: http://wiki.maemo.org/Uploading_to_Extras#Debian_tooling
54 build-package:
55         dpkg-buildpackage -rfakeroot -sa -kkristoffer.gronlund@purplescout.se -i -I.git
56
57 #messagespot:
58 #       xgettext -k_ --from-code utf-8 --language Python \
59 #         -o $(MESSAGESPOT) scripts/jamaendo jamaendo/*.py jamaui/*.py
60 #       sed -i \
61 #         -e 's/SOME DESCRIPTIVE TITLE/Jamaendo translation template/g' \
62 #         -e 's/THE PACKAGE'"'"'S COPYRIGHT HOLDER/Jamaendo Contributors/g' \
63 #         -e 's/YEAR/2010/g' \
64 #         -e 's/FIRST AUTHOR <EMAIL@ADDRESS>/Nick Nobody <me@nikosapi.org>/g' \
65 #         -e 's/PACKAGE VERSION/Jamaendo '$(JAMAENDOVERSION)'/g' \
66 #         -e 's/-Bugs-To: /-Bugs-To: kegie+jamaendo@ovi.com/g' \
67 #         -e 's/PACKAGE/Jamaendo/g' $(MESSAGESPOT)
68
69 #gen_gettext: messagespot
70 #       make -C data/po generators
71 #       make -C data/po update