#!/usr/bin/make -f
# debian/rules for libcommons-validator-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

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := junit commons-beanutils commons-collections commons-digester commons-logging oro
DEB_ANT_BUILD_TARGET := dist

install/$(PACKAGE)::
	cp conf/share/*.dtd dist/
	$(RM) dist/RELEASE-NOTES.txt
	dh_install -p$(PACKAGE) dist/*.dtd usr/share/sgml/apache/jakarta/validator
	mh_installpoms -p$(PACKAGE)
	mh_installjar -p$(PACKAGE) -l debian/pom.xml dist/commons-validator-$(VERSION).jar

clean::
	$(RM) debian/install debian/sgmlcatalogs
	-mh_clean

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

get-orig-pom:
	wget -O debian/pom.xml http://repository.sonatype.org/service/local/repositories/central/content/commons-validator/commons-validator/$(VERSION)/commons-validator-$(VERSION).pom

