# $Id: Portfile,v 1.3 2005/11/14 09:15:02 mww Exp $

PortSystem 1.0

name			castor
version			0.9.9
categories		java
platforms		darwin
maintainers		mww@opendarwin.org
description		data binding framework for Java
long_description	Castor is an Open Source data binding framework for \
				Java(tm). It's the shortest path between Java objects, XML \
				documents and relational tables. Castor provides Java-to-XML \
				binding, Java-to-SQL persistence, and more.

homepage		http://www.castor.org/
master_sites	http://dist.codehaus.org/castor/${version}/
distfiles		${distname}-src.tgz
checksums		md5 4ae9cf49a93ee93ac743041ed5f0f4d3

depends_lib		bin:java:kaffe

use_configure	no

set classpath	lib/ant-1.6.jar:lib/ant-1.6-launcher.jar:lib/xerces-J_1.4.0.jar:build/classes
build.cmd		java -classpath ${classpath} -Dant.home=lib org.apache.tools.ant.Main "$@" -buildfile src/build.xml
build.target	jar

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 ${worksrcpath}/dist/castor-0.9.9-xml.jar \
		${destroot}${prefix}/share/java/castor-xml.jar
	xinstall -m 644 ${worksrcpath}/dist/castor-0.9.9.jar \
		${destroot}${prefix}/share/java/castor.jar
	file copy ${worksrcpath}/src/doc ${destroot}${prefix}/share/doc/${name}
	file copy ${worksrcpath}/src/examples ${destroot}${prefix}/share/doc/${name}
}

