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

Bas Couwenberg sebastic at debian.org
Sat Jul 1 12:18:52 UTC 2017


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

sebastic pushed a commit to branch master
in repository osgearth.

commit 575e8c1e0c65288eb21034d396b3f7c0d84d53fd
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jul 1 13:35:14 2017 +0200

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

diff --git a/debian/changelog b/debian/changelog
index 821f608..d40f54f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ osgearth (2.8.0+dfsg-2) UNRELEASED; urgency=medium
 
   * 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>  Sat, 01 Jul 2017 13:31:50 +0200
 
diff --git a/debian/rules b/debian/rules
index 589f2ff..41368c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,9 +15,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 CFLAGS   += $(CPPFLAGS)
 CXXFLAGS += $(CPPFLAGS)
 
-PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
-VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
-BUILD_DATE := $(shell dpkg-parsechangelog | sed -n '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)")
 
 MANPAGES:=$(wildcard debian/man/*.*.xml)
 
@@ -73,7 +75,7 @@ override_dh_shlibdeps:
 	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):build/lib dh_shlibdeps
 
 override_dh_makeshlibs:
-	dh_makeshlibs -- -c0 -v$(VERSION)
+	dh_makeshlibs -- -c0 -v$(UPSTREAM_VERSION)
 
 get-orig-source:
 	. debian/get-orig-source

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



More information about the Pkg-grass-devel mailing list