python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / rsyslog / rsyslog.mk
blob3254d9993390787c1f08143cff8bc5b1838442da
1 ################################################################################
3 # rsyslog
5 ################################################################################
7 RSYSLOG_VERSION = 8.22.0
8 RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog
9 RSYSLOG_LICENSE = GPLv3, LGPLv3, Apache-2.0
10 RSYSLOG_LICENSE_FILES = COPYING COPYING.LESSER COPYING.ASL20
11 RSYSLOG_DEPENDENCIES = zlib libestr liblogging libfastjson host-pkgconf
12 RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
13 RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
14 mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \
15 mail omprog omruleset omstdout omuxsock \
16 pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare
17 RSYSLOG_CONF_OPTS = --disable-generate-man-pages \
18 $(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
20 # Build after BusyBox
21 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
22 RSYSLOG_DEPENDENCIES += busybox
23 endif
25 ifeq ($(BR2_PACKAGE_GNUTLS),y)
26 RSYSLOG_DEPENDENCIES += gnutls
27 RSYSLOG_CONF_OPTS += --enable-gnutls
28 else
29 RSYSLOG_CONF_OPTS += --disable-gnutls
30 endif
32 ifeq ($(BR2_PACKAGE_LIBEE),y)
33 RSYSLOG_DEPENDENCIES += libee
34 endif
36 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
37 RSYSLOG_DEPENDENCIES += libgcrypt
38 RSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
39 RSYSLOG_CONF_OPTS += --enable-libgcrypt
40 else
41 RSYSLOG_CONF_OPTS += --disable-libgcrypt
42 endif
44 ifeq ($(BR2_PACKAGE_MYSQL),y)
45 RSYSLOG_DEPENDENCIES += mysql
46 RSYSLOG_CONF_OPTS += --enable-mysql
47 RSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config
48 else
49 RSYSLOG_CONF_OPTS += --disable-mysql
50 endif
52 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
53 RSYSLOG_DEPENDENCIES += postgresql
54 RSYSLOG_CONF_OPTS += --enable-pgsql
55 RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
56 else
57 RSYSLOG_CONF_OPTS += --disable-pgsql
58 endif
60 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
61 RSYSLOG_DEPENDENCIES += util-linux
62 RSYSLOG_CONF_OPTS += --enable-uuid
63 else
64 RSYSLOG_CONF_OPTS += --disable-uuid
65 endif
67 ifeq ($(BR2_INIT_SYSTEMD),y)
68 RSYSLOG_CONF_OPTS += \
69 --enable-imjournal \
70 --enable-omjournal \
71 --with-systemdsystemunitdir=/usr/lib/systemd/system
72 RSYSLOG_DEPENDENCIES += systemd
73 else
74 RSYSLOG_CONF_OPTS += \
75 --disable-imjournal \
76 --disable-omjournal
77 endif
79 define RSYSLOG_INSTALL_INIT_SYSV
80 $(INSTALL) -m 0755 -D package/rsyslog/S01logging \
81 $(TARGET_DIR)/etc/init.d/S01logging
82 endef
84 # The rsyslog.service is installed by rsyslog, but the link is not created
85 # so the service is not enabled.
86 # We need to create another link which is due to the fact that the
87 # rsyslog.service contains an Alias=
88 # If we were to use systemctl enable to enable the service, it would
89 # create both, so we mimic that.
90 define RSYSLOG_INSTALL_INIT_SYSTEMD
91 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
92 ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \
93 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service
94 ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \
95 $(TARGET_DIR)/etc/systemd/system/syslog.service
96 endef
98 define RSYSLOG_INSTALL_CONF
99 $(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \
100 $(TARGET_DIR)/etc/rsyslog.conf
101 mkdir -p $(TARGET_DIR)/etc/rsyslog.d
102 endef
104 RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF
106 $(eval $(autotools-package))