--- a/include/generate.py
+++ b/include/generate.py
@@ -62,6 +62,13 @@ v = subprocess.check_output([
     (os.path.join(srcroot, ".git"))
     ], shell=True, universal_newlines=True).strip()
 
+# override VCS_Version with the content of debian/vcs_version, if it exists
+try:
+    v = open(os.path.join(srcroot, "debian", "vcs_version")).readline().strip()
+except IOError as e:
+    if e.errno != errno.ENOENT:
+        raise
+
 vcsfn = os.path.join(srcroot, "include", "vcs_version.h")
 
 try:
