Use package version since git info won't be available.
diff --git a/debian/rules b/debian/rules
index 689c523..26d2880 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,16 @@
#!/usr/bin/make -f
+DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
+DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
+
CFLAGS = -Wall -g
export DH_VERBOSE=1
%:
dh --with autoreconf $@ --fail-missing
+
+override_dh_autoreconf:
+ echo $(VERSION) > .tarball-version
+ dh_autoreconf