|
@@ -10,6 +10,7 @@
|
|
|
# from having to guess our platform (since we know it already)
|
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
+LOCALHOST_IP ?= $(shell getent hosts localhost | awk '{print $$1}')
|
|
|
|
|
|
CFLAGS = -Wall -g
|
|
|
|
|
@@ -49,6 +50,7 @@ endif
|
|
|
|
|
|
configure: patch-stamp
|
|
|
config.status: configure
|
|
|
+ @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 \
|
|
|
--host=$(DEB_HOST_GNU_TYPE) \
|
|
@@ -70,8 +72,15 @@ build-stamp: config.status
|
|
|
@echo
|
|
|
@echo
|
|
|
# Running unit tests
|
|
|
- if [ "$(RUN_TEST)" != "no" ]; then \
|
|
|
- src/or/test; \
|
|
|
+ @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; \
|
|
|
+ else \
|
|
|
+ echo "src/or/test"; \
|
|
|
+ src/or/test; \
|
|
|
+ fi; \
|
|
|
else \
|
|
|
echo -e "\n\nSkipping unittests\n\n"; \
|
|
|
fi
|
|
@@ -170,7 +179,8 @@ binary-arch: build install
|
|
|
# dh_installcron
|
|
|
dh_installman
|
|
|
dh_link
|
|
|
- #dh_strip
|
|
|
+ # Change this for debhelper compatibility level 5 or later!
|
|
|
+ dh_strip --dbg-package=tor
|
|
|
dh_compress
|
|
|
dh_fixperms
|
|
|
dh_installdeb
|
|
@@ -178,6 +188,7 @@ binary-arch: build install
|
|
|
dh_gencontrol
|
|
|
dh_md5sums
|
|
|
dh_builddeb
|
|
|
+ @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. Result of testsuite has been ignored. Please fix your system/chroot."; echo "######################################################################"; echo; echo; echo; echo; echo "Note: 'getent hosts localhost' should return '127.0.0.1 localhost'"; echo; fi
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|