xref: /OK3568_Linux_fs/buildroot/package/rsyslog/rsyslog.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# rsyslog
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunRSYSLOG_VERSION = 8.2010.0
8*4882a593SmuzhiyunRSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog
9*4882a593SmuzhiyunRSYSLOG_LICENSE = GPL-3.0, LGPL-3.0, Apache-2.0
10*4882a593SmuzhiyunRSYSLOG_LICENSE_FILES = COPYING COPYING.LESSER COPYING.ASL20
11*4882a593SmuzhiyunRSYSLOG_CPE_ID_VENDOR = rsyslog
12*4882a593Smuzhiyun# rsyslog uses weak permissions for generating log files.
13*4882a593Smuzhiyun# Ignoring this CVE as Buildroot normally doesn't have local users and a build
14*4882a593Smuzhiyun# could customize the rsyslog.conf to be more restrictive ($FileCreateMode 0640)
15*4882a593SmuzhiyunRSYSLOG_IGNORE_CVES += CVE-2015-3243
16*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf
17*4882a593SmuzhiyunRSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
18*4882a593SmuzhiyunRSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
19*4882a593Smuzhiyun	mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \
20*4882a593Smuzhiyun	mail omprog omruleset omstdout omuxsock \
21*4882a593Smuzhiyun	pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare
22*4882a593Smuzhiyun
23*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBRELP),y)
24*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += librelp
25*4882a593SmuzhiyunRSYSLOG_PLUGINS += relp
26*4882a593Smuzhiyunendif
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunRSYSLOG_CONF_OPTS = --disable-generate-man-pages \
29*4882a593Smuzhiyun	$(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun# Disable items requiring libcurl
32*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-elasticsearch \
33*4882a593Smuzhiyun	--disable-clickhouse \
34*4882a593Smuzhiyun	--disable-omhttp \
35*4882a593Smuzhiyun	--disable-fmhttp \
36*4882a593Smuzhiyun	--disable-imdocker \
37*4882a593Smuzhiyun	--disable-omhttpfs \
38*4882a593Smuzhiyun	--disable-mmkubernetes
39*4882a593Smuzhiyun
40*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_CIVETWEB_LIB),y)
41*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += civetweb
42*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-imhttp
43*4882a593Smuzhiyunelse
44*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-imhttp
45*4882a593Smuzhiyunendif
46*4882a593Smuzhiyun
47*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_GNUTLS),y)
48*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += gnutls
49*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-gnutls
50*4882a593Smuzhiyunelse
51*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-gnutls
52*4882a593Smuzhiyunendif
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBEE),y)
55*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += libee
56*4882a593Smuzhiyunendif
57*4882a593Smuzhiyun
58*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
59*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += libgcrypt
60*4882a593SmuzhiyunRSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
61*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-libgcrypt
62*4882a593Smuzhiyunelse
63*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-libgcrypt
64*4882a593Smuzhiyunendif
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBPCAP),y)
67*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += libpcap
68*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-impcap
69*4882a593Smuzhiyunelse
70*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-impcap
71*4882a593Smuzhiyunendif
72*4882a593Smuzhiyun
73*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_MYSQL),y)
74*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += mysql
75*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-mysql
76*4882a593SmuzhiyunRSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config
77*4882a593Smuzhiyunelse
78*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-mysql
79*4882a593Smuzhiyunendif
80*4882a593Smuzhiyun
81*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_POSTGRESQL),y)
82*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += postgresql
83*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-pgsql
84*4882a593SmuzhiyunRSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
85*4882a593Smuzhiyunelse
86*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-pgsql
87*4882a593Smuzhiyunendif
88*4882a593Smuzhiyun
89*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
90*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += util-linux
91*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --enable-uuid
92*4882a593Smuzhiyunelse
93*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += --disable-uuid
94*4882a593Smuzhiyunendif
95*4882a593Smuzhiyun
96*4882a593Smuzhiyunifeq ($(BR2_INIT_SYSTEMD),y)
97*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += \
98*4882a593Smuzhiyun	--enable-imjournal \
99*4882a593Smuzhiyun	--enable-omjournal \
100*4882a593Smuzhiyun	--with-systemdsystemunitdir=/usr/lib/systemd/system
101*4882a593SmuzhiyunRSYSLOG_DEPENDENCIES += systemd
102*4882a593Smuzhiyunelse
103*4882a593SmuzhiyunRSYSLOG_CONF_OPTS += \
104*4882a593Smuzhiyun	--disable-imjournal \
105*4882a593Smuzhiyun	--disable-omjournal
106*4882a593Smuzhiyunendif
107*4882a593Smuzhiyun
108*4882a593Smuzhiyundefine RSYSLOG_INSTALL_INIT_SYSTEMD
109*4882a593Smuzhiyun	$(INSTALL) -m 0755 -D package/rsyslog/rsyslog.service \
110*4882a593Smuzhiyun		$(TARGET_DIR)/usr/lib/systemd/system/rsyslog.service
111*4882a593Smuzhiyunendef
112*4882a593Smuzhiyun
113*4882a593Smuzhiyundefine RSYSLOG_INSTALL_INIT_SYSV
114*4882a593Smuzhiyun	$(INSTALL) -m 0755 -D package/rsyslog/S01rsyslogd \
115*4882a593Smuzhiyun		$(TARGET_DIR)/etc/init.d/S01rsyslogd
116*4882a593Smuzhiyunendef
117*4882a593Smuzhiyun
118*4882a593Smuzhiyundefine RSYSLOG_INSTALL_CONF
119*4882a593Smuzhiyun	$(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \
120*4882a593Smuzhiyun		$(TARGET_DIR)/etc/rsyslog.conf
121*4882a593Smuzhiyun	mkdir -p $(TARGET_DIR)/etc/rsyslog.d
122*4882a593Smuzhiyunendef
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunRSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF
125*4882a593Smuzhiyun
126*4882a593Smuzhiyun$(eval $(autotools-package))
127