]> 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 # Parsing of DEB_BUILD_OPTIONS flags.
4 # Note that nostrip is handled automatically by debhelper.
5 CFLAGS := -g -Wall
6 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
7     CFLAGS += -O0
8 else
9     CFLAGS += -O2
10 endif
11 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
12     NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
13     MAKEFLAGS += -j$(NUMJOBS)
14 endif
15
16 # Temporary root
17 DEBTMP := $(CURDIR)/debian/tmp
18
19 build: build-stamp
20 build-stamp:
21         dh_testdir
22         CFLAGS="$(CFLAGS)" ./configure \
23                 --mandir='$${prefix}/share/man' \
24                 --disable-tirpc \
25                 --with-tcp-wrappers
26         $(MAKE) $(MAKEFLAGS)
27         touch build-stamp
28
29 clean:
30         dh_testdir
31         dh_testroot
32         rm -f build-stamp
33         rm -rf $(DEBTMP)
34         [ ! -f Makefile ] || $(MAKE) distclean
35         dh_clean
36
37 binary-indep: build
38 binary-arch: build
39         dh_testdir
40         dh_testroot
41         dh_prep
42         dh_installdirs
43         mkdir $(DEBTMP)
44         $(MAKE) DESTDIR='$(DEBTMP)' install
45         dh_install
46         dh_installdocs -A
47         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
48         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
49         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
50         dh_installman
51         dh_link
52         dh_installchangelogs ChangeLog
53         dh_strip
54         dh_compress
55         dh_fixperms
56         chmod u+s debian/nfs-common/sbin/mount.nfs
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