# $Id: Portfile,v 1.5 2005/10/26 17:36:53 jberry Exp $

PortSystem 1.0

name				mx4j
version				3.0.1

categories			java
maintainers			jberry@opendarwin.org
platforms			darwin

description			Open Source JMX for Enterprise Computing.
long_description	MX4J is a project to build an Open Source implementation \
					of the Java(TM) Management Extensions (JMX) and of the JMX \
					Remote API (JSR 160) specifications, and to build tools \
					relating to JMX.
homepage			http://mx4j.sourceforge.net/

distname			${name}-${version}-src
master_sites		sourceforge
checksums			md5 eb5c08c4281aeb94c08ead7091b23dde

depends_build		bin:ant:apache-ant
depends_lib			bin:java:kaffe \
					port:junit \
					port:jakarta-bcel \
					port:jakarta-log4j \
					port:commons-logging

use_configure		no

worksrcdir			${name}-${version}

build.dir			${worksrcpath}/build
build.cmd			ant
build.target		compile.jmx compile.rjmx
build.args

post-extract {
	file link -symbolic ${worksrcpath}/lib/jakarta-bcel.jar  ${prefix}/share/java/jakarta-bcel.jar
	file link -symbolic ${worksrcpath}/lib/jakarta-log4j.jar ${prefix}/share/java/jakarta-log4j.jar
	file link -symbolic ${worksrcpath}/lib/commons-logging.jar ${prefix}/share/java/commons-logging.jar
}

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 \
		${worksrcpath}/dist/lib/mx4j.jar \
		${worksrcpath}/dist/lib/mx4j-jmx.jar \
		${worksrcpath}/dist/lib/mx4j-impl.jar \
		${worksrcpath}/dist/lib/mx4j-remote.jar \
		${worksrcpath}/dist/lib/mx4j-rimpl.jar \
		${worksrcpath}/dist/lib/mx4j-rjmx.jar \
		${destroot}${prefix}/share/java/
}
