]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Rewrite module debian/rules to use debhelper 8 and overrides
authorRuss Allbery <rra@debian.org>
Tue, 21 Sep 2010 22:51:52 +0000 (15:51 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 21 Sep 2010 22:51:52 +0000 (15:51 -0700)
- Rewrite debian/module/rules to use dh and overrides.
- Bump -source package dependency and compat to debhelper 8.

Also increase the module standards version to 3.9.1.

debian/changelog
debian/module/compat
debian/module/control
debian/module/control.in
debian/module/rules

index 22085053725485c6054e144c848e9506a7e8ecd9..722855b719a427f0ca23d74bf3bb711acc4f7e12 100644 (file)
@@ -39,6 +39,8 @@ openafs (1.5.77-1) UNRELEASED; urgency=low
   * Update to debhelper compatibility level V8.
     - Rewrite debian/rules to use dh and overrides.
     - Use dh_installdocs --link-doc to handle linked doc directories.
+    - Rewrite debian/module/rules to use dh and overrides.
+    - Bump -source package dependency and compat to debhelper 8.
   * Update standards version to 3.9.1 (no changes required).
 
  -- Russ Allbery <rra@debian.org>  Fri, 27 Aug 2010 19:15:56 -0700
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..45a4fb75db864000d01701c0f7a51864bd4daabf 100644 (file)
@@ -1 +1 @@
-5
+8
index 85e422300d41a961029b4c069733b1ac9d4eb882..09528ead11220de3d0bc643c92aa5f45ef6b3610 100644 (file)
@@ -3,6 +3,6 @@ Section: kernel
 Priority: optional
 Maintainer: Russ Allbery <rra@debian.org>
 Uploaders: Sam Hartman <hartmans@debian.org>
-Build-Depends: debhelper (>= 5), flex, bison
-Standards-Version: 3.9.0
+Build-Depends: debhelper (>= 8), flex, bison
+Standards-Version: 3.9.1
 Homepage: http://www.openafs.org/
index 69e7e882ab8c9fdd189de59ee56a68ea8c354d6e..0a2baeed616dd78217b12ee631ccf545a1a61af2 100644 (file)
@@ -3,8 +3,8 @@ Section: kernel
 Priority: optional
 Maintainer: Russ Allbery <rra@debian.org>
 Uploaders: Sam Hartman <hartmans@debian.org>
-Build-Depends: debhelper (>= 5), flex, bison
-Standards-Version: 3.9.0
+Build-Depends: debhelper (>= 8), flex, bison
+Standards-Version: 3.9.1
 
 Package: openafs-modules-=KVERS
 Breaks: openafs-client (<< 1.5.61)
index 9b48eff564aa7d0bcfe52211e90e57e013e9e4f2..8db330b855a47f8f579c0b7e10f71ba96bda709d 100755 (executable)
@@ -1,23 +1,4 @@
 #!/usr/bin/make -f
-# Based on sample debian/rules that uses debhelper. 
-# GNU copyright 1997 by Joey Hess.
-#
-# The rules file for the OpenAFS module build.
-
-# Uncomment this to turn on verbose mode. 
-#export DH_VERBOSE=1
-
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-# Tell Autoconf the correct system types.
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-    SYSTEM = --build $(DEB_HOST_GNU_TYPE)
-else
-    SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
 
 # Determine whether we're building with optimization.  This doesn't really
 # work at the moment due to upstream problems.
@@ -48,74 +29,49 @@ package    = openafs
 modulepkg := openafs-modules-$(KVERS)${INT_SUBARCH}
 moduledir := debian/$(modulepkg)/lib/modules/$(KVERS)/fs
 
-configure: configure-modules-stamp
-configure-stamp:
+%:
+       dh $@
+
+override_dh_auto_configure:
        @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
        @if test x"$(KVERS)" = x ; then \
            echo 'No version in $(KSRC)/include/linux/version.h' >&2 ; \
            exit 1 ; \
        fi
        sh debian/prep-modules $(KSRC)
-       sh configure --with-afs-sysname=$(SYS_NAME) \
-           --with-linux-kernel-headers=$(KSRC) --prefix=`pwd`/debian/tmp \
+       sh configure --prefix=$(CURDIR)/debian/tmp \
+           --with-afs-sysname=$(SYS_NAME) \
+           --with-linux-kernel-headers=$(KSRC) \
            --with-linux-kernel-packaging --enable-disconnected \
            --enable-debug --enable-debug-lwp --enable-debug-kernel \
            $(DEBIAN_OPT_FLAGS) $(DEBIAN_KERN_FLAGS)
-       touch $@
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep:
-build-stamp: configure-stamp
-       $(MAKE)
-       touch $@
+override_dh_auto_install:
+       cd src/libafs && make install DESTDIR=$(CURDIR)/debian/tmp
+       install -d -g root -o root -m 755 $(moduledir)
+       install -g root -o root -m 644 \
+           debian/tmp/lib/modules/*/extra/openafs/*o $(moduledir)/
 
-clean:
-       dh_testdir
-       dh_testroot
+override_dh_clean:
        rm -rf src/libafs/MODLOAD-* *-stamp
        dh_clean Makefile config.log config.status src/libafs/Makefile \
            src/libafs/Makefile.common src/libafs/asm src/libafs/asm-generic \
            src/libafs/h src/libafs/linux src/libafs/net src/libafs/netinet \
            src/libafs/rpc src/libafs/sys
 
-install: install-stamp
-install-stamp: build-stamp
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       cd src/libafs && make install DESTDIR=$(CURDIR)/debian/tmp
-       install -d -g root -o root -m 755 $(moduledir)
-       install -g root -o root -m 644 \
-           debian/tmp/lib/modules/*/extra/openafs/*o $(moduledir)/
-       touch $@
-
-binary: binary-arch binary-indep
-binary-indep:
-binary-arch: install-stamp
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs
-       dh_installdocs
-       dh_installmodules
-       dh_strip
-       dh_link
-       dh_compress
-       dh_fixperms
-       dh_installdeb
+override_dh_gencontrol:
        dh_gencontrol -- -v`cat debian/VERSION`
-       dh_md5sums
-       dh_builddeb --destdir="$(KPKG_DEST_DIR)"
 
-####################  Module package support (make-kpkg)  ####################
+override_dh_builddeb:
+       dh_builddeb --destdir="$(KPKG_DEST_DIR)"
 
-kdist_configure: configure-stamp
+kdist_configure: override_dh_auto_configure
 
-kdist_image: build-stamp
+kdist_image:
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-arch
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
 
-kdist: build-stamp
+kdist:
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-arch
        KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
            sh -v debian/genchanges
@@ -124,5 +80,4 @@ kdist: build-stamp
 kdist_clean:
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
 
-.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
-.PHONY: configure install kdist kdist_clean kdist_configure kdist_image
+.PHONY: kdist kdist_clean kdist_configure kdist_image