X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Frules;h=1386ba1d852008e102e3188c2384b238f273017c;hp=d1f160a87d7cd01de74a8ec9ae0fe44add4bf7b4;hb=2dd083c5bdb5b38729b46dc65c886c77aa5a82b9;hpb=ba2d04e42f22276f0c990a4c2ce56c647ba9c235 diff --git a/debian/rules b/debian/rules index d1f160a..1386ba1 100755 --- a/debian/rules +++ b/debian/rules @@ -2,21 +2,30 @@ 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-stamp: patch +build: patch build-stamp +build-stamp: dh_testdir - CFLAGS="-g -O2 -Wall" ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd - $(MAKE) + --enable-secure-statd \ + --with-tcp-wrappers + $(MAKE) $(MAKEFLAGS) touch build-stamp clean: unpatch @@ -24,8 +33,7 @@ clean: unpatch dh_testroot rm -f build-stamp rm -rf $(DEBTMP) - -$(MAKE) distclean - $(RM) utils/rquotad/rquota.h utils/rquotad/rquota_xdr.c + [ ! -f Makefile ] || $(MAKE) distclean dh_clean binary-indep: build @@ -37,13 +45,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 @@ -54,6 +55,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