05ae363188caf7be2a53f3f9d2e247d2cb0b6ec7
[unscd.git] / debian / rules
1 #!/usr/bin/make -f
2
3 #DH_VERBOSE = 1
4
5
6 PREFIX=$(shell pwd)/debian/nscd/usr
7
8 CFLAGS = -Wall -g
9
10 INSTALL=install
11
12 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
13     CFLAGS += -O0
14 else
15     CFLAGS += -O2
16 endif
17
18
19 build: build-stamp
20 build-stamp:
21         dh_testdir
22
23         gcc $(CFLAGS) -o nscd nscd-*.c
24
25         touch $@
26
27 clean:
28         dh_testdir
29         dh_testroot
30
31         rm -f build-stamp
32
33         rm -f nscd
34
35         dh_clean
36
37 install: build
38         dh_testdir
39         dh_testroot
40         dh_clean -k
41         dh_installdirs
42
43         $(INSTALL) -d $(PREFIX)/sbin/
44         $(INSTALL) -t $(PREFIX)/sbin/ nscd
45
46 binary-indep:
47
48 binary-arch: build install
49         dh_testdir
50         dh_testroot
51         dh_installchangelogs 
52         dh_installdocs README
53         dh_installman
54         dh_installinit
55         dh_link
56         dh_strip
57         dh_compress
58         dh_fixperms
59         dh_installdeb
60         dh_shlibdeps
61         dh_gencontrol
62         dh_md5sums
63         dh_builddeb
64
65 binary: binary-arch
66 .PHONY: build clean binary-arch binary-indep binary install