Imported Debian patch 1.0.10-6~quilt.3
[nfs-utils.git] / debian / rules
1 #! /usr/bin/make -f
2
3 include /usr/share/quilt/quilt.make
4
5 # Temporary root
6 DEBTMP  := $(shell pwd)/debian/tmp
7
8 build: build-stamp
9 build-stamp: patch
10         dh_testdir
11         CFLAGS="-g -O2 -Wall" ./configure \
12                 --mandir='$${prefix}/share/man' \
13                 --enable-secure-statd 
14         $(MAKE)
15         touch build-stamp
16
17 clean: unpatch
18         dh_testdir
19         dh_testroot
20         rm -f build-stamp
21         rm -rf $(DEBTMP)
22         -$(MAKE) distclean
23         $(RM) utils/rquotad/rquota.h utils/rquotad/rquota_xdr.c
24         dh_clean
25
26 binary-indep: build
27 binary-arch: build
28         dh_testdir
29         dh_testroot
30         dh_clean -k
31         dh_installdirs
32         mkdir $(DEBTMP)
33         $(MAKE) DESTDIR='$(DEBTMP)' install
34         dh_install
35         
36         # Fix up the manpages
37         for f in lockd statd showmount; do \
38                 perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
39                         debian/tmp/usr/share/man/man8/$$f.8; \
40         done;
41         
42         dh_installdocs -A
43         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
44         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
45         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
46         dh_installman
47         dh_link
48         dh_installchangelogs ChangeLog
49         dh_strip
50         dh_compress
51         dh_fixperms
52         dh_installdeb
53         dh_shlibdeps
54         dh_gencontrol
55         dh_md5sums
56         dh_builddeb
57
58 binary: binary-indep binary-arch
59 .PHONY: build clean binary-indep binary-arch binary