a66a590070516d15194984d0088c4dfbc013b8a9
[hermes] / package / Makefile
1 #
2 # Makefile for Hermes: Contacts Updated
3 # (c) Andrew Flegg 2009. Released under the Artistic Licence.
4
5 compile:
6         perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control
7         uuencode -m share/hermes-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control
8         py_compilefiles src/*.py
9         cd po && $(MAKE) compile
10         mkdir bin
11
12 install:
13         mkdir -p ${DESTDIR}/opt/hermes/lib ${DESTDIR}/opt/hermes/bin ${DESTDIR}/opt/hermes/share
14         ln -s ../lib/main.py ${DESTDIR}/opt/hermes/bin/hermes
15         cp -r src/* ${DESTDIR}/opt/hermes/lib/
16         chown -R root:root ${DESTDIR}/opt/hermes/lib/
17         install -D -m 0644 -o root -g root src/*.py* ${DESTDIR}/opt/hermes/lib/
18         install -D -m 0644 -o root -g root share/account-*.png share/background.png ${DESTDIR}/opt/hermes/share/
19         install -D -m 0644 -o root -g root share/hermes-64.png ${DESTDIR}/usr/share/icons/hicolor/scalable/hildon/hermes.png
20         install -D -m 0644 -o root -g root share/hermes-48.png ${DESTDIR}/usr/share/icons/hicolor/48x48/hildon/hermes.png
21         install -D -m 0644 -o root -g root share/hermes.desktop ${DESTDIR}/usr/share/applications/hildon/hermes.desktop
22         install -D -m 0644 -o root -g root share/hermes.service ${DESTDIR}/usr/share/dbus-1/services/hermes.service
23         chmod 755 ${DESTDIR}/opt/hermes/lib/main.py
24         cd po && $(MAKE) install 
25
26 clean:
27         rm -f src/*.py[oc]
28         rm -f build-stamp configure-stamp
29         rm -rf debian/hermes bin
30         find . -name *~ -exec rm -f {} \;
31         cd po && $(MAKE) clean
32
33 package:
34         dpkg-buildpackage -rfakeroot -uc -us