Annotation of /branches/magellan-next/extras/junit/junit-4.8.2-r1.smage2
Parent Directory | Revision Log
Revision 9628 -
(hide annotations)
(download)
Tue Jan 3 19:17:08 2012 UTC (12 years, 5 months ago) by niro
File size: 1395 byte(s)
Tue Jan 3 19:17:08 2012 UTC (12 years, 5 months ago) by niro
File size: 1395 byte(s)
-inflate in SRCDIR
1 | niro | 9626 | # $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 | niro | 9627 | SRCFILE="${PNAME}-${PVER}.jar" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
18 | niro | 9626 | |
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 | niro | 9628 | munpack ${SRCFILE} ${SRCDIR} || die |
31 | niro | 9626 | 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 | } |