X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=debian%2Frules;h=81fb344a7763837eda3c60e4b74d05041a9861c4;hb=f53a661c2795370f807ffffd2c91582e0a6c98dc;hp=ab230c4395db44475d264bbc3832baa6462f3162;hpb=ad50dfa7f017451a77294fa4a58983ca6e0378f8;p=nfs-utils.git diff --git a/debian/rules b/debian/rules index ab230c4..81fb344 100755 --- a/debian/rules +++ b/debian/rules @@ -1,18 +1,30 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +#! /usr/bin/make -f -export DH_VERBOSE=1 +# 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: dh_testdir - ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd - $(MAKE) + --enable-nfsv41 \ + --disable-tirpc \ + --with-tcp-wrappers + $(MAKE) $(MAKEFLAGS) touch build-stamp clean: @@ -20,25 +32,18 @@ clean: dh_testroot rm -f build-stamp rm -rf $(DEBTMP) - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean binary-indep: build binary-arch: build dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs 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 @@ -46,9 +51,11 @@ binary-arch: build dh_installman dh_link dh_installchangelogs ChangeLog + dh_lintian dh_strip dh_compress dh_fixperms + chmod u+s debian/nfs-common/sbin/mount.nfs dh_installdeb dh_shlibdeps dh_gencontrol