# $Id: Portfile,v 1.6 2005/08/24 04:11:28 jberry Exp $

PortSystem 1.0

name				commons-digester
version				1.7

categories			java
maintainers			jberry@opendarwin.org
platforms			darwin

description			Jakarta Commons-Digester
long_description	Commons-Digester is an XML-to-Java-object mapping utility \
					commonly used for parsing XML configuration files.
homepage			http://jakarta.apache.org/commons/digester/
				
distname			${name}-${version}-src
master_sites		apache:jakarta/commons/digester/source/
checksums			md5 718f91f6958da865826bca455f644076

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

use_configure		no

build.cmd			ant
build.target		dist
build.args			-Djunit.jar=${prefix}/share/java/junit.jar \
					-Dcommons-beanutils.jar=${prefix}/share/java/commons-beanutils.jar \
					-Dcommons-collections.jar=${prefix}/share/java/commons-collections.jar \
					-Dcommons-logging.jar=${prefix}/share/java/commons-logging.jar
					
post-build {
	# Secondary ant build to build the digester rss jar
	system "cd ${worksrcpath}/src/examples/rss && ant ${build.args} \
		-Ddigester.home=${worksrcpath} dist"
}

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