# $Id: Portfile,v 1.2 2006/01/12 16:26:55 jberry Exp $

PortSystem 1.0

name				commons-codec
version				1.3
revision			1

categories			java
maintainers			jberry@opendarwin.org
platforms			darwin

description			Jakarta Commons-Codec
long_description	Commons Codec provides implementations of common encoders and \
					decoders such as Base64, Hex, various phonetic encodings, and URLs.
homepage			http://jakarta.apache.org/commons/codec/
				
distname			${name}-${version}-src
master_sites		apache:jakarta/commons/codec/source/
checksums			md5 af3c3acf618de6108d65fcdc92b492e1

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

use_configure		no

worksrcdir			${name}-${version}

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

post-extract	{
	# The license file is not supplied with the source...
	system "touch ${workpath}/LICENSE"
}

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}
}
