ptrcnull c564fba61f
community/*: remove explicit " || return 1"
[AL2]:|| return 1 is not required as set -e is used
2022-02-16 21:15:15 +01:00

37 lines
1.3 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-jansi-native
_pkgname=${pkgname#java-}
pkgver=1.5
pkgrel=0
pkgdesc="Native JNI libraries used by the Jansi project."
url="https://github.com/fusesource/jansi-native"
arch="all !riscv64" # missing openjdk8
license="Apache-2.0"
depends="openjdk8-jre-base"
makedepends="autoconf automake libtool maven openjdk8"
source="https://github.com/fusesource/$_pkgname/archive/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgname-$pkgver"
build() {
# We need to use newer version of hawtjni plugin, otherwise compilation
# of native sources fails.
JAVA_HOME=/usr/lib/jvm/default-jvm \
mvn package -Dmaven.repo.local=/tmp/m2 -Dhawtjni-version=1.11
}
package() {
cd "$builddir"/target
install -m644 -D $_pkgname-$pkgver.jar \
"$pkgdir"/usr/share/java/$_pkgname-$pkgver.jar
ln -sf $_pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$_pkgname.jar
# Note: jansi expects file named libjansi.so or libjansi-x.y.so, not libjansi.so.x.y.
install -m755 -D native-build/target/lib/libjansi.so \
"$pkgdir"/usr/lib/libjansi-$pkgver.so
ln -sf libjansi-$pkgver.so "$pkgdir"/usr/lib/libjansi.so
}
sha512sums="f474df09402b86f5e534bc50a3755dfff353cb5688c93b951ffb4166ac6f83e445393d65baf50a6e93a50d1583772e56bf668a3a0b5312d59cce61493ded1453 jansi-native-1.5.tar.gz"