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