From: Russ Allbery Date: Tue, 21 Sep 2010 22:51:52 +0000 (-0700) Subject: Rewrite module debian/rules to use debhelper 8 and overrides X-Git-Tag: debian/1.5.77-1~13 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2bdee130cd7fcabca7d834e1fc4de33ff6f01042;p=packages%2Fo%2Fopenafs.git Rewrite module debian/rules to use debhelper 8 and overrides - 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. --- diff --git a/debian/changelog b/debian/changelog index 220850537..722855b71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 27 Aug 2010 19:15:56 -0700 diff --git a/debian/module/compat b/debian/module/compat index 7ed6ff82d..45a4fb75d 100644 --- a/debian/module/compat +++ b/debian/module/compat @@ -1 +1 @@ -5 +8 diff --git a/debian/module/control b/debian/module/control index 85e422300..09528ead1 100644 --- a/debian/module/control +++ b/debian/module/control @@ -3,6 +3,6 @@ Section: kernel Priority: optional Maintainer: Russ Allbery Uploaders: Sam Hartman -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/ diff --git a/debian/module/control.in b/debian/module/control.in index 69e7e882a..0a2baeed6 100644 --- a/debian/module/control.in +++ b/debian/module/control.in @@ -3,8 +3,8 @@ Section: kernel Priority: optional Maintainer: Russ Allbery Uploaders: Sam Hartman -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) diff --git a/debian/module/rules b/debian/module/rules index 9b48eff56..8db330b85 100755 --- a/debian/module/rules +++ b/debian/module/rules @@ -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