Magellan Linux

Contents of /trunk/extras/junit/junit-4.12-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28378 - (show annotations) (download)
Wed Aug 24 08:12:51 2016 UTC (7 years, 9 months ago) by niro
File size: 1537 byte(s)
-revert commit r28377
1 # $Id$
2
3 PNAME="junit"
4 PVER="4.12"
5 PBUILD="r1"
6
7 PCAT="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 >= dev-java/hamcrest-1.3"
14
15 SDEPEND=">= virtual/java-jdk
16 >= dev-java/apache-ant-1.9
17 >= app-arch/unzip-5"
18
19 # commit id
20 COID="e87c6fc"
21 # unusual but it is so
22 SRCFILE="r${PVER}"
23 SRCDIR="${BUILDDIR}/junit-team-${PNAME}-${COID}"
24
25 sminclude java
26
27 SRC_URI=(
28 http://github.com/junit-team/junit/tarball/r${PVER}
29 mirror://${PNAME}/${SRCFILE}
30 )
31
32 UP2EXCLUDE="beta"
33 UP2SEPERATOR="r"
34 UP2DATE="updatecmd https://github.com/junit-team/${PNAME}/releases | highesttarball zip"
35
36 src_prepare()
37 {
38 # munpack needs a suffix
39 tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${BUILDDIR} || die
40 }
41
42 src_compile()
43 {
44 cd ${SRCDIR}
45 local myopts
46
47 # requires 1.5 source definitions
48 myopts+=" -Dant.build.javac.source=1.5"
49
50 ant ${myopts} jars || die
51
52 # fix missing Manifest
53 echo 'Class-Path: hamcrest-core.jar' > ${SRCDIR}/Manifest.txt || die
54 jar ufm junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar ${SRCDIR}/Manifest.txt || die
55 }
56
57 src_check()
58 {
59 cd ${SRCDIR}
60 ant test || die
61 }
62
63 src_install()
64 {
65 cd ${SRCDIR}
66
67 # minstalljar adds pver automatically - so we rename the jars
68 cp junit${PVER}-SNAPSHOT/junit-${PVER}-SNAPSHOT.jar junit.jar || die
69 cp junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar junit-dep.jar || die
70
71 minstalljar junit.jar || die
72 minstalljar junit-dep.jar || die
73 minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt *.txt || die
74 }
75