move the ChangeLog creation to the prebuild target
[fw/altos] / debian / rules
index bf9827e1ff8b73ae217afda8402e393500c9924f..ca1bb03ad57d5b8163eeb4ba6b6887a3240e6d17 100755 (executable)
@@ -2,12 +2,18 @@
 # -*- makefile -*-
 
 export DH_VERBOSE=1
-PKG_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| sed 's/+dfsg//')
+PKG_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)/\1/p')
+
+# this target invoked by git-buildpackage using a clean hook, see .gbp.conf
+prebuild:
+       dch -v `git describe | tr - +` "build for Debian from git"
+       git commit debian/changelog -m "update Debian changelog for build"
+       git log > ChangeLog
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       ./autogen.sh
+       ./autogen.sh --prefix=/usr
        touch configure-stamp
 
 build: build-stamp
@@ -43,7 +49,7 @@ binary-arch: install
        dh_installchangelogs ChangeLog
        dh_installdocs
        dh_installexamples
-#      dh_install
+       dh_install
 #      dh_installmenu
 #      dh_installdebconf
 #      dh_installlogrotate