X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Frules;h=f9a196a45207fde3176537ea88a4d928f1feb8e2;hp=81659a45170c0006cb3d3e9acb77c579459f8dbf;hb=7f1928b63d65cece25a445f9813a25e84893e08c;hpb=1e0a42d0979887fefcbb3918bd5cd5832afbecf0 diff --git a/debian/rules b/debian/rules index 81659a4..f9a196a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,26 +1,32 @@ #! /usr/bin/make -f -include /usr/share/quilt/quilt.make - -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +# 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: build-stamp build-stamp: dh_testdir -ifeq ($(DEB_HOST_ARCH),arm) - patch -p0 -i debian/major.patch -endif - CFLAGS="-g -O2 -Wall" ./configure \ + CFLAGS="$(CFLAGS)" ./configure \ --mandir='$${prefix}/share/man' \ - --enable-secure-statd \ + --disable-tirpc \ --with-tcp-wrappers - $(MAKE) + $(MAKE) $(MAKEFLAGS) touch build-stamp -clean: unpatch +clean: dh_testdir dh_testroot rm -f build-stamp @@ -32,7 +38,7 @@ binary-indep: build binary-arch: build dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs mkdir $(DEBTMP) $(MAKE) DESTDIR='$(DEBTMP)' install @@ -44,9 +50,10 @@ binary-arch: build dh_installman dh_link dh_installchangelogs ChangeLog - #dh_strip + dh_strip dh_compress - dh_fixperms -Xmount.nfs + dh_fixperms + chmod u+s debian/nfs-common/sbin/mount.nfs dh_installdeb dh_shlibdeps dh_gencontrol