]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/rules
Imported Debian patch 1.2.1-1
[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                 --with-tcp-wrappers
25         $(MAKE) $(MAKEFLAGS)
26         touch build-stamp
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-stamp
32         rm -rf $(DEBTMP)
33         [ ! -f Makefile ] || $(MAKE) distclean
34         dh_clean
35
36 binary-indep: build
37 binary-arch: build
38         dh_testdir
39         dh_testroot
40         dh_clean -k
41         dh_installdirs
42         mkdir $(DEBTMP)
43         $(MAKE) DESTDIR='$(DEBTMP)' install
44         dh_install
45         dh_installdocs -A
46         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
47         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
48         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
49         dh_installman
50         dh_link
51         dh_installchangelogs ChangeLog
52         dh_strip
53         dh_compress
54         dh_fixperms
55         chmod u+s debian/nfs-common/sbin/mount.nfs
56         dh_installdeb
57         dh_shlibdeps
58         dh_gencontrol
59         dh_md5sums
60         dh_builddeb
61
62 binary: binary-indep binary-arch
63 .PHONY: build clean binary-indep binary-arch binary