Switch patch system from dpatch to quilt.
[debian/cpulimit.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 include /usr/share/quilt/quilt.make
13
14 CFLAGS = -Wall -g
15
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
21
22 build: build-stamp
23 build-stamp: $(QUILT_STAMPFN)
24         dh_testdir
25         $(MAKE)
26         touch $@
27
28 clean: unpatch
29         dh_testdir
30         dh_testroot
31         rm -f build-stamp configure-stamp install-stamp
32         [ ! -f Makefile ] || $(MAKE) clean
33         dh_clean 
34
35 install: install-stamp
36 install-stamp: build-stamp
37         dh_testdir
38         dh_testroot
39         dh_clean -k 
40         dh_installdirs usr/bin
41         install cpulimit $(CURDIR)/debian/cpulimit/usr/bin
42         touch $@
43
44 # Build architecture-independent files here.
45 binary-indep: build install
46 # We have nothing to do.
47
48 # Build architecture-dependent files here.
49 binary-arch: build install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs 
53         dh_installdocs
54         dh_installman debian/cpulimit.1
55         dh_strip
56         dh_compress
57         dh_fixperms
58         dh_installdeb
59         dh_shlibdeps
60         dh_gencontrol
61         dh_md5sums
62         dh_builddeb
63
64 binary: binary-indep binary-arch
65 .PHONY: build clean binary-indep binary-arch binary install