iptables: bump to version 1.6.1
[buildroot-gz.git] / package / syslog-ng / syslog-ng.mk
blobcfc7d0df4f9edcafd25cf6417e3bdb04b84043a6
1 ################################################################################
3 # syslog-ng
5 ################################################################################
7 SYSLOG_NG_VERSION = 3.7.3
8 SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION)
9 SYSLOG_NG_LICENSE = LGPLv2.1+ (syslog-ng core), GPLv2+ (modules)
10 SYSLOG_NG_LICENSE_FILES = COPYING
11 SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
12 eventlog libglib2 openssl pcre
13 # rabbit-mq needs -lrt
14 SYSLOG_NG_CONF_ENV = LIBS=-lrt
15 SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run
17 # We override busybox's S01logging init script
18 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
19 SYSLOG_NG_DEPENDENCIES += busybox
20 endif
22 ifeq ($(BR2_PACKAGE_GEOIP),y)
23 SYSLOG_NG_DEPENDENCIES += geoip
24 SYSLOG_NG_CONF_OPTS += --enable-geoip
25 else
26 SYSLOG_NG_CONF_OPTS += --disable-geoip
27 endif
29 ifeq ($(BR2_PACKAGE_LIBCAP),y)
30 SYSLOG_NG_DEPENDENCIES += libcap
31 SYSLOG_NG_CONF_OPTS += --enable-linux-caps
32 else
33 SYSLOG_NG_CONF_OPTS += --disable-linux-caps
34 endif
36 ifeq ($(BR2_PACKAGE_PYTHON),y)
37 SYSLOG_NG_DEPENDENCIES += python
38 SYSLOG_NG_CONF_OPTS += \
39 --enable-python \
40 --with-python=$(PYTHON_VERSION_MAJOR)
41 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
42 SYSLOG_NG_DEPENDENCIES += python3
43 SYSLOG_NG_CONF_OPTS += \
44 --enable-python \
45 --with-python=$(PYTHON3_VERSION_MAJOR)
46 else
47 SYSLOG_NG_CONF_OPTS += \
48 --disable-python \
49 --without-python
50 endif
52 ifeq ($(BR2_PACKAGE_LIBESMTP),y)
53 SYSLOG_NG_DEPENDENCIES += libesmtp
54 SYSLOG_NG_CONF_OPTS += --enable-smtp
55 SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr"
56 else
57 SYSLOG_NG_CONF_OPTS += --disable-smtp
58 endif
60 ifeq ($(BR2_PACKAGE_JSON_C),y)
61 SYSLOG_NG_DEPENDENCIES += json-c
62 SYSLOG_NG_CONF_OPTS += --enable-json
63 else
64 SYSLOG_NG_CONF_OPTS += --disable-json
65 endif
67 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
68 SYSLOG_NG_DEPENDENCIES += util-linux
69 endif
71 ifeq ($(BR2_PACKAGE_LIBNET),y)
72 SYSLOG_NG_DEPENDENCIES += libnet
73 SYSLOG_NG_CONF_OPTS += --enable-spoof-source
74 else
75 SYSLOG_NG_CONF_OPTS += --disable-spoof-source
76 endif
78 ifeq ($(BR2_INIT_SYSTEMD),y)
79 SYSLOG_NG_DEPENDENCIES += systemd
80 SYSLOG_NG_CONF_OPTS += \
81 --enable-systemd \
82 --with-systemdsystemunitdir=/usr/lib/systemd/system
83 else
84 SYSLOG_NG_CONF_OPTS += --disable-systemd
85 endif
87 define SYSLOG_NG_INSTALL_INIT_SYSV
88 $(INSTALL) -m 0755 -D package/syslog-ng/S01logging \
89 $(TARGET_DIR)/etc/init.d/S01logging
90 endef
92 # By default syslog-ng installs a number of sample configuration
93 # files. Some of these rely on optional features being
94 # enabled. Because of this buildroot uninstalls the shipped config
95 # files and provides a simplified configuration.
96 define SYSLOG_NG_FIXUP_CONFIG
97 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
98 DESTDIR=$(TARGET_DIR) scl-uninstall-local
99 $(INSTALL) -D -m 0644 package/syslog-ng/syslog-ng.conf \
100 $(TARGET_DIR)/etc/syslog-ng.conf
101 endef
103 SYSLOG_NG_POST_INSTALL_TARGET_HOOKS = SYSLOG_NG_FIXUP_CONFIG
105 $(eval $(autotools-package))