2 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
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'))
12 DEBTMP := $(shell pwd)/debian/tmp
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
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
28 $(SETGCC) ./configure \
29 --mandir='$${prefix}/share/man' \
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
42 rm -f config.log configure
45 # Build architecture-independent files here.
47 # We have nothing to do by default.
49 # Build architecture-dependent files here.
56 # Add here commands to install the files into debian/tmp
57 $(MAKE) install_prefix='$(DEBTMP)' install
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; \
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
78 dh_installchangelogs ChangeLog
90 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
92 binary: binary-indep binary-arch
93 .PHONY: build clean binary-indep binary-arch binary