aboutsummaryrefslogtreecommitdiffstats
path: root/community/java-netty-transport-native/APKBUILD
blob: a96c84764223b9c0a508456ae80580c20b675d6a (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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.108
_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="
9bfaffadb28eda14ef1b0af28e8c9f816b918bd97621395f611a4ec7352922f1915ad1b886f4a163bc7c9ae4fd0596020eaae11415ad037ae209bb89f3d42301  netty-4.1.108.tar.gz
7ed0550d8a49e8f1605d5e8fd7e4b9635861b546cc8fc86475024b36ced4bdcb22cd1f9de24e95874ddef1b7063d502d617a6321606d8a2cf75f5e4337614e2f  musl-compat.patch
"