aboutsummaryrefslogtreecommitdiffstats
path: root/community/java-jffi/APKBUILD
blob: 407a81513dc35be0ff7d6906212dd6f2d20edce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-jffi
_pkgname=${pkgname#java-}
pkgver=1.2.13
_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 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() {
	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="af4edf7be04f522e12d85ffb7c24fade  jffi-1.2.13.tar.gz"
sha256sums="e0c2ccee1dd411eb203dfcbd9577737009743a6b82464abf4f41d69af6faa652  jffi-1.2.13.tar.gz"
sha512sums="e9d555f35a02861bc75ec5f10f7007f78e69a7cbebef13704eba6007bf60fa19a4763b17e26d47d4a40af10d2f6ebaece627cdc676319dd806b3268902c4bcc2  jffi-1.2.13.tar.gz"