]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/rules
Imported Debian patch 1.0.7-17
[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         # Debian source diffs don't reflect removals.
12         # This kludge will suffice until the next upstream version. *sigh*
13         rm -f debian/nfs-common.conffiles       \
14               debian/nfs-common.config          \
15               debian/nfs-common.files           \
16               debian/nfs-common.templates       \
17               debian/nfs-kernel-server.conffiles\
18               debian/nfs-kernel-server.config   \
19               debian/nfs-kernel-server.templates\
20               debian/nhfsstone.files
21
22         dh_testdir
23         -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
24         -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
25         autoconf
26         ./configure \
27                 --mandir='$${prefix}/share/man' \
28                 --enable-secure-statd
29         $(MAKE)
30         touch build-stamp
31
32 clean:
33         dh_testdir
34         dh_testroot
35         rm -f build-stamp
36         rm -rf $(DEBTMP)
37         # Add here commands to clean up after the build process.
38         -test -r /usr/share/misc/config.sub && rm -f config.sub
39         -test -r /usr/share/misc/config.guess && rm -f config.guess
40         -$(MAKE) distclean
41         rm -f config.log configure
42         dh_clean
43
44 binary-indep: build
45 binary-arch: build
46         dh_testdir
47         dh_testroot
48         dh_clean -k
49         dh_installdirs
50         mkdir $(DEBTMP)
51         # Add here commands to install the files into debian/tmp
52         $(MAKE) install_prefix='$(DEBTMP)' install
53         dh_install --sourcedir=debian/tmp
54         # Fixups Start Here #
55         cd debian && \
56           for f in lockd statd showmount; do \
57             perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
58                 tmp/usr/share/man/man8/$$f.8; \
59           done; \
60           cp --preserve=timestamps etc.exports nfs-kernel-server/etc/exports; \
61           cp --preserve=timestamps idmapd.conf nfs-common/etc/; \
62           cp --preserve=timestamps gssapi_mech.conf nfs-common/etc/; \
63         # Fixups End Here #
64         dh_installdocs -A
65         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
66         dh_installexamples
67         dh_installinit -n
68         dh_installman
69         dh_link
70         dh_installchangelogs ChangeLog
71         dh_strip
72         dh_compress
73         dh_fixperms
74         dh_installdeb
75         dh_shlibdeps
76         dh_gencontrol
77         dh_md5sums
78         dh_builddeb
79
80 binary: binary-indep binary-arch
81 .PHONY: build clean binary-indep binary-arch binary