chiark / gitweb /
Copyright: Add notices to some more of the (larger) files
[dgit.git] / debian / rules
index e4a246057f610592cd1409e8f76cc14901200b8a..6580f96ebf13618980465ab89873310e76fd8b91 100755 (executable)
@@ -3,7 +3,7 @@
 # dgit
 # Integration between git and Debian-style archives
 #
-# Copyright (C)2013 Ian Jackson
+# Copyright (C)2013-2016 Ian Jackson
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,3 +22,20 @@ 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
+
+override_dh_auto_install:
+       make install prefix=/usr DESTDIR=debian/dgit
+       make install-infra prefix=/usr DESTDIR=debian/dgit-infrastructure
+
+debian/tests/control: tests/enumerate-tests debian/tests/control.in
+       $< gencontrol >$@.new && mv -f $@.new $@
+
+debian/tests/control: tests/lib-core tests/lib-restricts
+debian/tests/control: tests/tests $(wildcard tests/tests/*[^~#])