# $Id: Portfile,v 1.5 2005/04/19 18:15:06 jberry Exp $

PortSystem 1.0

name				commons-validator
version				1.1.4

categories			java
maintainers			jberry@opendarwin.org
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://jakarta.apache.org/commons/validator/

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

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}

post-extract {
	system "touch ${worksrcpath}/RELEASE-NOTES.readme"
	file mkdir ${workpath}/conf
	xinstall -W ${filespath} MANIFEST.MF validator_1_0.dtd validator_1_0_1.dtd \
		validator_1_1.dtd ${workpath}/conf
}

build.cmd			ant
build.target		dist
build.args			-Dconf.home=${workpath}/conf \
					-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}.jar \
		${destroot}${prefix}/share/java/
	file copy ${worksrcpath}/dist/docs ${destroot}${prefix}/share/doc/${name}
}
