summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules27
1 files changed, 22 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index f5aaa95545..28d7359521 100755
--- a/debian/rules
+++ b/debian/rules
@@ -66,6 +66,11 @@ endif
configure: patch-stamp
config.status: configure
+ # clean up test.h stuff. XXX - expected to no longer be needed after tor-0.2.2.4-alpha
+ rm -f src/test/test.h.orig
+ ! [ -e src/test/test.h ] || mv src/test/test.h src/test/test.h.orig
+ cp debian/src-test-test.h src/test/test.h
+
@if [ "$(LOCALHOST_IP)" != "127.0.0.1" ]; then echo; echo; echo; echo; echo; echo "######################################################################"; echo "WARNING: This system does not think localhost is 127.0.0.1. Will ignore result of testsuite. Please fix your system/chroot."; echo "######################################################################"; echo; echo; echo; echo; echo "Note: 'getent hosts localhost' should return '127.0.0.1 localhost'"; echo; fi
dh_testdir
CFLAGS="$(CFLAGS)" ./configure \
@@ -82,6 +87,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
@@ -90,14 +96,14 @@ build-stamp: config.status
@if [ "$(RUN_TEST)" != "no" ]; then \
if [ "$(LOCALHOST_IP)" != "127.0.0.1" ]; then \
echo; echo; echo "######################################################################"; echo "WARNING: This system does not think localhost is 127.0.0.1. Will ignore result of testsuite. Please fix your system/chroot."; echo "######################################################################"; echo; echo; \
- echo "src/or/test || true"; \
- src/or/test || true; \
+ echo "make check || true"; \
+ make check || true; \
else \
- echo "src/or/test"; \
- src/or/test; \
+ echo "make check"; \
+ make check; \
fi; \
else \
- echo -e "\n\nSkipping unittests\n\n"; \
+ echo; echo; echo "Skipping unittests"; echo; \
fi
@echo
@@ -129,9 +135,20 @@ clean: unpatch
dh_testdir
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
+ # clean up test.h stuff. XXX - expected to no longer be needed after tor-0.2.2.4-alpha
+ rm -f src/test/test.h
+ ! [ -e src/test/test.h.orig ] || mv src/test/test.h.orig src/test/test.h
+
+ # 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