# $Id: Portfile 35275 2008-03-23 15:54:42Z jberry@macports.org $

PortSystem 1.0

name			commons-pool
version			1.4

categories		java
maintainers		jberry openmaintainer
platforms		darwin

description		Jakarta Commons-Pool
long_description	Commons-Pool provides a generic object pooling \
				interface, a toolkit for creating modular \
				object pools and several general purpose \
				pool implementations.
homepage		http://commons.apache.org/pool/

distname		${name}-${version}-src
master_sites		apache:commons/pool/source/
checksums		md5 4dc988ee16e1471799af97763297b41b \
				sha1 89f5ebb6e2b9ac7fcdc08a03ca18cc3ad2bda3d2 \
				rmd160 233c89e239f8b3a8b0e56f6fc3a86a47150500f4

depends_build		bin:ant:apache-ant
depends_lib		bin:java:kaffe \
				port:junit

use_configure		no

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

build.cmd		ant
build.target		dist
build.args		-Djunit.jar=${prefix}/share/java/junit.jar

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 ${worksrcpath}/dist/commons-pool.jar \
		${destroot}${prefix}/share/java/commons-pool.jar
	file copy ${worksrcpath}/dist/docs ${destroot}${prefix}/share/doc/${name}
	file attributes ${destroot}${prefix}/share/doc/${name} -permissions goa+r
}

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