1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
6 pkgdesc='Bouncy Castle Crypto APIs for Java'
8 url='https://www.bouncycastle.org/java.html'
10 depends=('java-runtime-headless')
11 makedepends=('ant' 'strip-nondeterminism')
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/bcgit/bc-java/archive/refs/tags/r${pkgver/./rv}.tar.gz")
13 sha512sums=('7d2abab42a7e29159ae063244a4296708d1269e5a8250f0e2f62b095916d509e6e4213f4b32d45f375e1aabea572860d9b81df9ee5efcdff9b9e569864c9f8db')
16 cd "bc-java-r${pkgver/./rv}"
17 ant -f ant/jdk18+.xml clean build-provider build
19 # Timestamps in JAR files generated by Ant do not honour SOURCE_DATE_EPOCH
20 # (https://bz.apache.org/bugzilla/show_bug.cgi?id=61269)
21 strip-nondeterminism --timestamp "$SOURCE_DATE_EPOCH" "build/artifacts/jdk1.8/jars/bcprov-jdk18on-${pkgver/./}.jar"
25 cd "bc-java-r${pkgver/./rv}"
26 ant -f ant/jdk18+.xml test
30 cd "bc-java-r${pkgver/./rv}"
31 install -Dm644 "build/artifacts/jdk1.8/jars/bcprov-jdk18on-${pkgver/./}.jar" -t "$pkgdir/usr/share/java/$pkgname"
32 ln -s "bcprov-jdk18on-${pkgver/./}.jar" "$pkgdir/usr/share/java/$pkgname/bcprov.jar"
33 install -Dm644 LICENSE.html -t "$pkgdir/usr/share/licenses/$pkgname"