summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 5b393484bf..0de4103742 100755
--- a/debian/rules
+++ b/debian/rules
@@ -82,6 +82,7 @@ build: build-stamp
build-stamp: config.status
dh_testdir
+ ! [ debian/micro-revision.i ] || cp debian/micro-revision.i src/or/micro-revision.i
$(MAKE)
@echo
@@ -130,9 +131,15 @@ clean: unpatch
dh_testroot
rm -f build-stamp
rm -f src/common/common_sha1.i src/or/or_sha1.i
+ rm -f src/or/micro-revision.i
[ ! -f Makefile ] || $(MAKE) distclean
+ # Normally the .deb wouldn't ship with a ../.git
+ if [ -d .git ] && which git >/dev/null; then \
+ echo "\"`git rev-parse --short=16 HEAD`\"" > "debian/micro-revision.i" ; \
+ fi
+
dh_clean
install: build