]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - debian/rules
The configure option name is --with-gssglue, not --with-libgssglue. Fix this, so...
[nfs-utils.git] / debian / rules
index f3532ed877ad86f8d1dad63f78af42d50a10e308..757468e95238ef6ad08cbdf8106ba34f3d6cdbb5 100755 (executable)
@@ -1,26 +1,35 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+#! /usr/bin/make -f
 
-export DH_VERBOSE=1
-
-DEB_BUILD_GNU_TYPE     := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE      := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_HOST_ARCH          := $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_ARCH_OS       := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+# 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: build-indep build-arch
+build-indep: build-stamp
+build-arch: build-stamp
 build-stamp:
        dh_testdir
-ifeq ($(DEB_HOST_ARCH),ia64)
-       patch -p1 < debian/bzero.patch
-endif
-       CFLAGS="-g -Wall" ./configure \
+       dh_autoreconf
+       CFLAGS="$(CFLAGS)" ./configure \
                --mandir='$${prefix}/share/man' \
-               --enable-secure-statd 
-       $(MAKE)
+               --enable-nfsv41 \
+               --enable-ipv6 \
+               --enable-libmount-mount \
+               --with-gssglue \
+               --with-tcp-wrappers
+       $(MAKE) $(MAKEFLAGS)
        touch build-stamp
 
 clean:
@@ -28,39 +37,40 @@ clean:
        dh_testroot
        rm -f build-stamp
        rm -rf $(DEBTMP)
-       -$(MAKE) distclean
+       [ ! -f Makefile ] || $(MAKE) distclean
+       dh_autoreconf_clean
        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_installman
+       dh_install -Xman --fail-missing
        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
        install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server
-       dh_installman
+       install -m 0644 debian/nfs-common.bugcontrol debian/nfs-common/usr/share/bug/nfs-common/control
+       install -m 0755 debian/nfs-common.bugscript debian/nfs-common/usr/share/bug/nfs-common/script
+       install -m 0644 debian/nfs-utils.bugcontrol debian/nfs-common/usr/share/bug/nfs-utils/control
+       install -m 0644 debian/nfs-utils.bugpresubj debian/nfs-common/usr/share/bug/nfs-utils/presubj
+       install -m 0755 debian/nfs-kernel-server.bugscript debian/nfs-kernel-server/usr/share/bug/nfs-kernel-server/script
        dh_link
-       dh_installchangelogs ChangeLog
+       dh_installchangelogs
+       dh_lintian
        dh_strip
        dh_compress
        dh_fixperms
+       chmod u+s debian/nfs-common/sbin/mount.nfs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
-       dh_md5sums
+       dh_md5sums -Xvar/lib
        dh_builddeb
 
 binary: binary-indep binary-arch