# $Id: Portfile 92042 2012-04-16 19:04:14Z jmr@macports.org $

PortSystem 1.0

name				commons-codec
version				1.4

categories			java
license				Apache-2
maintainers			nomaintainer
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://commons.apache.org/codec/
				
distname			${name}-${version}-src
master_sites		apache:commons/codec/source/

checksums           md5     6d96f8134e12cdab105d4934b90cb993 \
                    sha1    61edf10e2a95bdef49d04fdbb97783be8e2b114a \
                    rmd160  b00969ab4bf8004d87e97b91072f4379590e62ea

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

use_configure		no

build.cmd			ant
build.target		dist
build.args			-Dfinal.name=${name} \
					-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/${name}.jar \
		${destroot}${prefix}/share/java/
	file copy ${worksrcpath}/dist/docs ${destroot}${prefix}/share/doc/${name}
}

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