aboutsummaryrefslogtreecommitdiffstats
path: root/community/apache-ant/APKBUILD
blob: 207942a209f0f3d1e9f935e4ea982f5a7ecabbbf (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
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>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=apache-ant
pkgver=1.9.7
pkgrel=0
pkgdesc="A java-based build tool."
url="http://ant.apache.org/"
arch="x86_64 x86"
license="ASL-2.0"
depends="openjdk8-jre-base"
makedepends=""
source="http://archive.apache.org/dist/ant/binaries/$pkgname-$pkgver-bin.tar.bz2"
builddir="$srcdir/$pkgname-$pkgver"

_anthome="/usr/share/java/$pkgname"

build() {
	cd "$builddir"

	cat > $pkgname.sh <<-EOF
	ANT_HOME="$_anthome"
	export ANT_HOME
	EOF
}

package() {
	local destdir="$pkgdir/$_anthome"

	cd "$builddir"

	install -dm755 "$destdir"/bin
	rm bin/*.bat bin/*.cmd
	install -m755 bin/* "$destdir"/bin || return 1

	install -dm755 "$pkgdir"/usr/bin
	ln -sf $_anthome/bin/ant "$pkgdir"/usr/bin/ant || return 1

	cp -r etc "$destdir"/ || return 1

	install -dm755 "$destdir"/lib
	install -m644 lib/*.jar "$destdir"/lib || return 1

	# symlink to junit so it's on the javac build path for ant
	# matches behavior on ubuntu 9 and makes sense for compatibility
	# http://bugs.archlinux.org/task/15229
	ln -sf ../../junit.jar "$destdir"/lib/junit.jar || return 1

	# The license says the NOTICE file should be redistributed for
	# derivative works, so lets supply it.
	local file; for file in LICENSE NOTICE; do
		install -m644 -D $file "$pkgdir"/usr/share/licenses/$pkgname/$file || return 1
	done

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

md5sums="99a86981333a0ff39bb56c963d1f492b  apache-ant-1.9.7-bin.tar.bz2"
sha256sums="be2ff3026cc655dc002bbcce100bd6724d448c63f702aa82b6d9899b22db7808  apache-ant-1.9.7-bin.tar.bz2"
sha512sums="3954a6ad3f522c135f327ba0d376eb16ae42103849c8cc5cd6c8c6e87b8c5433c95a0f2d4dfa3e6c2705ee0b8996e5b27d0b2248f64a05fc8c902116cc45a7b2  apache-ant-1.9.7-bin.tar.bz2"