Magellan Linux

Annotation of /branches/magellan-next/extras/apache-ant/apache-ant-1.8.2-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9683 - (hide annotations) (download)
Wed Jan 4 14:27:26 2012 UTC (12 years, 5 months ago) by niro
File size: 1798 byte(s)
auto added: ver bump to 1.8.2-r3
1 niro 9671 # $Id$
2    
3     PNAME="apache-ant"
4     PVER="1.8.2"
5     PBUILD="r3"
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     local junit
30     cd ${SRCDIR}
31    
32     # get junit from classpath
33     if [[ -L ${JAVA_CLASSPATH_DIR}/junit.jar ]]
34     then
35 niro 9672 junit="${JAVA_CLASSPATH_DIR}/$(readlink ${JAVA_CLASSPATH_DIR}/junit.jar)"
36 niro 9671 else
37     junit="${JAVA_CLASSPATH_DIR}/junit.jar"
38     fi
39     # and copy it to lib/optional as apache-ant has now a hard-dependency to it
40     echo "Using junit.jar from ${junit}!"
41     cp -v ${junit} ${SRCDIR}/lib/optional/junit.jar || die
42    
43     install -d dist || die
44     ./build.sh -Ddist.dir=dist/ dist || die
45     }
46    
47     src_install()
48     {
49     cd ${SRCDIR}
50    
51     # this one sucks, ignores libdir and installs unneccessary stuff
52     #ANT_HOME=${BINDIR}/usr ./build.sh install-lite || die
53    
54     # needed directories
55     minstalldir /usr/bin || die
56     minstalldir /usr/share/${PNAME}-${PVER}/bin || die
57    
58     # binaries
59     local i
60     for i in ant antRun runant.pl runant.py complete-ant-cmd.pl
61     do
62     minstallexec src/script/${i} /usr/share/${PNAME}-${PVER}/bin || die ${i}
63     mlink /usr/share/${PNAME}-${PVER}/bin/${i} /usr/bin/${i} || die
64     done
65    
66     # jars and classpathes env
67     mclasspathinit || die
68     minstalljar-classpath $(find build/lib -name \*.jar) || die
69    
70     # add ANT_HOME too
71     MCONFIG="/etc/env.d/22java-app-${PNAME}"
72 niro 9683 maddconfig "ANT_HOME=\"/usr/share/${PNAME}-${PVER}\"" || die
73 niro 9671
74     minstalldocs README LICENSE NOTICE WHATSNEW || die
75     }