# $Id$ PNAME="junit" PVER="4.8.1" PBUILD="r3" PCATEGORIE="dev-java" STATE="unstable" DESCRIPTION="JUnit is a simple framework to write repeatable tests." HOMEPAGE="http://junit.sourceforge.net/" DEPEND=">= virtual/java" SDEPEND=">= virtual/java-jdk >= app-arch/unzip-5" SRCFILE="${PNAME}${PVER}.zip" SRCDIR="${BUILDDIR}/${PNAME}${PVER}" sminclude mtools SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd_sourceforge ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # unpack src.jar install -d src || die unzip -d src junit-${PVER}-src.jar || die # cleanup prebuild jars and other unneeded stuff rm -rf javadoc *.jar || die find . -name \*.class | xargs rm || die } src_compile() { cd ${SRCDIR} # compile clases install -d classes || die javac -d classes -cp temp.hamcrest.source $(find src -name \*.java) || die # create jar jar -cf junit.jar -C classes . || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /etc/env.d || die minstalldir /usr/share/${PNAME}-${PVER}/lib || die minstallfile junit.jar /usr/share/${PNAME}-${PVER}/lib || die # classpath env echo "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/junit.jar" \ > ${BINDIR}/etc/env.d/22java-app-${PNAME} || die minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt || die }