aports/community/java-netty-transport-native/APKBUILD

57 lines
1.7 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=java-netty-transport-native
_jarname=netty-transport-native-epoll
pkgver=4.1.92
_pkgver="$pkgver.Final"
pkgrel=0
pkgdesc="Native Netty transport for Linux"
url="https://netty.io"
# armhf,armv7,ppc64le,s390x,x86: fails to build due to missing JAR
# riscv64: blocked by java-jdk
arch="all !armhf !armv7 !ppc64le !riscv64 !s390x !x86"
license="Apache-2.0"
depends="java-jre-headless"
makedepends="
autoconf
automake
java-jdk
libtool
linux-headers
maven
"
source="https://github.com/netty/netty/archive/netty-$_pkgver/netty-$pkgver.tar.gz
musl-compat.patch
"
builddir="$srcdir/netty-netty-$_pkgver/transport-native-epoll"
# net: fetches dependencies from Maven repos
# !check: EpollDatagramUnicast tests fail (TODO)
options="net !check"
# NOTE: Maven 3 dropped support for the M2_HOME variable.
export MAVEN_ARGS="--batch-mode -Dcheckstyle.skip=true -Duser.home=$srcdir/.home"
build() {
export CFLAGS="${CFLAGS/-Os/-O2}"
export CPPFLAGS="${CPPFLAGS/-Os/-O2}"
mvn package -DskipTests
}
check() {
mvn test
}
# NOTE: netty-transport-native-epoll contains only the binary, classes
# are in a separate package (JAR) transport-classes-epoll. It first attempts
# to load the binary from the 'java.library.path' (/usr/lib).
package() {
mkdir -p "$pkgdir"/usr/lib
cp -P target/native-build/target/lib/*.so "$pkgdir"/usr/lib/
}
sha512sums="
600ea68320d07db537e3bf3d1ac55bf4621d881f512071c2de76ded0647041f3061a6cbfb0a61d7bc8f2d92cf02cf4b52ac1e48c0fc8e29c8c78d9dda797975d netty-4.1.92.tar.gz
7ed0550d8a49e8f1605d5e8fd7e4b9635861b546cc8fc86475024b36ced4bdcb22cd1f9de24e95874ddef1b7063d502d617a6321606d8a2cf75f5e4337614e2f musl-compat.patch
"