mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-16 05:11:59 +01:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=java-jffi
|
|
_pkgname=${pkgname#java-}
|
|
pkgver=1.3.1
|
|
_libver=1.2
|
|
pkgrel=0
|
|
pkgdesc="Java Foreign Function Interface"
|
|
url="https://github.com/jnr/jffi"
|
|
# arm* - InvokerTest fails
|
|
# ppc64le - segfaults in test
|
|
# x86 - one NumberTest fails
|
|
arch="all !armhf !armv7 !mips !mips64 !ppc64le !x86"
|
|
license="Apache-2.0"
|
|
depends="openjdk8-jre-base"
|
|
makedepends="apache-ant file openjdk8"
|
|
subpackages="$pkgname-native"
|
|
source="https://github.com/jnr/$_pkgname/archive/$_pkgname-$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$_pkgname-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
ant jar
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
ant test
|
|
}
|
|
|
|
package() {
|
|
depends="$pkgname-native"
|
|
|
|
install -m644 -D "$builddir"/dist/jffi.jar \
|
|
"$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar || return 1
|
|
ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar
|
|
}
|
|
|
|
native() {
|
|
# Note: jffi expects file named libjffi-x.y.so, not libjffi.so.x.y.
|
|
install -m755 -D "$builddir"/build/jni/libjffi-$_libver.so \
|
|
"$subpkgdir"/usr/lib/libjffi-$_libver.so
|
|
}
|
|
|
|
sha512sums="091ff56a328ab6d91c09152f79264904d3bc69ee20c7b7525315263ad558bac7a10a6a1c4888d1f6a6ac2a1d037f5e87b0c3f1c409c796bfebcb2667f92a5291 jffi-1.3.1.tar.gz"
|