On Tue 2015-05-19 11:06:40 -0400, Emmanuel Bourg wrote:

> Thank you very much for the patch.
>
> Ant properties can be overridden from the command line, this is
> preferable since it avoids a patch. The syntax is 'ant -Dfoo=bar', here
> is an example with the zookeeper package:
>
> https://sources.debian.net/src/zookeeper/3.4.6-4/debian/rules/#L19
>
> For CDBS based packages additional Ant properties can be specified in
> debian/rules with the DEB_ANT_ARGS variable.

Thanks for the pointers, Emmanuel!  From what you say, i think the
attached revised patch should work and be cleaner.

Regards,

        --dkg

From b4a0397aed8261f63640140deeda0efb8ff61fe8 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Date: Tue, 19 May 2015 11:41:28 -0400
Subject: [PATCH 2/2] cleaner version of fix for 785719

---
 debian/rules | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index 420f4c1..70f2475 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,14 @@
 include /usr/share/cdbs/1/class/ant.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%m/%d/%Y" -d "$(LAST_CHANGE)")
+
 JAVA_HOME               := /usr/lib/jvm/default-java
 DEB_ANT_BUILDFILE	:= debian/build.xml
 DEB_DESTDIR		:= $(CURDIR)/debian/tmp
 DEB_JARS                := jaxrpc
+DEB_ANT_ARGS            := -Dbuild_date=$(BUILD_DATE)
 
 ALL_JARS := $(wildcard publish/glassfish/lib/*.jar)
 ALL_JARS += $(wildcard */build/release/*.jar)
-- 
2.1.4

Attachment: signature.asc
Description: PGP signature

Reply via email to