[libocas] 02/09: d/rules: Improve version information extraction

Christian Kastner chrisk-guest at moszumanska.debian.org
Tue Jul 14 21:44:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to branch master
in repository libocas.

commit 269b56e1c1431bfc39121c9a161c2f51ffb3bb5b
Author: Christian Kastner <ckk at kvr.at>
Date:   Thu Jul 9 17:44:16 2015 +0200

    d/rules: Improve version information extraction
    
    Needed for a get-orig-source target.
---
 debian/rules | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 9aa8aa1..13989f0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,10 +4,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# Get version numbers for SONAME from changelog
-DVER = $(shell dpkg-parsechangelog | grep '^Version')
-LVER = $(shell echo $(DVER) | sed -e 's/Version: \([0-9]*\)\..*/\1/')
-LSUBVER = $(shell echo $(DVER) | sed -e 's/Version: .*\.\([0-9]*\).*/\1/')
+# Get version information
+PKGDIR := $(dir $(firstword $(MAKEFILE_LIST)))..
+UPVER := $(shell dpkg-parsechangelog -l$(PKGDIR)/debian/changelog -S Version | \
+		sed -re 's/\+dfsg-.*//')
+LVER = $(shell echo $(UPVER) | sed -nre 's/([0-9]+)\..*/\1/p')
+LSUBVER = $(shell echo $(UPVER) | sed -nre 's/[0-9]\.([0-9]+).*/\1/p')
 export LVER
 export LSUBVER
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libocas.git



More information about the debian-science-commits mailing list