]> git.decadent.org.uk Git - nfs-utils.git/blob - debian/rules
1.0.8
[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         dh_install
50         # Add here commands to install the files into debian/tmp
51         $(MAKE) DESTDIR='$(DEBTMP)' install
52         dh_movefiles
53         # Fixups Start Here #
54         cd debian && \
55           for f in lockd statd showmount; do \
56             mv tmp/usr/sbin/*$$f nfs-common/sbin; \
57             perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \
58                 nfs-common/usr/share/man/man8/$$f.8; \
59           done; \
60           rm -f tmp/usr/sbin/*quota*; \
61           rm -f tmp/usr/share/man/man8/*quota*; \
62           rm -rf tmp/var/lib/nfs/*; \
63           cp --preserve=timestamps etc.exports tmp/etc/exports
64         # Fixups End Here #
65         dh_installdocs -A README
66         dh_installexamples
67 #       dh_installmenu
68         dh_installinit -n
69 #       dh_installcron
70 #       dh_installmanpages
71 #       dh_undocumented
72         dh_installchangelogs ChangeLog
73         dh_strip
74         dh_compress
75         dh_fixperms
76         dh_installdebconf
77         dh_installdeb
78 #       dh_makeshlibs
79         dh_shlibdeps
80         dh_gencontrol
81         dh_md5sums
82         dh_builddeb
83
84 source diff:                                                                  
85         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
86
87 binary: binary-indep binary-arch
88 .PHONY: build clean binary-indep binary-arch binary