#!/usr/bin/make -f
# debian/rules for libcommons-jxpath-java (uses CDBS)

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

JAVA_HOME	     := /usr/lib/jvm/default-java
ANT_HOME             := /usr/share/ant
DEB_JARS             := junit jdom1 servlet-api-2.5 jsp-api-2.1 commons-beanutils common-collections commons-logging
DEB_ANT_BUILD_TARGET := jar javadoc
DEB_ANT_CLEAN_TARGET := clean

LIBRARY=commons-jxpath

binary-install/libcommons-jxpath-java::
	# With the 1.3 release upstream forgot to bump the version number.
	# So we are doing a little magic to get it right regardless.
	test `ls -1 target/commons-jxpath-*.jar | wc -l` = 1 || ( echo "Too many matches" ; exit 1)
	mh_installpoms -plibcommons-jxpath-java
	mh_installjar -plibcommons-jxpath-java pom.xml target/commons-jxpath-*.jar -l
