X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=package%2FMakefile;h=cd218f0bf7efde693ea506751a1e602e463485e7;hb=29147b33e032c50257de06386c8801f18f0542de;hp=5ce83d12bd3d4912e88d658f1666f6c21732a4e5;hpb=17ae3e5da26de31fe0668bc6b03e0bec20aef4dd;p=hermes diff --git a/package/Makefile b/package/Makefile index 5ce83d1..cd218f0 100644 --- a/package/Makefile +++ b/package/Makefile @@ -2,25 +2,36 @@ # Makefile for Hermes: Contacts Updated # (c) Andrew Flegg 2009. Released under the Artistic Licence. +DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') + compile: + perl -pi -e "s/(WimpWorks\.__init__.*?version\s*=\s*)['\"].*?['\"]/\1'${DEBVERS}'/" src/org/maemo/hermes/gui/gtkui.py perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control uuencode -m share/hermes-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control - py_compilefiles src/*.py + py_compilefiles `find src -type f -name '*.py'` + cd po && $(MAKE) compile mkdir bin install: mkdir -p ${DESTDIR}/opt/hermes/lib ${DESTDIR}/opt/hermes/bin ${DESTDIR}/opt/hermes/share - ln -s ../lib/gui.py ${DESTDIR}/opt/hermes/bin/hermes + ln -s ../lib/main.py ${DESTDIR}/opt/hermes/bin/hermes + cp -r src/* ${DESTDIR}/opt/hermes/lib/ + chown -R root:root ${DESTDIR}/opt/hermes/lib/ install -D -m 0644 -o root -g root src/*.py* ${DESTDIR}/opt/hermes/lib/ install -D -m 0644 -o root -g root share/account-*.png share/background.png ${DESTDIR}/opt/hermes/share/ install -D -m 0644 -o root -g root share/hermes-64.png ${DESTDIR}/usr/share/icons/hicolor/scalable/hildon/hermes.png install -D -m 0644 -o root -g root share/hermes-48.png ${DESTDIR}/usr/share/icons/hicolor/48x48/hildon/hermes.png install -D -m 0644 -o root -g root share/hermes.desktop ${DESTDIR}/usr/share/applications/hildon/hermes.desktop install -D -m 0644 -o root -g root share/hermes.service ${DESTDIR}/usr/share/dbus-1/services/hermes.service - chmod 755 ${DESTDIR}/opt/hermes/lib/gui.py + chmod 755 ${DESTDIR}/opt/hermes/lib/main.py + cd po && $(MAKE) install clean: - rm -f src/*.py[oc] + rm -f `find src -type f -name '*.pyo' -o -name '*.pyc'` rm -f build-stamp configure-stamp rm -rf debian/hermes bin find . -name *~ -exec rm -f {} \; + cd po && $(MAKE) clean + +package: + dpkg-buildpackage -rfakeroot -uc -us