]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - debian/rules
Open changelog for 1.2.2-4
[nfs-utils.git] / debian / rules
index 5a65ec5ccf949a0c8361a25f7caad1c770e3eed4..81fb344a7763837eda3c60e4b74d05041a9861c4 100755 (executable)
@@ -1,23 +1,33 @@
 #! /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
-       CFLAGS="-g -O2 -Wall" ./configure \
+       CFLAGS="$(CFLAGS)" ./configure \
                --mandir='$${prefix}/share/man' \
-               --enable-secure-statd \
+               --enable-nfsv41 \
+               --disable-tirpc \
                --with-tcp-wrappers
-       $(MAKE)
+       $(MAKE) $(MAKEFLAGS)
        touch build-stamp
 
-clean: unpatch
+clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp
@@ -29,7 +39,7 @@ binary-indep: build
 binary-arch: build
        dh_testdir
        dh_testroot
-       dh_clean -k
+       dh_prep
        dh_installdirs
        mkdir $(DEBTMP)
        $(MAKE) DESTDIR='$(DEBTMP)' install
@@ -41,6 +51,7 @@ binary-arch: build
        dh_installman
        dh_link
        dh_installchangelogs ChangeLog
+       dh_lintian
        dh_strip
        dh_compress
        dh_fixperms