# Contributor: Steeve Chailloux # Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=apache-ant pkgver=1.10.13 pkgrel=1 pkgdesc="A java-based build tool" url="https://ant.apache.org/" # riscv64 blocked by java-jdk arch="noarch !riscv64" license="Apache-2.0" makedepends="openjdk8" depends="java-jdk" source="https://www.apache.org/dist/ant/source/apache-ant-$pkgver-src.tar.bz2 $pkgname-fetch-netrexx.patch::https://github.com/apache/ant/commit/541a1d2448af3e95134f79a970a608403deab00a.patch " # !check: needs itself for testing # net: fetch dependencies options="!check net" _anthome="/usr/share/java/$pkgname" # secfixes: # 1.10.11-r0: # - CVE-2021-36373 # - CVE-2021-36374 # 1.10.9-r0: # - CVE-2020-11979 # 1.10.8-r0: # - CVE-2020-1945 build() { export JAVA_HOME="/usr/lib/jvm/java-8-openjdk" ./bootstrap.sh bootstrap/bin/ant -f fetch.xml -Ddest=optional bootstrap/bin/ant dist cat > $pkgname.sh <<-EOF ANT_HOME="$_anthome" export ANT_HOME EOF } package() { local destdir="$pkgdir/$_anthome" cd apache-ant-$pkgver install -dm755 "$destdir"/bin rm bin/*.bat bin/*.cmd install -m755 bin/* "$destdir"/bin install -dm755 "$pkgdir"/usr/bin ln -sf $_anthome/bin/ant "$pkgdir"/usr/bin/ant cp -r etc "$destdir"/ install -dm755 "$destdir"/lib install -m644 lib/*.jar "$destdir"/lib # 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 # 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 done install -m644 -D "$builddir"/$pkgname.sh "$pkgdir"/etc/profile.d/$pkgname.sh } sha512sums=" 0fc82578b24fc2ef286e5814e8e7579d4c9ccac80c8f093b33672fecb40e99b152cfab2ae7c967d9bab881a04f4536971042f06be2d8778bb19bb245854c439f apache-ant-1.10.13-src.tar.bz2 945b7bb7fa294543711a09d0f5fec1f89913502a691a1a9cdd6c0d227e8ea924de92887466792501fee52869c1101b824ca4c7869df8879cd466155e7a53ffc8 apache-ant-fetch-netrexx.patch "