# $Id: Portfile,v 1.1 2005/05/10 21:11:21 mww Exp $

PortSystem 1.0

name			lcrypto
version			1.28
categories		java crypto
platforms		darwin
maintainers		mww@opendarwin.org
description		Java cryptographic library
long_description	The Bouncy Castle Crypto package is a Java implementation \
					of cryptographic algorithms.

homepage		http://lcrypto.sourceforge.net/
master_sites	http://www.bouncycastle.org/download/
distname		lcrypto-jdk14-128
checksums		md5 ce2fd4c5e28972bdaaed351bc5d7ece5

depends_build	port:jikes \
				port:junit \
				bin:jar:fastjar
depends_lib		port:gnu-classpath

set buildpath	${workpath}/build

post-extract {
	file mkdir ${buildpath}
}

use_configure	no

build.dir		${worksrcpath}/src
build.cmd		"/usr/bin/find org -name \\*.java -exec \
					${prefix}/bin/jikes -d ${buildpath} \{\} \\;"
build.env		BOOTCLASSPATH=${prefix}/share/java/glibj.jar \
				CLASSPATH=${prefix}/share/java/junit.jar:.
build.target

post-build {
	system "jar cvf ${worksrcpath}/lcrypto.jar -C ${buildpath} ."
}

test.run		yes
test.cmd		java org.bouncycastle.crypto.test.RegressionTest
test.env		CLASSPATH=${prefix}/share/java/gnumail.jar:${worksrcpath}/lcrypto.jar
test.target

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/java/
	xinstall -m 644 ${worksrcpath}/lcrypto.jar ${destroot}${prefix}/share/java/
}
