# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=java-jffi _pkgname=${pkgname#java-} pkgver=1.2.12 _libver=${pkgver%.*} pkgrel=0 pkgdesc="Java Foreign Function Interface" url="https://github.com/jnr/jffi" # openjdk8 is currently build only for x86* arch="x86 x86_64" license="ASL-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 } 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="a8837f4ea23e34db8716236d26bcd6cc jffi-1.2.12.tar.gz" sha256sums="3e8bf503478a2888c55a70acf625ab5d6a92904c6a0e9db00a46db8d44d4c0dc jffi-1.2.12.tar.gz" sha512sums="7728a96938cf59d0e36fc502642a83345b8f91ffa26eb8fd07d360b8d370eda2aa95b9016aae70e5f283dd5bc662ff8d1d671693d93bcf7e45938ae24aadd6c3 jffi-1.2.12.tar.gz"