Annotation of /trunk/extras/apache-ant/apache-ant-1.8.1-r1.smage2
Parent Directory | Revision Log
Revision 5692 -
(hide annotations)
(download)
Wed Aug 4 10:04:47 2010 UTC (13 years, 9 months ago) by niro
File size: 1881 byte(s)
Wed Aug 4 10:04:47 2010 UTC (13 years, 9 months ago) by niro
File size: 1881 byte(s)
-copying junit.jar from classpath
1 | niro | 5689 | # $Id$ |
2 | |||
3 | PNAME="apache-ant" | ||
4 | PVER="1.8.1" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="dev-java" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="Ant is a java-based build tool." | ||
11 | HOMEPAGE="http://ant.apache.org/" | ||
12 | |||
13 | DEPEND=">= virtual/java-jdk | ||
14 | >= dev-java/junit-4.8" | ||
15 | |||
16 | SRCFILE="${PNAME}-${PVER}-src.tar.bz2" | ||
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
18 | |||
19 | sminclude mbuild mtools | ||
20 | |||
21 | SRC_URI=( | ||
22 | http://www.apache.org/dist/ant/source/${SRCFILE} | ||
23 | mirror://${PNAME}/${SRCFILE} | ||
24 | ) | ||
25 | |||
26 | UP2DATE="updatecmd http://www.apache.org/dist/ant/source/ | grep ${PNAME}- | sed 's:.*${PNAME}-\(.*\)-src.*:\1:;q'" | ||
27 | |||
28 | src_compile() | ||
29 | { | ||
30 | cd ${SRCDIR} | ||
31 | niro | 5692 | # get junit.jar location from classpath |
32 | local junit="$(echo ${CLASSPATH} | sed 's/.*:\(.*junit.jar\):.*/\1/')" | ||
33 | # and copy it to lib/optional as apache-ant has now a hard-dependency to it | ||
34 | echo "Using junit.jar from ${junit}!" | ||
35 | cp -v ${junit} ${SRCDIR}/lib/optional/junit.jar || die | ||
36 | niro | 5689 | |
37 | install -d dist || die | ||
38 | ./build.sh -Ddist.dir=dist/ dist || die | ||
39 | } | ||
40 | |||
41 | src_install() | ||
42 | { | ||
43 | cd ${SRCDIR} | ||
44 | |||
45 | # this one sucks, ignores libdir and installs unneccessary stuff | ||
46 | #ANT_HOME=${BINDIR}/usr ./build.sh install-lite || die | ||
47 | |||
48 | # needed directories | ||
49 | minstalldir /etc/env.d || die | ||
50 | minstalldir /usr/bin || die | ||
51 | minstalldir /usr/share/${PNAME}-${PVER}/bin || die | ||
52 | minstalldir /usr/share/${PNAME}-${PVER}/lib || die | ||
53 | |||
54 | # binaries | ||
55 | local i | ||
56 | for i in ant antRun runant.pl runant.py complete-ant-cmd.pl | ||
57 | do | ||
58 | minstallexec src/script/${i} /usr/share/${PNAME}-${PVER}/bin || die ${i} | ||
59 | mlink /usr/share/${PNAME}-${PVER}/bin/${i} /usr/bin/${i} || die | ||
60 | done | ||
61 | |||
62 | # jars and classpathes env | ||
63 | :> ${BINDIR}/etc/env.d/22java-app-${PNAME} || die | ||
64 | local i | ||
65 | for i in $(find build/lib -name \*.jar) | ||
66 | do | ||
67 | minstallfile ${i} /usr/share/${PNAME}-${PVER}/lib || die ${i} | ||
68 | echo "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/$(basename ${i})" \ | ||
69 | >> ${BINDIR}/etc/env.d/22java-app-${PNAME} || die | ||
70 | done | ||
71 | |||
72 | minstalldocs README LICENSE NOTICE WHATSNEW || die | ||
73 | } |