Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 59 additions & 45 deletions admin/syslog-ng/Makefile
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PKG_RELEASE 👀

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Bumped. Still I need to have working build env first. I do have some issues on MacOS once again. 😆 I am not able to compile OpenWrt toolchain so far. I will need to look at it to be able to continue with this PR.

Reference: openwrt/openwrt#23122

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can deselect Build gdb if you select Advanced configuration options (for developers) ---> Toolchain Options

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but proper solution is to fix that. 😇

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=syslog-ng
PKG_VERSION:=4.11.0
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
Expand All @@ -13,17 +13,17 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_HASH:=37ea0d4588533316de122df4e1b249867b0a0575f646c7478d0cc4d747462943

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

PKG_BUILD_DEPENDS:= \
HOST_OS_MACOS:fakeuname/host \

PKG_CONFIG_DEPENDS:= \
CONFIG_IPV6 \
CONFIG_LIBCURL_ZLIB

PKG_BUILD_DEPENDS:=gperf/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include $(INCLUDE_DIR)/nls.mk
ifeq ($(CONFIG_HOST_OS_MACOS),y)
include ../../utils/fakeuname/fakeuname.mk
Expand All @@ -34,7 +34,7 @@ define Package/syslog-ng
CATEGORY:=Administration
TITLE:=A powerful syslog daemon
URL:=https://www.syslog-ng.com/products/open-source-log-management/
DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +libdbi +libjson-c +libcurl +libuuid +ivykis +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib
DEPENDS:=+libpcre2 +glib2 +libopenssl +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib +ivykis
ALTERNATIVES:=300:/sbin/logread:/usr/libexec/logread.sh
endef

Expand Down Expand Up @@ -75,56 +75,70 @@ config SYSLOGNG_LOGROTATE_ROTATE_COUNT
versions are removed rather than rotated.
endef

define Build/Configure
$(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
$(Build/Configure/Default)
endef

LOGROTATE_MAXSIZE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_MAXSIZE))
LOGROTATE_ROTATE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_ROTATE_COUNT))

CONFIGURE_ARGS += \
--disable-afsnmp \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-tcp-wrapper \
--disable-spoof-source \
--disable-sql \
--disable-linux-caps \
--with-jsonc=system \
--with-ivykis=system \
--enable-cpp=no \
--disable-example-modules \
--enable-json=yes \
$(if $(CONFIG_LIBCURL_ZLIB),--enable-http=yes,--enable-http=no) \
--disable-smtp \
--disable-mqtt \
--disable-redis \
--disable-stackdump \
--disable-dependency-tracking \
--disable-python \
--disable-geoip2 \
--disable-java \
--disable-java-modules \
--with-librabbitmq-client=no \
--with-mongoc=no

CONFIGURE_VARS += \
$(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(PATH)) \
LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
CMAKE_OPTIONS += \
-DBUILD_TESTING=OFF \
-DENABLE_IPV6=$(if $(CONFIG_IPV6),ON,OFF) \
-DENABLE_TCP_WRAPPER=OFF \
-DENABLE_SPOOF_SOURCE=OFF \
-DENABLE_LINUX_CAPS=OFF \
-DENABLE_JSON=ON \
-DENABLE_CPP=OFF \
-DENABLE_AFSNMP=OFF \
-DENABLE_AFUSER=ON \
-DENABLE_EXAMPLE_MODULES=OFF \
-DENABLE_EBPF=OFF \
-DENABLE_HTTP=$(if $(CONFIG_LIBCURL_ZLIB),ON,OFF) \
-DENABLE_SMTP=OFF \
-DENABLE_REDIS=OFF \
-DENABLE_STACKDUMP=OFF \
-DENABLE_PYTHON=OFF \
-DENABLE_GEOIP2=OFF \
-DENABLE_JAVA=OFF \
-DENABLE_JAVA_MODULES=OFF \
-DENABLE_GRPC=OFF \
-DENABLE_AFAMQP=OFF \
-DENABLE_APPMODEL=OFF \
-DENABLE_AZURE_AUTH_HEADER=OFF \
-DENABLE_GETENT=OFF \
-DENABLE_HOOK_COMMANDS=OFF \
-DENABLE_MAP_VALUE_PAIRS=OFF \
-DENABLE_NATIVE=OFF \
-DENABLE_PACCT=OFF \
-DENABLE_STARDATE=OFF \
-DENABLE_STOMP=OFF \
-DENABLE_XML=OFF \
-DENABLE_MANPAGES=OFF \
-DENABLE_MANPAGES_INSTALL=OFF \
-DENABLE_TOOLS=ON \
-DENABLE_KAFKA=OFF \
-DENABLE_MQTT=OFF \
-DNEABLE_SQL=OFF \
-DENABLE_IO_URING=OFF \
-DWITH_JSONC=system \
-DWITH_SYSTEMD_JOURNAL=OFF \
-DIVYKIS_SOURCE=system

define Package/syslog-ng/install
cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/

$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/

$(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib
rm -rf $(1)/usr/lib/pkgconfig \
$(1)/usr/lib/*.a \
$(1)/usr/include \
$(1)/var
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/

$(INSTALL_DIR) $(1)/usr/lib/syslog-ng
$(CP) $(PKG_INSTALL_DIR)/usr/lib/syslog-ng/* $(1)/usr/lib/syslog-ng/

$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng

$(INSTALL_DIR) $(1)/etc/syslog-ng.d
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
$(INSTALL_CONF) ./files/syslog-ng.conf $(1)/etc
touch $(1)/etc/syslog-ng.d/.keep

$(INSTALL_DIR) $(1)/usr/libexec
Expand Down
Loading