]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/rules
Merge branch 'upstream'
[nfs-utils.git] / debian / rules
1 #! /usr/bin/make -f
2
3 include /usr/share/quilt/quilt.make
4
5 # Parsing of DEB_BUILD_OPTIONS flags.
6 # Note that nostrip is handled automatically by debhelper.
7 CFLAGS := -g -Wall
8 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
9     CFLAGS += -O0
10 else
11     CFLAGS += -O2
12 endif
13 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
14     NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
15     MAKEFLAGS += -j$(NUMJOBS)
16 endif
17
18 # Temporary root
19 DEBTMP := $(CURDIR)/debian/tmp
20
21 build: patch build-stamp
22 build-stamp:
23         dh_testdir
24         CFLAGS="$(CFLAGS)" ./configure \
25                 --mandir='$${prefix}/share/man' \
26                 --enable-secure-statd \
27                 --with-tcp-wrappers
28         $(MAKE) $(MAKEFLAGS)
29         touch build-stamp
30
31 clean: unpatch
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp
35         rm -rf $(DEBTMP)
36         [ ! -f Makefile ] || $(MAKE) distclean
37         dh_clean
38
39 binary-indep: build
40 binary-arch: build
41         dh_testdir
42         dh_testroot
43         dh_clean -k
44         dh_installdirs
45         mkdir $(DEBTMP)
46         $(MAKE) DESTDIR='$(DEBTMP)' install
47         dh_install
48         dh_installdocs -A
49         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
50         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
51         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
52         dh_installman
53         dh_link
54         dh_installchangelogs ChangeLog
55         dh_strip
56         dh_compress
57         dh_fixperms
58         chmod u+s debian/nfs-common/sbin/mount.nfs
59         dh_installdeb
60         dh_shlibdeps
61         dh_gencontrol
62         dh_md5sums
63         dh_builddeb
64
65 binary: binary-indep binary-arch
66 .PHONY: build clean binary-indep binary-arch binary