aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fluent-bit/APKBUILD
blob: aaf0c89919d872516fe9dd7ecc656ea397f42ba9 (plain) (blame)
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
57
58
59
60
61
62
63
64
65
66
67
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=fluent-bit
pkgver=1.6.10
pkgrel=0
pkgdesc="Fast and Lightweight Log processor and forwarder"
url="https://fluentbit.io/"
arch="all !ppc64le !s390x"
license="Apache-2.0"
makedepends="
	bison
	cmake
	flex
	fts-dev
	gtest-dev
	zlib-dev
	"
subpackages="
	$pkgname-dev
	$pkgname-openrc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/fluent/fluent-bit/archive/v$pkgver.tar.gz
	fluent-bit.confd
	fluent-bit.initd
	chunkio-static-lib-fts.patch
	"
# enable check when this solved - https://github.com/fluent/fluent-bit/issues/2464#issuecomment-673280055
options="!check"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	# default CORE_STACK_SIZE=((3 * PTHREAD_STACK_MIN) / 2)=3072 is invalid
	# based on https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/configuration-file
	# set default to 24576
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DFLB_CORO_STACK_SIZE=24576 \
		-DFLB_TESTS_INTERNAL=Yes \
		-DFLB_TLS=Yes \
		-DFLB_HTTP_SERVER=Yes \
		$CMAKE_CROSSOPTS .
	make -C build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=1 make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname

	mv "$pkgdir"/usr/etc/* "$pkgdir"/etc
}

sha512sums="bddce2a4b041a5671cc3e1e6c749843fd0be28294442922994822ae9c5686b2ecdeaa6615d1745a289786304c083d15c64d6bae31f661da1f77df8e610a5e31c  fluent-bit-1.6.10.tar.gz
f6431397c80a036980b5377b51e38aec25dfceeb8dbe4cd54dce1f6e77d669d9f8daf983fcc96d25332385888f1809ced5e8ab0e8ccfcd93d19494036e3dc949  fluent-bit.confd
8ba6c8e84dee90176f9b4375fb2c6444fa5d32fa601d9bcf3ea7960fec87f1ef664f175caf08bd0b052843e971efdbf08e2a5cd180ad9a8f23ff2c5cb233814f  fluent-bit.initd
5ec7fb96850a5b038eb27fc0c0e1823e7976c467c05e846da668f32ad7a124d86d700386a684b335726ad1958b2422b0b0dc0aa36172f94ac4747339d91686bd  chunkio-static-lib-fts.patch"