Imported Debian patch 1.1.1-4
[nfs-utils.git] / debian / rules
1 #! /usr/bin/make -f
2
3 include /usr/share/quilt/quilt.make
4
5 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
6
7 # Temporary root
8 DEBTMP := $(CURDIR)/debian/tmp
9
10 build: patch build-stamp
11 build-stamp:
12         dh_testdir
13         CFLAGS="-g -O2 -Wall" ./configure \
14                 --mandir='$${prefix}/share/man' \
15                 --enable-secure-statd \
16                 --with-tcp-wrappers
17         $(MAKE)
18         touch build-stamp
19
20 clean: unpatch
21         dh_testdir
22         dh_testroot
23         rm -f build-stamp
24         rm -rf $(DEBTMP)
25         [ ! -f Makefile ] || $(MAKE) distclean
26         dh_clean
27
28 binary-indep: build
29 binary-arch: build
30         dh_testdir
31         dh_testroot
32         dh_clean -k
33         dh_installdirs
34         mkdir $(DEBTMP)
35         $(MAKE) DESTDIR='$(DEBTMP)' install
36         dh_install
37         dh_installdocs -A
38         dh_installdocs -pnfs-common debian/README.Debian.nfsv4
39         install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common
40         install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
41         dh_installman
42         dh_link
43         dh_installchangelogs ChangeLog
44         #dh_strip
45         dh_compress
46         dh_fixperms -Xmount.nfs
47         dh_installdeb
48         dh_shlibdeps
49         dh_gencontrol
50         dh_md5sums
51         dh_builddeb
52
53 binary: binary-indep binary-arch
54 .PHONY: build clean binary-indep binary-arch binary