package/aubio: add libsndfile optional dependency
[buildroot-gz.git] / package / rsyslog / rsyslog.mk
bloba0875b7447be48e8142dd814e4c32fa1da0bf237
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-systemd \
70 --with-systemdsystemunitdir=/usr/lib/systemd/system
71 RSYSLOG_DEPENDENCIES += systemd
72 else
73 RSYSLOG_CONF_OPTS += --disable-systemd
74 endif
76 define RSYSLOG_INSTALL_INIT_SYSV
77 $(INSTALL) -m 0755 -D package/rsyslog/S01logging \
78 $(TARGET_DIR)/etc/init.d/S01logging
79 endef
81 # The rsyslog.service is installed by rsyslog, but the link is not created
82 # so the service is not enabled.
83 # We need to create another link which is due to the fact that the
84 # rsyslog.service contains an Alias=
85 # If we were to use systemctl enable to enable the service, it would
86 # create both, so we mimic that.
87 define RSYSLOG_INSTALL_INIT_SYSTEMD
88 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
89 ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \
90 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service
91 ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \
92 $(TARGET_DIR)/etc/systemd/system/syslog.service
93 endef
95 define RSYSLOG_INSTALL_CONF
96 $(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \
97 $(TARGET_DIR)/etc/rsyslog.conf
98 mkdir -p $(TARGET_DIR)/etc/rsyslog.d
99 endef
101 RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF
103 $(eval $(autotools-package))