]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/syslog-ng/syslog-ng.mk
syslog-ng: bump version header in conf file to 3.10
[coffee/buildroot.git] / package / syslog-ng / syslog-ng.mk
1 ################################################################################
2 #
3 # syslog-ng
4 #
5 ################################################################################
6
7 # When updating the version, please check at runtime if the version in
8 # syslog-ng.conf header needs to be updated
9 SYSLOG_NG_VERSION = 3.10.1
10 SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION)
11 SYSLOG_NG_LICENSE = LGPL-2.1+ (syslog-ng core), GPL-2.0+ (modules)
12 SYSLOG_NG_LICENSE_FILES = COPYING
13 SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
14         eventlog libglib2 openssl pcre
15 # rabbit-mq needs -lrt
16 SYSLOG_NG_CONF_ENV = LIBS=-lrt
17 SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
18         --disable-java --disable-java-modules --disable-mongodb
19
20 # We override busybox's S01logging init script
21 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
22 SYSLOG_NG_DEPENDENCIES += busybox
23 endif
24
25 ifeq ($(BR2_PACKAGE_GEOIP),y)
26 SYSLOG_NG_DEPENDENCIES += geoip
27 SYSLOG_NG_CONF_OPTS += --enable-geoip
28 else
29 SYSLOG_NG_CONF_OPTS += --disable-geoip
30 endif
31
32 ifeq ($(BR2_PACKAGE_LIBCAP),y)
33 SYSLOG_NG_DEPENDENCIES += libcap
34 SYSLOG_NG_CONF_OPTS += --enable-linux-caps
35 else
36 SYSLOG_NG_CONF_OPTS += --disable-linux-caps
37 endif
38
39 ifeq ($(BR2_PACKAGE_PYTHON),y)
40 SYSLOG_NG_DEPENDENCIES += python
41 SYSLOG_NG_CONF_OPTS += \
42         --enable-python \
43         --with-python=$(PYTHON_VERSION_MAJOR)
44 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
45 SYSLOG_NG_DEPENDENCIES += python3
46 SYSLOG_NG_CONF_OPTS += \
47         --enable-python \
48         --with-python=$(PYTHON3_VERSION_MAJOR)
49 else
50 SYSLOG_NG_CONF_OPTS += \
51         --disable-python \
52         --without-python
53 endif
54
55 ifeq ($(BR2_PACKAGE_LIBESMTP),y)
56 SYSLOG_NG_DEPENDENCIES += libesmtp
57 SYSLOG_NG_CONF_OPTS += --enable-smtp
58 SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr"
59 else
60 SYSLOG_NG_CONF_OPTS += --disable-smtp
61 endif
62
63 ifeq ($(BR2_PACKAGE_JSON_C),y)
64 SYSLOG_NG_DEPENDENCIES += json-c
65 SYSLOG_NG_CONF_OPTS += --enable-json
66 else
67 SYSLOG_NG_CONF_OPTS += --disable-json
68 endif
69
70 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
71 SYSLOG_NG_DEPENDENCIES += util-linux
72 endif
73
74 ifeq ($(BR2_PACKAGE_LIBNET),y)
75 SYSLOG_NG_DEPENDENCIES += libnet
76 SYSLOG_NG_CONF_OPTS += \
77         --with-libnet=$(STAGING_DIR)/usr/bin \
78         --enable-spoof-source
79 else
80 SYSLOG_NG_CONF_OPTS += --disable-spoof-source
81 endif
82
83 ifeq ($(BR2_PACKAGE_LIBCURL),y)
84 SYSLOG_NG_DEPENDENCIES += libcurl
85 SYSLOG_NG_CONF_OPTS += --enable-http
86 SYSLOG_NG_CONF_OPTS += --with-libcurl="$(STAGING_DIR)/usr"
87 else
88 SYSLOG_NG_CONF_OPTS += --disable-http
89 endif
90
91 ifeq ($(BR2_INIT_SYSTEMD),y)
92 SYSLOG_NG_DEPENDENCIES += systemd
93 SYSLOG_NG_CONF_OPTS += \
94         --enable-systemd \
95         --with-systemdsystemunitdir=/usr/lib/systemd/system
96 else
97 SYSLOG_NG_CONF_OPTS += --disable-systemd
98 endif
99
100 define SYSLOG_NG_INSTALL_INIT_SYSV
101         $(INSTALL) -m 0755 -D package/syslog-ng/S01logging \
102                 $(TARGET_DIR)/etc/init.d/S01logging
103 endef
104
105 # By default syslog-ng installs a number of sample configuration
106 # files. Some of these rely on optional features being
107 # enabled. Because of this buildroot uninstalls the shipped config
108 # files and provides a simplified configuration.
109 define SYSLOG_NG_FIXUP_CONFIG
110         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
111                 DESTDIR=$(TARGET_DIR) scl-uninstall-local
112         $(INSTALL) -D -m 0644 package/syslog-ng/syslog-ng.conf \
113                 $(TARGET_DIR)/etc/syslog-ng.conf
114 endef
115
116 SYSLOG_NG_POST_INSTALL_TARGET_HOOKS = SYSLOG_NG_FIXUP_CONFIG
117
118 $(eval $(autotools-package))