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