Commit 357a2a3b authored by 杨文 陈's avatar 杨文 陈

testing/fluent-bit: new aport

parent 208b9062
Pipeline #39384 passed with stages
in 3 minutes and 1 second
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=fluent-bit
pkgver=1.5.3
pkgrel=0
pkgdesc="Fast and Lightweight Log processor and forwarder for Linux, BSD and OSX"
url="https://fluentbit.io/"
arch="all !ppc64le !s390x"
license="Apache-2.0"
makedepends="cmake fts-dev gtest-dev flex bison zlib-dev"
subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/fluent/fluent-bit/archive/v$pkgver.tar.gz
fluent-bit.initd
fluent-bit.confd
"
#builddir="$srcdir/$pkgname-$pkgver"
# fluent-bit disbaled tests by default
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 \
$CMAKE_CROSSOPTS .
make -C build
}
check() {
CTEST_OUTPUT_ON_FAILURE=1 make -C build check
}
package() {
make -C build DESTDIR="$pkgdir" install
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
}
libs() {
pkgdesc="FluentBit library"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
sha512sums="080a1068df9631c30206b49ffd3ac00d6e46da690e96797f5b03b9101e6d9235ff8b374e8894f9c4a8a399c0faed87993e7977df6bdbaadb529766b0794cecbb fluent-bit-1.5.3.tar.gz
68d1ecc1a8ebd6dc7f14f97f08896c4b5836daa9f2110d2a7c61f824ba054209a5fbf0acc21e4822099f38100bf9e7e50be2260697130c78f8afc9c382fffafa fluent-bit.initd
e16f7a1093f6a51461be97ca5dffc8b3f0bfd9a248767e359b3e61f6ccb579428e615f7b36e34909ce31bc92ed7d0e86e592e32aa09b6dd6d01fe966a6cd9bbd fluent-bit.confd"
fluentbit_opts="-c /usr/etc/fluent-bit/fluent-bit.conf"
#!/sbin/openrc-run
supervisor="supervise-daemon"
name=fluent-bit
command="/usr/bin/$name"
command_args="$fluentbit_opts"
command_background="yes"
pidfile="/run/$name.pid"
depend() {
need net
after firewall
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment