don't ship a zero-length ChangeLog, when it's easy to make one...
[fw/altos] / debian / rules
index b81278a156de9ca1c288feb5caf604580d831496..8ea2a60a74345e9b8f8ce7fe93bbb73290f15026 100755 (executable)
@@ -2,18 +2,26 @@
 # -*- makefile -*-
 
 export DH_VERBOSE=1
+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"
+       
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       ./autogen.sh
+       ./autogen.sh --prefix=/usr
+       make ChangeLog
        touch configure-stamp
 
 build: build-stamp
 
 build-stamp: configure-stamp  
        dh_testdir
-       $(MAKE)
+       $(MAKE) VERSION=$(PKG_VERSION)
        touch $@
 
 clean: 
@@ -42,7 +50,7 @@ binary-arch: install
        dh_installchangelogs ChangeLog
        dh_installdocs
        dh_installexamples
-#      dh_install
+       dh_install
 #      dh_installmenu
 #      dh_installdebconf
 #      dh_installlogrotate