[pktools] 08/16: Use pkg-info.mk variables instead of dpkg-parsechangelog output.

Bas Couwenberg sebastic at debian.org
Thu Jun 29 14:25:05 UTC 2017


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

sebastic pushed a commit to branch master
in repository pktools.

commit 52c4c48825f51734fd25d2e4afc7b15417045923
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Jun 29 07:50:29 2017 +0200

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

diff --git a/debian/changelog b/debian/changelog
index c4afbc0..d44faaf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ pktools (2.6.7.1-1) UNRELEASED; urgency=medium
   * Drop patches applied upstream.
   * Bump Standards-Version to 4.0.0, no changes.
   * Add autopkgtest to test installability.
+  * Use pkg-info.mk variables instead of dpkg-parsechangelog output.
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 29 Jun 2017 07:23:22 +0200
 
diff --git a/debian/rules b/debian/rules
index 1082822..d67b775 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,8 +7,11 @@
 # Enable hardening build flags
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
-PKTOOLS_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
-BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)
+include /usr/share/dpkg/pkg-info.mk
+
+UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
+
+BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
 
 ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
 	export DEB_CXXFLAGS_MAINT_APPEND := -I/usr/include/hdf5/serial
@@ -45,5 +48,5 @@ override_dh_install:
 	dh_install --list-missing
 
 override_dh_makeshlibs:
-	dh_makeshlibs -- -v$(PKTOOLS_VERSION) -c0
+	dh_makeshlibs -- -v$(UPSTREAM_VERSION) -c0
 

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



More information about the Pkg-grass-devel mailing list