archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / bcprov / trunk / PKGBUILD
blobeaa60f4e96b3103475a6494628649713634e5135
1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
3 pkgname=bcprov
4 pkgver=1.73
5 pkgrel=1
6 pkgdesc='Bouncy Castle Crypto APIs for Java'
7 arch=('any')
8 url='https://www.bouncycastle.org/java.html'
9 license=('MIT')
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')
15 build() {
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"
24 check() {
25         cd "bc-java-r${pkgver/./rv}"
26         ant -f ant/jdk18+.xml test
29 package() {
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"