]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/rules
Imported Debian patch 1.0.7-4
[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_COMPAT=5
5 export DH_VERBOSE=1
6
7 # You can use gcc 2.7.2 if it's installed,
8 #   but I don't think that's necessary any more.
9 #SETGCC := CC=$(notdir $(shell which gcc272 gcc 2>/dev/null | sed '1q'))
10
11 # Temporary root
12 DEBTMP  := $(shell pwd)/debian/tmp
13
14 build: build-stamp
15 build-stamp:
16         # Debian source diffs don't reflect removals.
17         # This kludge will suffice until the next upstream version. *sigh*
18         rm -f debian/nfs-common.config          \
19               debian/nfs-common.templates       \
20               debian/nfs-kernel-server.config   \
21               debian/nfs-kernel-server.templates
22
23         dh_testdir
24         # Add here commands to compile the package.
25         -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
26         -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
27         autoconf
28         $(SETGCC) ./configure \
29                 --mandir='$${prefix}/share/man' \
30                 --enable-secure-statd
31         $(MAKE)
32         touch build-stamp
33
34 clean:
35         dh_testdir
36         dh_testroot
37         rm -f build-stamp
38         # Add here commands to clean up after the build process.
39         -test -r /usr/share/misc/config.sub && rm -f config.sub
40         -test -r /usr/share/misc/config.guess && rm -f config.guess
41         -$(MAKE) distclean
42         rm -f config.log configure
43         dh_clean
44
45 # Build architecture-independent files here.
46 binary-indep: build
47 # We have nothing to do by default.
48
49 # Build architecture-dependent files here.
50 binary-arch: build
51         dh_testdir
52         dh_testroot
53         dh_clean -k
54         dh_installdirs
55         dh_install
56         # Add here commands to install the files into debian/tmp
57         $(MAKE) install_prefix='$(DEBTMP)' install
58         dh_movefiles
59         # Fixups Start Here #
60         cd debian && \
61           for f in lockd statd showmount; do \
62             mv tmp/usr/sbin/*$$f nfs-common/sbin; \
63             perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
64                 nfs-common/usr/share/man/man8/$$f.8; \
65           done; \
66           rm -f tmp/usr/sbin/*quota*; \
67           rm -f tmp/usr/share/man/man8/*quota*; \
68           rm -rf tmp/var/lib/nfs/*; \
69           cp --preserve=timestamps etc.exports tmp/etc/exports
70         # Fixups End Here #
71         dh_installdocs -A
72         dh_installexamples
73 #       dh_installmenu
74         dh_installinit -n
75 #       dh_installcron
76 #       dh_installmanpages
77 #       dh_undocumented
78         dh_installchangelogs ChangeLog
79         dh_strip
80         dh_compress
81         dh_fixperms
82         dh_installdeb
83 #       dh_makeshlibs
84         dh_shlibdeps
85         dh_gencontrol
86         dh_md5sums
87         dh_builddeb
88
89 source diff:                                                                  
90         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
91
92 binary: binary-indep binary-arch
93 .PHONY: build clean binary-indep binary-arch binary