Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9629 - (show annotations) (download)
Tue Jan 3 19:19:25 2012 UTC (12 years, 4 months ago) by niro
File size: 1476 byte(s)
-install src too
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 SRC_SRCFILE="${PNAME}-${PVER}-src.jar"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 sminclude mtools
21
22 SRC_URI=(
23 https://github.com/downloads/KentBeck/${PNAME}/${SRCFILE}
24 https://github.com/downloads/KentBeck/${PNAME}/${SRC_SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 )
27
28 UP2DATE="updatecmd_sourceforge ${PNAME}"
29
30 src_prepare()
31 {
32 munpack ${SRCFILE} ${SRCDIR} || die
33 cd ${SRCDIR}
34
35 # unpack src.jar
36 munpack ${SRC_SRCFILE} ${SRCDIR}/src || die
37
38 # cleanup prebuild jars and other unneeded stuff
39 rm -rf javadoc *.jar || die
40 find . -name \*.class | xargs rm || die
41 }
42
43 src_compile()
44 {
45 cd ${SRCDIR}
46
47 # compile clases
48 install -d classes || die
49 javac -d classes -cp temp.hamcrest.source $(find src -name \*.java) || die
50
51 # create jar
52 jar -cf junit.jar -C classes . || die
53 }
54
55 src_install()
56 {
57 cd ${SRCDIR}
58
59 # needed directories
60 minstalldir /etc/env.d || die
61 minstalldir /usr/share/${PNAME}-${PVER}/lib || die
62
63 minstallfile junit.jar /usr/share/${PNAME}-${PVER}/lib || die
64
65 # classpath env
66 MCONFIG="/etc/env.d/22java-app-${PNAME}"
67 mclearconfig || die
68 maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/junit.jar" || die
69
70 minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt || die
71 }