#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

JAVA_HOME            := /usr/lib/jvm/default-java
ANT_OPTS             := -Xmx128M
DEB_ANT_BUILD_TARGET := jar
#does no longer work with 2.7.0
#DEB_ANT_CHECK_TARGET := -Djgroups.bind_addr=`hostname` all-tests
DEB_JARS             := xalan2 serializer junit log4j-1.2 bsh commons-logging bcprov glassfish-javaee ant-junit \
                        testng
ANT_OPTS	     := -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5

install/libjgroups-java::
	mh_installpom -plibjgroups-java jgroups-pom.xml
	mh_installjar -plibjgroups-java jgroups-pom.xml -l dist/jgroups-core.jar
	install -m 644 -D dist/jgroups-all.jar $(DEB_DESTDIR)/usr/share/java/jgroups-all-$(DEB_UPSTREAM_VERSION).jar
	dh_link /usr/share/java/jgroups-all-$(DEB_UPSTREAM_VERSION).jar /usr/share/java/jgroups-all.jar

get-orig-source:
	uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
