X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=debian%2Frules;h=2bd4939551392df9945d1dec60e51c3e91200aa4;hb=18cd67d0f01ac7fb916aba18fedfb8daa013cd4b;hp=fe2b273985852ddb2f1587bd75c008e66d9f8c57;hpb=30c5ce16383cee420047c94747aac306387226aa;p=nfs-utils.git diff --git a/debian/rules b/debian/rules index fe2b273..2bd4939 100755 --- a/debian/rules +++ b/debian/rules @@ -2,18 +2,29 @@ include /usr/share/quilt/quilt.make +# 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 := $(CURDIR)/debian/tmp build: patch build-stamp build-stamp: dh_testdir - CFLAGS="-g -O2 -Wall" ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd \ - --with-tcp-wrappers \ - --enable-mount - $(MAKE) + --with-tcp-wrappers + $(MAKE) $(MAKEFLAGS) touch build-stamp clean: unpatch @@ -21,7 +32,7 @@ clean: unpatch dh_testroot rm -f build-stamp rm -rf $(DEBTMP) - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean dh_clean binary-indep: build @@ -43,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