X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Frules;h=2bd4939551392df9945d1dec60e51c3e91200aa4;hp=f3532ed877ad86f8d1dad63f78af42d50a10e308;hb=59a0a487d5eaeca18593af9d2ca21cd66184431d;hpb=0c4b46267e8ce1a7326f716bb5122e45e791c98c diff --git a/debian/rules b/debian/rules index f3532ed..2bd4939 100755 --- a/debian/rules +++ b/debian/rules @@ -1,34 +1,38 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +#! /usr/bin/make -f -export DH_VERBOSE=1 +include /usr/share/quilt/quilt.make -DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) -DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +# Parsing of DEB_BUILD_OPTIONS flags. +# Note that nostrip is handled automatically by debhelper. +CFLAGS := -g -Wall +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif # Temporary root -DEBTMP := $(shell pwd)/debian/tmp +DEBTMP := $(CURDIR)/debian/tmp -build: build-stamp +build: patch build-stamp build-stamp: dh_testdir -ifeq ($(DEB_HOST_ARCH),ia64) - patch -p1 < debian/bzero.patch -endif - CFLAGS="-g -Wall" ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd - $(MAKE) + --with-tcp-wrappers + $(MAKE) $(MAKEFLAGS) touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp rm -rf $(DEBTMP) - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean binary-indep: build @@ -40,13 +44,6 @@ binary-arch: build mkdir $(DEBTMP) $(MAKE) DESTDIR='$(DEBTMP)' install dh_install - - # Fix up the manpages - for f in lockd statd showmount; do \ - perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \ - debian/tmp/usr/share/man/man8/$$f.8; \ - done; - dh_installdocs -A dh_installdocs -pnfs-common debian/README.Debian.nfsv4 install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common @@ -57,6 +54,7 @@ binary-arch: build dh_strip dh_compress dh_fixperms + chmod u+s debian/nfs-common/sbin/mount.nfs dh_installdeb dh_shlibdeps dh_gencontrol