Magellan Linux

Annotation of /trunk/extras/junit/junit-4.8.1-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5691 - (hide annotations) (download)
Wed Aug 4 10:02:50 2010 UTC (13 years, 9 months ago) by niro
File size: 1365 byte(s)
-rev bump to 4.8.1-r3; reverted test installation
1 niro 5691 # $Id$
2    
3     PNAME="junit"
4     PVER="4.8.1"
5     PBUILD="r3"
6    
7     PCATEGORIE="dev-java"
8     STATE="unstable"
9    
10     DESCRIPTION="JUnit is a simple framework to write repeatable tests."
11     HOMEPAGE="http://junit.sourceforge.net/"
12    
13     DEPEND=">= virtual/java"
14     SDEPEND=">= virtual/java-jdk
15     >= app-arch/unzip-5"
16    
17     SRCFILE="${PNAME}${PVER}.zip"
18     SRCDIR="${BUILDDIR}/${PNAME}${PVER}"
19    
20     sminclude mtools
21    
22     SRC_URI=(
23     sourceforge://${PNAME}/${SRCFILE}
24     mirror://${PNAME}/${SRCFILE}
25     )
26    
27     UP2DATE="updatecmd_sourceforge ${PNAME}"
28    
29     src_prepare()
30     {
31     munpack ${SRCFILE} || die
32     cd ${SRCDIR}
33    
34     # unpack src.jar
35     install -d src || die
36     unzip -d src junit-${PVER}-src.jar || 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     echo "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/junit.jar" \
67     > ${BINDIR}/etc/env.d/22java-app-${PNAME} || die
68    
69     minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt || die
70     }