[spatialite-tools] 01/02: Use pkg-info.mk variables instead of dpkg-parsechangelog output.

Bas Couwenberg sebastic at debian.org
Wed Sep 27 13:31:15 UTC 2017


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

sebastic pushed a commit to branch experimental
in repository spatialite-tools.

commit 3bed9bfbf026a4e2311289296bc593ef80011ef3
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Sep 27 15:30:36 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 27ee434..9b1ce7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 spatialite-tools (4.4.0~rc1-1~exp2) UNRELEASED; urgency=medium
 
   * Bump Standards-Version to 4.1.0, no changes.
+  * Use pkg-info.mk variables instead of dpkg-parsechangelog output.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 24 Sep 2017 13:25:24 +0200
 
diff --git a/debian/rules b/debian/rules
index 193fd0f..efdb33f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,11 +10,13 @@ export DH_OPTIONS
 # Enable hardening build flags
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
-FULL_VERSION := $(shell dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d- -f1)
+include /usr/share/dpkg/pkg-info.mk
+
+FULL_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
 VERSION := $(shell echo $(FULL_VERSION) | sed -e "s/~beta[[:digit:]]\+/-BETA/")
 LC_VERSION := $(shell echo $(VERSION) | tr A-Z a-z)
 
-BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
 
 MANPAGES := $(wildcard debian/man/*.*.xml)
 

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



More information about the Pkg-grass-devel mailing list