Skip to content

Instantly share code, notes, and snippets.

@bbidulock
Created April 17, 2022 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbidulock/e7e620a3b326cd024589df94caf0ee6f to your computer and use it in GitHub Desktop.
Save bbidulock/e7e620a3b326cd024589df94caf0ee6f to your computer and use it in GitHub Desktop.
PKGBUILD for fluent-bit-git 1.9.2.r50.g7a03451b3h-1
# vim: et ts=4 sw=4:
# Maintainer: Aaron McDaniel (mcd1992) <'aur' at the domain 'fgthou.se'>
pkgname=fluent-bit-git
_pkgname=fluent-bit
pkgver=1.9.2.r50.g7a03451b3
pkgrel=1
pkgdesc="Collect data/logs from different sources, unify and send them to multiple destinations"
url="https://fluentbit.io/"
arch=(x86_64 aarch64 armv7h i686)
license=('Apache')
depends=('gcc-libs' 'openssl' 'libsystemd.so')
# PostgreSQL_TYPE_INCLUDE_DIR is provided by postgresql, this is currently a bug
makedepends=('git' 'cmake' 'postgresql-libs' 'postgresql' 'python' 'valgrind' 'systemd-libs')
checkdepends=('gtest' 'doxygen' 'graphviz')
backup=('etc/fluent-bit/fluent-bit.conf'
'etc/fluent-bit/parsers.conf'
'etc/fluent-bit/plugins.conf')
source=("${pkgname}::git+https://github.com/fluent/fluent-bit.git")
provides=("${_pkgname}=${pkgver%%.r*}-${pkgrel}")
conflicts=("${_pkgname}")
pkgver() {
cd ${pkgname}
# Remove 'v' prefix on tags; prefix revision with 'r'; replace all '-' with '.'
git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $pkgname
sed -i -e 's, /lib/systemd/system, /usr/lib/systemd/system,' CMakeLists.txt
sed -i -e 's, /lib/systemd/system, /usr/lib/systemd/system,' src/CMakeLists.txt
rm -fr build
mkdir build
}
build() {
cd $pkgname/build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LIBDIR=lib \
-DSYSTEMD_DIR=/usr/lib/systemd/system \
-DFLB_TESTS_INTERNAL=Yes \
-DFLB_IN_MQTT=Yes \
-DFLB_TLS=Yes \
-DFLB_ALL=Yes \
-DFLB_OUT_NATS=Yes \
-DFLB_HTTP_SERVER=Yes \
-DMBEDTLS_FATAL_WARNINGS=Off \
..
make
}
check() {
cd $pkgname/build
make test
}
package() {
cd $pkgname/build
# install binaries and libraries
make DESTDIR="$pkgdir/" install
# install license file and documentation
install -Dm 644 ../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
install -Dm 644 ../*.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
md5sums=('SKIP')
sha512sums=('SKIP')
b2sums=('SKIP')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment