Magellan Linux

Annotation of /branches/magellan-next/extras/junit/junit-4.8.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9625 - (hide annotations) (download)
Tue Jan 3 16:21:17 2012 UTC (12 years, 4 months ago) by niro
File size: 1530 byte(s)
-import from trunk
1 niro 5690 # $Id$
2    
3     PNAME="junit"
4     PVER="4.8.1"
5     PBUILD="r2"
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     minstalldir /usr/share/${PNAME}-${PVER}/org/junit || die
63    
64     minstallfile junit.jar /usr/share/${PNAME}-${PVER}/lib || die
65     # copy tests
66     cp -v -R org/junit/tests /usr/share/${PNAME}-${PVER}/org || die
67    
68     # classpath env
69     echo "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/junit.jar:/usr/share/${PNAME}-${PVER}" \
70     > ${BINDIR}/etc/env.d/22java-app-${PNAME} || die
71    
72     minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt || die
73     }