[otb] 03/05: Use pkg-info.mk variables instead of dpkg-parsechangelog output.

Bas Couwenberg sebastic at debian.org
Mon Jun 19 05:18:02 UTC 2017


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

sebastic pushed a commit to branch master
in repository otb.

commit 6b50615cfd966a32d4d543abd70804a02eb426d8
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Jun 18 23:51:19 2017 +0200

    Use pkg-info.mk variables instead of dpkg-parsechangelog output.
---
 debian/changelog | 1 +
 debian/rules     | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1fc9039..022b972 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ otb (6.0.0+dfsg-1~exp3) UNRELEASED; urgency=medium
   * Team upload.
   * Add autopkgtest to test installability.
   * Bump Standards-Version to 4.0.0, no changes.
+  * Use pkg-info.mk variables instead of dpkg-parsechangelog output.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 18 Jun 2017 21:10:50 +0200
 
diff --git a/debian/rules b/debian/rules
index 6aa5942..3c8b0fc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,6 +18,8 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 export DEB_LDFLAGS_MAINT_APPEND = "-Wl,--as-needed"
 
+include /usr/share/dpkg/pkg-info.mk
+
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 ifndef PKGVERSION
@@ -32,7 +34,7 @@ OTB_VERSION_PATCH  = $(shell sed -ne 's/set(OTB_VERSION_PATCH "\([0-9]*\)")/\1/p
 OTB_VERSION_SONAME = $(OTB_VERSION_MAJOR).$(OTB_VERSION_MINOR)
 OTB_VERSION_FULL   = $(OTB_VERSION_MAJOR).$(OTB_VERSION_MINOR).$(OTB_VERSION_PATCH)
 
-UPSTREAM_VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
+UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
 
 CMAKE_FLAGS = \
 	-DBUILD_EXAMPLES:BOOL=OFF \
@@ -60,7 +62,7 @@ CMAKE_FLAGS = \
 	-DOTB_WRAP_PYTHON:BOOL=ON
 
 
-DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+DEBPKGNAME     := $(DEB_SOURCE)
 pkgcli:=$(DEBPKGNAME)-bin
 pkggui:=$(DEBPKGNAME)-bin-qt
 pkglib:=lib$(DEBPKGNAME)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/otb.git



More information about the Pkg-grass-devel mailing list