# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name				commons-fileupload
version				1.2.1

categories			java
maintainers			jberry openmaintainer
platforms			darwin

description			Jakarta Commons-FileUpload
long_description	FileUpload makes it easy to add robust, high-performance, file \
					upload  capability to your servlets and web applications.
					
homepage			http://commons.apache.org/fileupload/

distname			${name}-${version}-src
master_sites		apache:commons/fileupload/source/
checksums           md5     c2bdb9264aec564e3f4fbbdf4344a844 \
                    sha1    339688282a2ad99c251f6341efbfef33c4bce527

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

use_configure		no

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

build.env			CLASSPATH=${prefix}/share/java/servlet23-api.jar:${prefix}/share/java/junit.jar
build.cmd			ant
build.target		dist
build.args			-Dfinal.name=${name} \
					-Dnoget=true

destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/java \
		${destroot}${prefix}/share/doc
	xinstall -m 644 ${worksrcpath}/dist/commons-fileupload.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_fileupload.cgi
livecheck.regex "${name}-(\\d+\\.\\d+(\\.\\d+)?)-src.tar.gz"
