[gmt] 04/05: Use pkg-info.mk variables instead of dpkg-parsechangelog output.
Bas Couwenberg
sebastic at debian.org
Sat Jun 24 11:31:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository gmt.
commit 73327ed83990eb4cdae305b949cf9619ff4c1868
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Jun 24 11:31:02 2017 +0200
Use pkg-info.mk variables instead of dpkg-parsechangelog output.
---
debian/changelog | 1 +
debian/rules | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ca65b0f..0ef6b72 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ gmt (5.4.1+dfsg-2) UNRELEASED; urgency=medium
(closes: #865726)
* 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, 24 Jun 2017 11:15:52 +0200
diff --git a/debian/rules b/debian/rules
index 52429ba..fde5d1c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,8 @@
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+include /usr/share/dpkg/pkg-info.mk
+
CFLAGS += $(CPPFLAGS)
ifneq (,$(findstring verbose,$(DEB_BUILD_OPTIONS)))
@@ -10,8 +12,9 @@ ifneq (,$(findstring verbose,$(DEB_BUILD_OPTIONS)))
export DH_VERBOSE
endif
-UPSTREAM_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 -)
+UPSTREAM_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
+
+BUILD_DATE=$(shell $(SOURCE_DATE_EPOCH) | LC_ALL=C date -u "+%d %B %Y" -f -)
MANPAGES:=$(wildcard debian/man/*.*.xml)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gmt.git
More information about the Pkg-grass-devel
mailing list