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