chiark / gitweb /
do substition for $dgit_version in rules
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 20:10:24 +0000 (21:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 20:10:24 +0000 (21:10 +0100)
debian/rules
dgit

index e4a2460..fece672 100755 (executable)
@@ -22,3 +22,10 @@ export prefix=/usr
 
 %:
        dh $@
+
+override_dh_gencontrol:
+       dh_gencontrol
+       set -e; \
+        cd debian/dgit; \
+        v=$$(perl -ne 'print if s/^version:\s+//i' DEBIAN/control); \
+        perl -i -pe "s/UNRELEASED/$$v/g if m/###substituted###/" usr/bin/dgit
diff --git a/dgit b/dgit
index fd59eee..91b1aa3 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -28,7 +28,7 @@ use File::Basename;
 use Dpkg::Version;
 use POSIX;
 
-our $dgit_version = 0.14;
+our $dgit_version = 'UNRELEASED'; ###substituted###
 
 our $isuite = 'unstable';
 our $idistro;