# $Id: Portfile,v 1.1 2005/07/03 19:25:40 mww Exp $

PortSystem 1.0

name			javatar
version			2.5
categories		java archivers
platforms		darwin
maintainers		mww@opendarwin.org
description		java package that allows you to create and extract tar archives
long_description	${description}

homepage		http://www.trustice.com/java/tar/
master_sites	http://www.gjt.org/download/time/java/tar/
checksums		md5 7dae3b92b70c30cfb6fd9699a79f821c

depends_lib		port:gnu-classpath \
				port:gnu-classpathx-activation

use_configure	no

set javad		${prefix}/share/java

build {
	file mkdir ${worksrcpath}/build
	system "cd ${worksrcpath}/source/ && \
		find . -name \\*.java \
			-exec jikes -d ${worksrcpath}/build \
			-classpath .:${javad}/glibj.jar:${javad}/activation.jar \{\} \\;"
	system "cd ${worksrcpath}/build && jar -cf ../javatar.jar com"
}

destroot {
	xinstall -m 755 -d ${destroot}${javad} ${destroot}${prefix}/share/doc/
	xinstall -m 644 ${worksrcpath}/javatar.jar ${destroot}${javad}
	file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
}
