* Add patch to fix 'cpulimit drops priority, then can't get back up. Fix
[debian/cpulimit.git] / debian / rules
index 7fea5cfee3eea0356d5b8c7a651d8cf63d2c8189..bf418ed09a9c7c93a4c0d9b38474b3fb0b5ad950 100755 (executable)
@@ -9,6 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpatch/dpatch.make
 
 CFLAGS = -Wall -g
 
@@ -21,26 +22,21 @@ endif
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-
        touch configure-stamp
 
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: configure-stamp patch
        dh_testdir
-
        $(MAKE)
-
        touch build-stamp
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
-       rm -f build-stamp configure-stamp
-
+       rm -f build-stamp configure-stamp patch-stamp
        [ ! -f Makefile ] || $(MAKE) clean
-
        dh_clean 
 
 install: build
@@ -48,7 +44,6 @@ install: build
        dh_testroot
        dh_clean -k 
        dh_installdirs
-
        install cpulimit $(CURDIR)/debian/cpulimit/usr/bin