diff options
-rw-r--r-- | testing/java-jffi/APKBUILD | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/java-jffi/APKBUILD b/testing/java-jffi/APKBUILD new file mode 100644 index 0000000000..623f767357 --- /dev/null +++ b/testing/java-jffi/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=java-jffi +_pkgname=${pkgname#java-} +pkgver=1.2.11 +_libver=${pkgver%.*} +pkgrel=0 +pkgdesc="Java Foreign Function Interface" +url="https://github.com/jnr/jffi" +arch="all" +license="ASL-2.0" +depends="openjdk8-jre-base" +makedepends="apache-ant openjdk8" +subpackages="$pkgname-native" +source="$_pkgname-$pkgver.tar.gz::https://github.com/jnr/$_pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + ant jar +} + +package() { + arch="noarch" + 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 +} + +md5sums="6b04c8c779f494d30ad7ec5d88811b9a jffi-1.2.11.tar.gz" +sha256sums="3363881609afa0edf491c42a0bba2e55a22e4a8c3d6f65dc4da5725e07ef8e6b jffi-1.2.11.tar.gz" +sha512sums="b8a43afa1b792fecafab50a024f7db494840e9f7b8695015177e314d84be2aa8efe19f8e0155fdc6aa4e0b970f6b4a3a422df435dd43c3ddf2e23a391548c053 jffi-1.2.11.tar.gz" |