X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Frules;h=1386ba1d852008e102e3188c2384b238f273017c;hp=877e659bf4b93a852838f4aaeae492d87b0ad28c;hb=f1a21c54149d24f8f8f875c2883af449d921c50b;hpb=1ed351ec62f424339ca48fe66a3fe85d4d540031 diff --git a/debian/rules b/debian/rules index 877e659..1386ba1 100755 --- a/debian/rules +++ b/debian/rules @@ -2,17 +2,30 @@ 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 - $(MAKE) + $(MAKE) $(MAKEFLAGS) touch build-stamp clean: unpatch @@ -20,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 @@ -43,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