diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/syslog-ng/syslog-ng.inc | |
download | meta-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.inc | 106 |
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 @@ | |||
1 | SUMMARY = "Alternative system logger daemon" | ||
2 | DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ | ||
3 | but with new functionality for the new generation. The original syslogd \ | ||
4 | allows messages only to be sorted based on priority/facility pairs; \ | ||
5 | syslog-ng adds the possibility to filter based on message contents using \ | ||
6 | regular expressions. The new configuration scheme is intuitive and powerful. \ | ||
7 | Forwarding logs over TCP and remembering all forwarding hops makes it \ | ||
8 | ideal for firewalled environments. \ | ||
9 | " | ||
10 | HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" | ||
11 | |||
12 | LICENSE = "GPLv2 & LGPLv2.1" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=e0e8658d9be248f01b7933df24dc1408" | ||
14 | |||
15 | DEPENDS = "flex eventlog glib-2.0" | ||
16 | |||
17 | SRC_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 | |||
24 | inherit autotools systemd pkgconfig update-rc.d update-alternatives | ||
25 | |||
26 | EXTRA_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 | |||
39 | CONFIG_TLS = "--enable-thread-tls" | ||
40 | CONFIG_TLS_arm = "${@base_conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}" | ||
41 | |||
42 | PACKAGECONFIG ??= "openssl \ | ||
43 | ${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ | ||
44 | ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | ||
45 | " | ||
46 | PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl,openssl," | ||
47 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," | ||
48 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," | ||
49 | PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," | ||
50 | PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre," | ||
51 | PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," | ||
52 | PACKAGECONFIG[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,libnet," | ||
53 | PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," | ||
54 | PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," | ||
55 | PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," | ||
56 | |||
57 | do_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 | |||
61 | do_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 | |||
73 | FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools" | ||
74 | RDEPENDS_${PN} += "gawk" | ||
75 | |||
76 | # This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error | ||
77 | PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${PN}-libs-dbg" | ||
78 | FILES_${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" | ||
79 | FILES_${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" | ||
80 | FILES_${PN}-libs-dbg = "${libdir}/${BPN}/.debug" | ||
81 | INSANE_SKIP_${PN}-libs = "dev-so" | ||
82 | RDEPENDS_${PN} += "${PN}-libs" | ||
83 | |||
84 | CONFFILES_${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 | ||
88 | RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" | ||
89 | |||
90 | RPROVIDES_${PN} += "${PN}-systemd" | ||
91 | RREPLACES_${PN} += "${PN}-systemd" | ||
92 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
93 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
94 | |||
95 | # no syslog-init for systemd | ||
96 | python () { | ||
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 | |||
105 | INITSCRIPT_NAME = "syslog" | ||
106 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." | ||