Make build system update version number, so it doesn't need to be maintained separately.
[hermes] / package / Makefile
index a66a590..cd218f0 100644 (file)
@@ -2,10 +2,13 @@
 # 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
 
@@ -24,7 +27,7 @@ install:
        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 {} \;