Annotation of /branches/R11-unstable/extras/apache-ant/apache-ant-1.9.4-r1.smage2
Parent Directory | Revision Log
Revision 25112 -
(hide annotations)
(download)
Tue Nov 25 03:03:53 2014 UTC (9 years, 5 months ago) by niro
File size: 1814 byte(s)
Tue Nov 25 03:03:53 2014 UTC (9 years, 5 months ago) by niro
File size: 1814 byte(s)
-release branches/R11-unstable
1 | niro | 23026 | # $Id$ |
2 | |||
3 | PNAME="apache-ant" | ||
4 | PVER="1.9.4" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="dev-java" | ||
8 | |||
9 | DESCRIPTION="Ant is a java-based build tool." | ||
10 | HOMEPAGE="http://ant.apache.org/" | ||
11 | |||
12 | DEPEND=">= virtual/java-jdk | ||
13 | >= dev-java/junit-4.11" | ||
14 | |||
15 | SRCFILE="${PNAME}-${PVER}-src.tar.bz2" | ||
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
17 | |||
18 | sminclude mbuild java | ||
19 | msetfeature "!check" | ||
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 | local junit | ||
31 | cd ${SRCDIR} | ||
32 | |||
33 | # get junit from classpath | ||
34 | if [[ -L ${JAVA_CLASSPATH_DIR}/junit.jar ]] | ||
35 | then | ||
36 | junit="${JAVA_CLASSPATH_DIR}/$(readlink ${JAVA_CLASSPATH_DIR}/junit.jar)" | ||
37 | else | ||
38 | junit="${JAVA_CLASSPATH_DIR}/junit.jar" | ||
39 | fi | ||
40 | # and copy it to lib/optional as apache-ant has now a hard-dependency to it | ||
41 | echo "Using junit.jar from ${junit}!" | ||
42 | cp -v ${junit} ${SRCDIR}/lib/optional/junit.jar || die | ||
43 | |||
44 | install -d dist || die | ||
45 | ./build.sh -Ddist.dir=dist/ dist || die | ||
46 | } | ||
47 | |||
48 | src_install() | ||
49 | { | ||
50 | cd ${SRCDIR} | ||
51 | |||
52 | # this one sucks, ignores libdir and installs unneccessary stuff | ||
53 | #ANT_HOME=${BINDIR}/usr ./build.sh install-lite || die | ||
54 | |||
55 | # needed directories | ||
56 | minstalldir /usr/bin || die | ||
57 | minstalldir /usr/share/${PNAME}-${PVER}/bin || die | ||
58 | |||
59 | # binaries | ||
60 | local i | ||
61 | for i in ant antRun runant.pl runant.py complete-ant-cmd.pl | ||
62 | do | ||
63 | minstallexec src/script/${i} /usr/share/${PNAME}-${PVER}/bin || die ${i} | ||
64 | mlink /usr/share/${PNAME}-${PVER}/bin/${i} /usr/bin/${i} || die | ||
65 | done | ||
66 | |||
67 | # jars and classpathes env | ||
68 | mclasspathinit || die | ||
69 | minstalljar-classpath $(find build/lib -name \*.jar) || die | ||
70 | |||
71 | # add ANT_HOME too | ||
72 | MCONFIG="/etc/env.d/22java-app-${PNAME}" | ||
73 | maddconfig "ANT_HOME=\"/usr/share/${PNAME}-${PVER}\"" || die | ||
74 | |||
75 | minstalldocs README LICENSE NOTICE WHATSNEW || die | ||
76 | } |