mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-29 05:12:18 +01:00
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
# Contributor: Steeve Chailloux <steeve@chaahk.com>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=apache-ant
|
|
pkgver=1.9.6
|
|
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"
|
|
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="9a966bfde100aa696f8a32cba03bce21 apache-ant-1.9.6-bin.tar.bz2"
|
|
sha256sums="a43b0928960d63d6b1e2bed37e1ce4fd8fa1788ba84e08388bfe9513f02e8db3 apache-ant-1.9.6-bin.tar.bz2"
|
|
sha512sums="363c7c6e0a90de95953b0b24fdae3699bf44c9e15b8f4ebbee190515b4b0611eb2d2866ec7a052b7676be34defddc3a2cf51d09f1176474b67fe8e8e5af5fb7f apache-ant-1.9.6-bin.tar.bz2"
|