chiark / gitweb /
do substition for $dgit_version in rules
[dgit.git] / debian / rules
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