--- /tmp/debian/rules	2007-05-30 17:29:07.000000000 +0300
+++ chrpath-0.13/debian/rules	2007-05-30 17:32:55.000000000 +0300
@@ -8,6 +8,13 @@
 # This is the debhelper compatability version to use.
 export LANG=C
 
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	RUN_TEST = no
+endif
+ifneq (,$(findstring notest,$(DEB_BUILD_OPTIONS)))
+	RUN_TEST = no
+endif
+
 configure: config.status
 config.status:
 	dh_testdir
@@ -20,7 +27,7 @@
 	dh_testdir
 
 	$(MAKE)
-	$(MAKE) check
+	[ "$(RUN_TEST)" == "no" ] || $(MAKE) check
 	touch build-stamp
 
 clean:

