66d1e5a4b5ad0c827a5aa66aaf8aae9be6914f20
[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 # Uncomment this to turn on verbose mode.
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         dh_testdir
17         # Add here commands to compile the package.
18         $(SETGCC) ./configure \
19                 --mandir='$${prefix}/share/man' \
20                 --enable-secure-statd
21         $(MAKE)
22         touch build-stamp
23
24 clean:
25         dh_testdir
26         dh_testroot
27         rm -f build-stamp
28         # Add here commands to clean up after the build process.
29         -$(MAKE) distclean
30         dh_clean
31
32 # Build architecture-independent files here.
33 binary-indep: build
34 # We have nothing to do by default.
35
36 # Build architecture-dependent files here.
37 binary-arch: build
38         dh_testdir
39         dh_testroot
40         dh_clean -k
41         dh_installdirs
42         # Add here commands to install the files into debian/tmp
43         $(MAKE) install_prefix='$(DEBTMP)' install
44         dh_movefiles
45         # Fixups Start Here #
46         cd debian && \
47           for f in lockd statd showmount; do \
48             mv tmp/usr/sbin/*$$f nfs-common/sbin; \
49             perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
50                 nfs-common/usr/share/man/man8/$$f.8; \
51           done; \
52           rm -f tmp/usr/sbin/*quota*; \
53           rm -f tmp/usr/share/man/man8/*quota*; \
54           ( cd tmp && rm -rf var/lib/nfs && rmdir -p var/lib )
55         # Fixups End Here #
56         dh_installdocs -A README
57         dh_installexamples
58 #       dh_installmenu
59         dh_installinit -n
60 #       dh_installcron
61 #       dh_installmanpages
62 #       dh_undocumented
63         dh_installchangelogs ChangeLog
64         dh_strip
65         dh_compress
66         dh_fixperms
67         dh_installdebconf
68         dh_installdeb
69 #       dh_makeshlibs
70         dh_shlibdeps
71         dh_gencontrol
72         dh_md5sums
73         dh_builddeb
74
75 source diff:                                                                  
76         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
77
78 binary: binary-indep binary-arch
79 .PHONY: build clean binary-indep binary-arch binary