summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/syslog-ng/syslog-ng.inc
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/syslog-ng.inc')
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng.inc106
1 files changed, 106 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
new file mode 100644
index 000000000..984af439a
--- /dev/null
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -0,0 +1,106 @@
1SUMMARY = "Alternative system logger daemon"
2DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \
3but with new functionality for the new generation. The original syslogd \
4allows messages only to be sorted based on priority/facility pairs; \
5syslog-ng adds the possibility to filter based on message contents using \
6regular expressions. The new configuration scheme is intuitive and powerful. \
7Forwarding logs over TCP and remembering all forwarding hops makes it \
8ideal for firewalled environments. \
9"
10HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system"
11
12LICENSE = "GPLv2 & LGPLv2.1"
13LIC_FILES_CHKSUM = "file://COPYING;md5=e0e8658d9be248f01b7933df24dc1408"
14
15DEPENDS = "flex eventlog glib-2.0"
16
17SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${BPN}_${PV}.tar.gz \
18 file://syslog-ng.conf \
19 file://initscript \
20 file://volatiles.03_syslog-ng \
21 file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
22"
23
24inherit autotools systemd pkgconfig update-rc.d update-alternatives
25
26EXTRA_OECONF = " \
27 --enable-dynamic-linking \
28 --disable-sub-streams \
29 --disable-pacct \
30 --localstatedir=${localstatedir}/run/${BPN} \
31 --sysconfdir=${sysconfdir}/${BPN} \
32 --with-module-dir=${libdir}/${BPN} \
33 --with-sysroot=${STAGING_DIR_HOST} \
34 --with-libmongo-client=no --disable-mongodb \
35 --with-librabbitmq-client=no \
36 ${CONFIG_TLS} \
37"
38
39CONFIG_TLS = "--enable-thread-tls"
40CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
41
42PACKAGECONFIG ??= "openssl \
43 ${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
44 ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
45"
46PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl,openssl,"
47PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,,"
48PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd,"
49PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap,"
50PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre,"
51PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi,"
52PACKAGECONFIG[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,libnet,"
53PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp,"
54PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c,"
55PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers,"
56
57do_configure_prepend() {
58 eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "s/-D_LARGEFILE_SOURCE//" -e "s/-D_FILE_OFFSET_BITS=64//" ${S}/configure.in', d)}"
59}
60
61do_install_append() {
62 install -d ${D}/${sysconfdir}/${BPN}
63 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
64 install -d ${D}/${sysconfdir}/init.d
65 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${BPN}
66 install -d ${D}/${sysconfdir}/default/volatiles/
67 install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng
68
69 # Remove /var/run as it is created on startup
70 rm -rf ${D}${localstatedir}/run
71}
72
73FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
74RDEPENDS_${PN} += "gawk"
75
76# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error
77PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${PN}-libs-dbg"
78FILES_${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*"
79FILES_${PN}-libs-dev = "${libdir}/${BPN}/lib*.la"
80FILES_${PN}-libs-dbg = "${libdir}/${BPN}/.debug"
81INSANE_SKIP_${PN}-libs = "dev-so"
82RDEPENDS_${PN} += "${PN}-libs"
83
84CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
85
86# syslog initscript is handled explicitly because order of
87# update-rc.d and update-alternatives is important
88RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
89
90RPROVIDES_${PN} += "${PN}-systemd"
91RREPLACES_${PN} += "${PN}-systemd"
92RCONFLICTS_${PN} += "${PN}-systemd"
93SYSTEMD_SERVICE_${PN} = "${BPN}.service"
94
95# no syslog-init for systemd
96python () {
97 if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split():
98 pn = d.getVar('PN', True)
99 sysconfdir = d.getVar('sysconfdir', True)
100 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
101 d.setVarFlag('ALTERNATIVE_PRIORITY', 'syslog-init', '200')
102 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
103}
104
105INITSCRIPT_NAME = "syslog"
106INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."