summaryrefslogtreecommitdiff
path: root/bootstrap/ant-1.8.4/APKBUILD
blob: 28d078d03002a1e30355521f7636ce5ca02da81f (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Steeve Chailloux <steeve@chaahk.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Alyx Wolcott <alyx@leuhta.com>
# Maintainer: Horst Burkhardt <horst@adelielinux.org>
pkgname=ant
pkgver=1.8.4
pkgrel=0
pkgdesc="Java-based build tool"
url="http://ant.apache.org/"
arch="noarch" 
options="!check" # ExecStreamRedirectorTest locks on ppc64, SMTP tests fail
license="Apache-2.0"
depends="jamvm=1.5.1-r0"
makedepends=""
subpackages=""
source="https://archive.apache.org/dist/ant/source/apache-$pkgname-$pkgver-src.tar.bz2
	ant.sh"
builddir="$srcdir/apache-$pkgname-$pkgver"

prepare() {
	sed -i -e 's/depends="jars,test-jar"/depends="jars"/' build.xml
	default_prepare
	  }

build() {
	export BOOTJAVAC_OPTS="-nowarn"
	export ANT_OPTS="-Dbuild.compiler=jikes"
	export JAVACMD="/usr/bin/java"
	export CLASSPATH=".:/usr/jamvm/lib/rt.jar"
	unset JAVA_HOME
	sh ./build.sh
	}

check() {
	./bootstrap/bin/ant test
	}

package() {
	mkdir -pv "$pkgdir"/usr/share/ant/lib
	mkdir -pv "$pkgdir"/usr/share/ant/bin
	
	for jar in ant.jar ant-bootstrap.jar ant-launcher.jar; do 
		install -m644 -D build/lib/${jar} "$pkgdir"/usr/share/ant/lib/${jar}
	done
	
	for script in antRun antRun.pl runant.pl runant.py complete-ant-cmd.pl ; do
		install -m755 -D src/script/${script} "$pkgdir"/usr/bin/${script}
		ln -s "$pkgdir"/usr/bin/${script} "$pkgdir"/usr/share/ant/bin/${script}
	done

	install -m755 -D dist/bin/ant "$pkgdir"/usr/bin/ant
	ln -sf "$pkgdir"/usr/bin/ant "$pkgdir"/usr/share/ant/bin/ant
	
	install -m644 -D NOTICE "$pkgdir"/usr/share/licenses/$pkgname/NOTICE

	install -m644 -D $srcdir/$pkgname.sh "$pkgdir"/etc/profile.d/$pkgname.sh
	}

sha512sums="7dbbdcd31f5fd498cbbe7f125451899320e5e9c2396b80f1f90d18943f8ef066a75198edfdba0edf96b1e0b5b84cb049b5281403180a7a6924ebfb077930e307  apache-ant-1.8.4-src.tar.bz2
e5f1681dd0dae3629eb14fbda8f18e9a72dd403395aedd07023763336a5eda4f961008c369fc8f84f073fab56b08c7adceda01716c48a8902671d61e0abf61a8  ant.sh"