From c6294214d7d24ac3ed5a715c56539b863b046a1d Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 26 May 2009 16:28:10 -0700 Subject: [PATCH] Dynamically determine versions for dkms.conf and get-orig-source * Dynamically determine the Debian and upstream versions for dkms.conf and get-orig-source from debian/changelog. Thanks, Anders Kaseorg. (LP: #364426) --- debian/changelog | 5 ++++- debian/rules | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8b25c6260..0402ba9d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,12 +5,15 @@ openafs (1.4.10+dfsg1-2) UNRELEASED; urgency=low README.modules. This is an alternative to installing openafs-modules-source and building kernel modules for each new kernel with module-assistant or make-kpkg. (Closes: #168852, #525131) - (LP: #52786, #364426, #369875) + (LP: #52786, #368471, #369875) * Have openafs-client recommend at least the current source version of openafs-modules-source or openafs-modules-dkms instead of any old version. While the API probably hasn't changed, it's best practice to keep a relatively close match between the userspace andn the kernel module version. (LP: #369875) + * Dynamically determine the Debian and upstream versions for dkms.conf + and get-orig-source from debian/changelog. Thanks, Anders Kaseorg. + (LP: #364426) -- Russ Allbery Tue, 26 May 2009 11:57:22 -0700 diff --git a/debian/rules b/debian/rules index 9ccd282d3..1d04862fa 100755 --- a/debian/rules +++ b/debian/rules @@ -50,10 +50,10 @@ IGNORE += -Xpam_afs # These will be useful in 1.5, but aren't useful yet. IGNORE += -Xknfs -Xrmtsysd -# These variable is used only by get-orig-source, which will normally only be -# run by maintainers. -VERSION = 1.4.10 -DEBVERS = 1.4.10+dfsg1 +# These variables are used by get-orig-source and to construct dkms.conf. +DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \ + | cut -d- -f1) +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') UPSTREAM = /afs/grand.central.org/software/openafs/$(VERSION) # Download the upstream source, merge in the doc tarball, and do the -- 2.39.5