7d6a9d7a86603f51908bd90738b7193df0f322ed
[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         CFLAGS="$(CFLAGS)" $(MAKE)
26         touch $@
27
28 clean: unpatch
29         dh_testdir
30         dh_testroot
31         rm -f build-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_install cpulimit usr/bin
41         touch $@
42
43 # Build architecture-independent files here.
44 binary-indep: build install
45 # We have nothing to do.
46
47 # Build architecture-dependent files here.
48 binary-arch: build install
49         dh_testdir
50         dh_testroot
51         dh_installchangelogs
52         dh_installdocs
53         dh_installman debian/cpulimit.1
54         dh_strip
55         dh_compress
56         dh_fixperms
57         dh_installdeb
58         dh_shlibdeps
59         dh_gencontrol
60         dh_md5sums
61         dh_builddeb
62
63 binary: binary-indep binary-arch
64 .PHONY: build clean binary-indep binary-arch binary install