aboutsummaryrefslogblamecommitdiffstats
path: root/community/java-jffi/APKBUILD
blob: f3aca899c195bf1c56de39fd66ce54bd3abcf703 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                               
             
                    
        

                                         
          
                    
                           
                                      
                             

                                                                          





                      




                      
           












                                                                           
                                                                                                                                                                 
# 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"