# $Id: Portfile 72252 2010-10-08 23:20:28Z jberry@macports.org $

PortSystem 1.0

name				commons-validator
version				1.3.1
revision			1

categories			java
maintainers			nomaintainer
platforms			darwin

description			Jakarta Commons-Validator
long_description	The commons-validator package provides a simple, \
					extendable framework to define validators (validation \
					methods) and validation rules in an xml file. There is \
					support for internationalization of validation rules and \
					error messages.
homepage			http://commons.apache.org/validator/

distname			${name}-${version}-src
master_sites		apache:commons/validator/source/
checksums			md5 ac5b8d6f67982859fe77225ab7fe6548

depends_build		bin:ant:apache-ant
depends_lib			bin:java:kaffe \
					port:junit \
					port:commons-logging \
					port:commons-beanutils \
					port:commons-collections \
					port:commons-digester \
					port:jakarta-oro

use_configure		no

worksrcdir			${name}-${version}-src

build.cmd			ant
build.target		dist
build.args			-Djunit.jar=${prefix}/share/java/junit.jar \
					-Dcommons-logging.jar=${prefix}/share/java/commons-logging.jar \
					-Dcommons-beanutils.jar=${prefix}/share/java/commons-beanutils.jar \
					-Dcommons-collections.jar=${prefix}/share/java/commons-collections.jar \
					-Dcommons-digester.jar=${prefix}/share/java/commons-digester.jar \
					-Doro.jar=${prefix}/share/java/jakarta-oro.jar

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 ${worksrcpath}/dist/${name}-${version}.jar \
		${destroot}${prefix}/share/java/${name}.jar
	file copy ${worksrcpath}/dist/docs ${destroot}${prefix}/share/doc/${name}
}

livecheck.type  regex
livecheck.url   http://commons.apache.org/downloads/download_validator.cgi
livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
