Fix gst_version variable generation
diff --git a/debian/changelog b/debian/changelog
index a76109b..8584ecb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gst-plugins-base1.0 (1.2.0-2) UNRELEASED; urgency=low
+
+  * Team upload.
+  * Fix gst_version variable generation.
+
+ -- Fabian Greffrath <fabian+debian@greffrath.com>  Thu, 24 Oct 2013 09:42:01 +0200
+
 gst-plugins-base1.0 (1.2.0-1) unstable; urgency=low
 
   * New upstream stable release:
diff --git a/debian/rules b/debian/rules
index 6496b77..f13b5b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,7 +19,7 @@
 DEB_MAKE_CHECK_TARGET = check || true
 
 # upstream version with epoch
-gst_version := $(shell echo $(DEB_VERSION) | cut -d '-' -f 1)
+gst_version := $(shell dpkg-parsechangelog | sed -n 's/Version: //p' | cut -d '-' -f 1)
 gst_major := 1
 gst_minor := 0
 gst_abi := $(gst_major).$(gst_minor)