]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Dynamically determine versions for dkms.conf and get-orig-source
authorRuss Allbery <rra@debian.org>
Tue, 26 May 2009 23:28:10 +0000 (16:28 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 26 May 2009 23:28:10 +0000 (16:28 -0700)
* Dynamically determine the Debian and upstream versions for dkms.conf
  and get-orig-source from debian/changelog.  Thanks, Anders Kaseorg.
  (LP: #364426)

debian/changelog
debian/rules

index 8b25c6260b953fe2ad38c366fd9aea44ad7319c7..0402ba9d20b777deec325a29cb23b13f34f0077e 100644 (file)
@@ -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 <rra@debian.org>  Tue, 26 May 2009 11:57:22 -0700
 
index 9ccd282d30d26c22c29cb3faf140dea5d20afc5e..1d04862fa7667b61ef0a856f81e5c417200afd03 100755 (executable)
@@ -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