summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/apache-ant/PKGBUILD
blob: 663cc198b71986f1ebb2317ff1a9bca244fb220c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# $Id: PKGBUILD 24082 2009-01-12 21:42:39Z paul $
# Contributor: Andrew Wright <andreww@photism.org>
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=apache-ant
pkgver=1.7.1
pkgrel=1
pkgdesc="Ant is a java-based build tool."
arch=(i686 x86_64)
license=('APACHE')
url="http://ant.apache.org/"
depends=('java-runtime')
makedepends=('java-environment')
noextract=('junit3.8.1.zip')
source=(http://archive.apache.org/dist/ant/source/${pkgname}-${pkgver}-src.tar.bz2
        http://heanet.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip)
md5sums=('0d68db4a1ada5c91bcbf53cefd0c2fd7' '5110326e4b7f7497dfa60ede4b626751')

build() {
  cd ${startdir}/src || return 1
  unzip junit3.8.1.zip || return 1

  cd ${startdir}/src/${pkgname}-${pkgver}
  if [ -f /etc/profile.d/java-gcj-compat.sh ]; then
    . /etc/profile.d/java-gcj-compat.sh
  elif [ -f /etc/profile.d/jdk.sh ]; then
    . /etc/profile.d/jre.sh
    . /etc/profile.d/jdk.sh
  fi

   # we need the junit jar in the classpath to build ant
  export CLASSPATH="${startdir}/src/junit3.8.1/junit.jar"

  # build
  mkdir dist || return 1
  ./build.sh -Ddist.dir=dist/ dist || return 1

  # install
  export ANT_HOME="${startdir}/pkg/usr"
  ./build.sh install-lite || return 1
}