Magellan Linux

Contents of /branches/magellan-next/extras/junit/junit-4.8.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9626 - (show annotations) (download)
Tue Jan 3 19:14:21 2012 UTC (12 years, 4 months ago) by niro
File size: 1383 byte(s)
auto added: ver bump to 4.8.2-r1
1 # $Id$
2
3 PNAME="junit"
4 PVER="4.8.2"
5 PBUILD="r1"
6
7 PCATEGORIE="dev-java"
8
9 DESCRIPTION="JUnit is a simple framework to write repeatable tests."
10 HOMEPAGE="http://junit.org/"
11
12 DEPEND=">= virtual/java"
13 SDEPEND=">= virtual/java-jdk
14 >= app-arch/unzip-5"
15
16 SRCFILE="${PNAME}${PVER}.jar"
17 SRCDIR="${BUILDDIR}/${PNAME}${PVER}"
18
19 sminclude mtools
20
21 SRC_URI=(
22 https://github.com/downloads/KentBeck/${PNAME}/${SRCFILE}
23 mirror://${PNAME}/${SRCFILE}
24 )
25
26 UP2DATE="updatecmd_sourceforge ${PNAME}"
27
28 src_prepare()
29 {
30 munpack ${SRCFILE} || die
31 cd ${SRCDIR}
32
33 # unpack src.jar
34 install -d src || die
35 unzip -d src junit-${PVER}-src.jar || die
36
37 # cleanup prebuild jars and other unneeded stuff
38 rm -rf javadoc *.jar || die
39 find . -name \*.class | xargs rm || die
40 }
41
42 src_compile()
43 {
44 cd ${SRCDIR}
45
46 # compile clases
47 install -d classes || die
48 javac -d classes -cp temp.hamcrest.source $(find src -name \*.java) || die
49
50 # create jar
51 jar -cf junit.jar -C classes . || die
52 }
53
54 src_install()
55 {
56 cd ${SRCDIR}
57
58 # needed directories
59 minstalldir /etc/env.d || die
60 minstalldir /usr/share/${PNAME}-${PVER}/lib || die
61
62 minstallfile junit.jar /usr/share/${PNAME}-${PVER}/lib || die
63
64 # classpath env
65 MCONFIG="/etc/env.d/22java-app-${PNAME}"
66 mclearconfig || die
67 maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/junit.jar" || die
68
69 minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt || die
70 }