Contents of /branches/magellan-next/extras/apache-ant/apache-ant-1.8.2-r2.smage2
Parent Directory | Revision Log
Revision 9650 -
(show annotations)
(download)
Tue Jan 3 22:30:23 2012 UTC (12 years, 4 months ago) by niro
File size: 1669 byte(s)
Tue Jan 3 22:30:23 2012 UTC (12 years, 4 months ago) by niro
File size: 1669 byte(s)
-fixed ANT_HOME config-path
1 | # $Id$ |
2 | |
3 | PNAME="apache-ant" |
4 | PVER="1.8.2" |
5 | PBUILD="r2" |
6 | |
7 | PCATEGORIE="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.8" |
14 | |
15 | SRCFILE="${PNAME}-${PVER}-src.tar.bz2" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | sminclude mbuild java |
19 | |
20 | SRC_URI=( |
21 | http://www.apache.org/dist/ant/source/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | ) |
24 | |
25 | UP2DATE="updatecmd http://www.apache.org/dist/ant/source/ | grep ${PNAME}- | sed 's:.*${PNAME}-\(.*\)-src.*:\1:;q'" |
26 | |
27 | src_compile() |
28 | { |
29 | cd ${SRCDIR} |
30 | # get junit.jar location from classpath |
31 | local junit="$(echo ${CLASSPATH} | sed 's/.*:\(.*junit.jar\):.*/\1/')" |
32 | # and copy it to lib/optional as apache-ant has now a hard-dependency to it |
33 | echo "Using junit.jar from ${junit}!" |
34 | cp -v ${junit} ${SRCDIR}/lib/optional/junit.jar || die |
35 | |
36 | install -d dist || die |
37 | ./build.sh -Ddist.dir=dist/ dist || die |
38 | } |
39 | |
40 | src_install() |
41 | { |
42 | cd ${SRCDIR} |
43 | |
44 | # this one sucks, ignores libdir and installs unneccessary stuff |
45 | #ANT_HOME=${BINDIR}/usr ./build.sh install-lite || die |
46 | |
47 | # needed directories |
48 | minstalldir /usr/bin || die |
49 | minstalldir /usr/share/${PNAME}-${PVER}/bin || die |
50 | |
51 | # binaries |
52 | local i |
53 | for i in ant antRun runant.pl runant.py complete-ant-cmd.pl |
54 | do |
55 | minstallexec src/script/${i} /usr/share/${PNAME}-${PVER}/bin || die ${i} |
56 | mlink /usr/share/${PNAME}-${PVER}/bin/${i} /usr/bin/${i} || die |
57 | done |
58 | |
59 | # jars and classpathes env |
60 | mclasspathinit || die |
61 | minstalljar $(find build/lib -name \*.jar) || die |
62 | |
63 | # add ANT_HOME too |
64 | MCONFIG="/etc/env.d/22java-app-${PNAME}" |
65 | maddconfig "ANT_HOME=/usr/share/${PNAME}-${PVER}" |
66 | |
67 | minstalldocs README LICENSE NOTICE WHATSNEW || die |
68 | } |