mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=java-jffi
|
|
_pkgname=${pkgname#java-}
|
|
pkgver=1.2.17
|
|
_libver=${pkgver%.*}
|
|
pkgrel=0
|
|
pkgdesc="Java Foreign Function Interface"
|
|
url="https://github.com/jnr/jffi"
|
|
arch="all"
|
|
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="27a997231201dbc0d7cb01fc814e182c08cc3797619617a6a2e4002f9b7f67e2587f95a49704bb00c7b44149f13bea33a9890ef5b22d8c63f4c7999f7d2b4e47 jffi-1.2.17.tar.gz"
|