[tomcat7] 02/13: Simplified the ant invocation in debian/rules and moved some properties to debian/ant.properties
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed May 27 09:36:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository tomcat7.
commit ac6d6d5e2187439b5c3dbd8e6d340ff72b0c3198
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Wed May 27 09:17:49 2015 +0200
Simplified the ant invocation in debian/rules and moved some properties to debian/ant.properties
---
debian/ant.properties | 7 +++++++
debian/changelog | 2 ++
debian/rules | 30 ++----------------------------
3 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/debian/ant.properties b/debian/ant.properties
new file mode 100644
index 0000000..f0ded4c
--- /dev/null
+++ b/debian/ant.properties
@@ -0,0 +1,7 @@
+compile.debug=true
+
+ant.build.javac.source=1.6
+ant.build.javac.target=1.6
+jdt.jar=/usr/share/java/ecj.jar
+junit.jar=/usr/share/java/junit4.jar
+hamcrest.jar=/usr/share/java/hamcrest-core.jar
diff --git a/debian/changelog b/debian/changelog
index cf15f36..f3d9219 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ tomcat7 (7.0.61-2) UNRELEASED; urgency=medium
* debian/rules:
- Modified to use the dh sequencer
+ - Simplified the ant invocation and moved some properties
+ to debian/ant.properties
-- Emmanuel Bourg <ebourg at apache.org> Wed, 27 May 2015 09:10:20 +0200
diff --git a/debian/rules b/debian/rules
index eff12cd..41a7fd3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,8 @@
#!/usr/bin/make -f
export JAVA_HOME := /usr/lib/jvm/default-java
-JAVA_CMD := $(JAVA_HOME)/bin/java
BLDLIB := output/build/lib
BLDBIN := output/build/bin
-DEB_JARS_BASE := /usr/share/java
-DEB_JARS := ant ant-launcher ant-trax ant-nodeps ant-junit4 ant-junit junit4 hamcrest-1.3
-DEB_CLASSPATH = $(shell for jar in $(DEB_JARS); do \
- if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; \
- if [ -f "$$jar".jar ]; then echo -n "$${jar}.jar:"; fi; \
- if [ -f $(DEB_JARS_BASE)/"$$jar" ]; then \
- echo -n "$(DEB_JARS_BASE)/$${jar}:"; fi; \
- if [ -f $(DEB_JARS_BASE)/"$$jar".jar ]; then \
- echo -n "$(DEB_JARS_BASE)/$${jar}.jar:"; fi; \
- done; \
- if [ -f "$(JAVA_HOME)/lib/tools.jar" ]; then \
- echo -n "$(JAVA_HOME)/lib/tools.jar"; fi)
T_VER := $(shell dpkg-parsechangelog | egrep '^Version:' \
| cut -f 2 -d ' ' | cut -f 2 -d ' '|sed 's/-[^-]*$$//')
@@ -32,13 +19,7 @@ RWFILES := $(RWLOC)/index.html $(RWLOC)/META-INF/context.xml
# Add distribution.name as system property to grab it when showing version
TOMCAT7_DISTRIBUTION := "$(shell lsb_release -si)"
-ANT_ARGS := -Dcompile.debug=true \
- -Dant.build.javac.source=1.6 \
- -Dant.build.javac.target=1.6 \
- -Djdt.jar=/usr/share/java/ecj.jar \
- -Djunit.jar=/usr/share/java/junit4.jar \
- -Dhamcrest.jar=/usr/share/java/hamcrest-core.jar \
- -Dversion=$(T_VER) \
+ANT_ARGS := -Dversion=$(T_VER) \
-Dversion.major="$(T_VER_MAJOR)" \
-Dversion.minor="$(T_VER_MINOR)" \
-Dversion.build="$(T_VER_BUILD)" \
@@ -46,14 +27,7 @@ ANT_ARGS := -Dcompile.debug=true \
-Ddistribution.name=$(TOMCAT7_DISTRIBUTION) \
-Dversion.suffix=""
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- ANT_ARGS += -Dcompile.optimize=false
-else
- ANT_ARGS += -Dcompile.optimize=true
-endif
-
-ANT_INVOKE := $(JAVA_CMD) -classpath "$(DEB_CLASSPATH)" \
- org.apache.tools.ant.Main $(ANT_ARGS)
+ANT_INVOKE := ant $(ANT_ARGS) -propertyfile debian/ant.properties
%:
dh $@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat7.git
More information about the pkg-java-commits
mailing list