9729fa368c5755390896f6770089dd4075d98cb1
[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         # Add here commands to install the files into debian/tmp
36         $(MAKE) DESTDIR='$(DEBTMP)' install
37         dh_install --sourcedir=debian/tmp
38         # Fixups Start Here #
39         cd debian && \
40           for f in lockd statd showmount; do \
41             perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
42                 tmp/usr/share/man/man8/$$f.8; \
43           done;
44         # Fixups End Here #
45         
46         # Move all files that will be managed by ucf
47         install -m 0644 debian/idmapd.conf debian/nfs-common/usr/share/nfs-common/conffiles/
48         install -m 0644 debian/nfs-common.default debian/nfs-common/usr/share/nfs-common/conffiles/
49         install -m 0644 debian/nfs-kernel-server.default debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
50         install -m 0644 debian/etc.exports debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
51         
52         install -m 0644 debian/idmapd.conf.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/
53         install -m 0644 debian/nfs-common.default.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/
54         install -m 0644 debian/nfs-kernel-server.default.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
55         install -m 0644 debian/etc.exports.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/
56         
57         dh_installdocs -A
58         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
59         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
60         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
61         dh_installman
62         dh_link
63         dh_installchangelogs ChangeLog
64         dh_strip
65         dh_compress
66         dh_fixperms
67         dh_installdeb
68         dh_shlibdeps
69         dh_gencontrol
70         dh_md5sums
71         dh_builddeb
72
73 binary: binary-indep binary-arch
74 .PHONY: build clean binary-indep binary-arch binary