diff -Naur tar-1.14/debian/rules tar-1.14-patched/debian/rules
--- tar-1.14/debian/rules	2005-06-14 13:46:25.984250215 +0300
+++ tar-1.14-patched/debian/rules	2005-06-14 13:47:25.280133419 +0300
@@ -3,6 +3,13 @@
 # This is the debhelper compatability version to use.
 export DH_COMPAT=2
 
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	RUN_TEST = no
+endif
+ifneq (,$(findstring notest,$(DEB_BUILD_OPTIONS)))
+	RUN_TEST = no
+endif
+
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
@@ -17,7 +24,7 @@
 	dh_testdir
 
 	RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" $(MAKE)
-	(cd tests ; $(MAKE) check-TESTS)
+	[ "$(RUN_TEST)" == "no" ] || (cd tests ; $(MAKE) check-TESTS)
 
 	touch build-stamp
 

