[tomcat8] 08/09: No longer parse dpkg-parsechangelog in debian/rules

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Feb 16 13:49:00 UTC 2018


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

ebourg-guest pushed a commit to branch master
in repository tomcat8.

commit 3bae1305c59d7cdee8d64241c1670011645d19f2
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Feb 16 13:37:36 2018 +0100

    No longer parse dpkg-parsechangelog in debian/rules
---
 debian/changelog |  1 +
 debian/rules     | 14 +++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4442974..3ccf3b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ tomcat8 (8.5.28-1) UNRELEASED; urgency=medium
   * Standards-Version updated to 4.1.3
   * Switch to debhelper level 11
   * Use a secure URL for checking and downloading the new releases
+  * No longer parse dpkg-parsechangelog in debian/rules
 
  -- Emmanuel Bourg <ebourg at apache.org>  Tue, 13 Feb 2018 20:33:16 +0100
 
diff --git a/debian/rules b/debian/rules
index 1b1fa70..1ba6169 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,14 +1,14 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/pkg-info.mk
+
 JAVA_HOME := /usr/lib/jvm/default-java
 
-VERSION   := $(shell dpkg-parsechangelog --show-field Version | sed 's/-[^-]*$$//' | sed 's/~/-/')
-DATE      := $(shell dpkg-parsechangelog --show-field Date)
 ANT       := ant -propertyfile debian/ant.properties \
-             -Dyear=$(shell date --date='$(DATE)' --utc +'%Y') \
-             -Dtoday='$(shell LC_ALL=C date --date='$(DATE)' --utc +'%b %-d %Y')' \
-             -Dtoday-iso-8601=$(shell date --date='$(DATE)' --utc +'%F') \
-             -Dtstamp=$(shell date --date='$(DATE)' --utc +%H:%M:%S) \
+             -Dyear=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%Y') \
+             -Dtoday='$(shell LC_ALL=C date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%b %-d %Y')' \
+             -Dtoday-iso-8601=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%F') \
+             -Dtstamp=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +%H:%M:%S) \
              -Ddistribution.name=$(shell lsb_release -si)
 
 %:
@@ -26,7 +26,7 @@ override_dh_auto_build:
 	# Prepare the Maven artifacts
 	mkdir -p debian/poms
 	cp res/maven/*.pom debian/poms
-	perl -p -i -e 's/\@MAVEN.DEPLOY.VERSION\@/$(VERSION)/' debian/poms/*.pom
+	perl -p -i -e 's/\@MAVEN.DEPLOY.VERSION\@/$(DEB_VERSION_UPSTREAM)/' debian/poms/*.pom
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))

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



More information about the pkg-java-commits mailing list