fluent-bit: add package
authorRahul Thakur <rahul.thakur@iopsys.eu>
Thu, 11 Jul 2024 07:07:00 +0000 (12:37 +0530)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Thu, 18 Jul 2024 12:31:50 +0000 (14:31 +0200)
* add package fluent-bit v3.1.3
* test performed
  - compile-test
  - run-test on target

* fluent-bit package is added to provide another option for
  log collection and management. It integrates well with
  a wide variety of environments and deployments. It is widely
  used by a number of organizations and is supported across a
  variety of platforms. Integrating it to make it available as
  an openwrt package.

Signed-off-by: Rahul Thakur <rahul.thakur@iopsys.eu>
admin/fluent-bit/Makefile [new file with mode: 0644]

diff --git a/admin/fluent-bit/Makefile b/admin/fluent-bit/Makefile
new file mode 100644 (file)
index 0000000..9fa1dd1
--- /dev/null
@@ -0,0 +1,54 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fluent-bit
+PKG_VERSION:=3.1.3
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
+PKG_SOURCE_VERSION=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=85b861693a9ed597e4e55e30330dd2fb96daa997eb71424a55ccc28de92eef78
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/fluent-bit
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE:=Fast and Lightweight Logs and Metrics processor
+  URL:=https://fluentbit.io/
+  DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
+endef
+
+define Package/fluent-bit/description
+  Fluent Bit is a super fast, lightweight, and highly scalable logging
+  and metrics processor and forwarder.
+endef
+
+define Package/fluent-bit/conffiles
+/etc/fluent-bit/parsers.conf
+endef
+
+TARGET_LDFLAGS +=-lfts -latomic
+
+CMAKE_OPTIONS+= \
+       -DFLB_RELEASE=Yes \
+       -DEXCLUDE_FROM_ALL=true \
+       -DFLB_EXAMPLES=No \
+       -DFLB_CHUNK_TRACE=No \
+       -DFLB_BACKTRACE=No \
+       -DFLB_WASM=No \
+       -DFLB_LUAJIT=No
+
+define Package/fluent-bit/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/
+
+       $(INSTALL_DIR) $(1)/etc/fluent-bit
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/parsers.conf $(1)/etc/fluent-bit/parsers.conf
+endef
+
+$(eval $(call BuildPackage,fluent-bit))