diff options
author | Michael Lippautz <michael.lippautz@gmail.com> | 2011-04-20 16:57:44 +0000 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-04-20 11:12:53 +0200 |
commit | 86738fa85f8a2e6b29863c51158a28f312bdd701 (patch) | |
tree | d4fb5f7d3bcb8f7adc7eff9bcda53f9f504ef6f9 /meta-oe/recipes-support/syslog-ng/syslog-ng.inc | |
parent | 7644a453e893c165e65cea8e3958d1a077d95fae (diff) | |
download | meta-openembedded-contrib-86738fa85f8a2e6b29863c51158a28f312bdd701.tar.gz |
syslog-ng: Update to 3.2.2
* Re-import from org.oe.dev
* Adapt EXTRA_OECONF (disable most auto-detections)
* Add LIC_FILES_CHKSUM
* Move syslog-ng dl to .inc
Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/syslog-ng.inc')
-rw-r--r-- | meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 78 |
1 files changed, 78 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 0000000000..38bcfb08ed --- /dev/null +++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc @@ -0,0 +1,78 @@ +DESCRIPTION = "Alternative system logger daemon" +DEPENDS = "libol flex eventlog glib-2.0" +LICENSE = "GPL LGPL" +LIC_FILES_CHKSUM = "file://COPYING;md5=7ec1bcc46f28b11f4722e20d9b7dd4d5" + +# syslog initscript is handled explicitly because order of +# update-rc.d and update-alternatives is important +RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" + +INC_PR = "r5" + +inherit autotools + +SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${PN}_${PV}.tar.gz" + +noipv6 = "${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}" + +EXTRA_OECONF = " \ + --with-libnet=${STAGING_BINDIR_CROSS} \ + --enable-dynamic-linking \ + ${noipv6} \ + --enable-ssl \ + --disable-sub-streams \ + --disable-pacct \ + --disable-linux-caps \ + --disable-pcre \ + --disable-sql \ +" + +do_configure_prepend() { + eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "s/-D_LARGEFILE_SOURCE//" -e "s/-D_FILE_OFFSET_BITS=64//" ${S}/configure.in', d)}" +} + +do_install_append() { + install -d ${D}/${sysconfdir}/${PN} + install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${PN}.conf + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN} +} + +CONFFILES_${PN} = "${sysconfdir}/${PN}.conf" + +pkg_postinst_${PN} () { + update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 200 + + if test "x$D" != "x"; then + OPT="-r $D" + else + OPT="-s" + fi + # remove all rc.d-links potentially created from alternative + # syslog packages before creating new ones + update-rc.d $OPT -f syslog remove + update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 . +} + +pkg_prerm_${PN} () { + if test "x$D" = "x"; then + if test "$1" = "upgrade" -o "$1" = "remove"; then + /etc/init.d/syslog stop + fi + fi + + update-alternatives --remove syslog-init syslog.${PN} +} + +pkg_postrm_${PN} () { + if test "x$D" != "x"; then + OPT="-r $D" + else + OPT="" + fi + if test "$1" = "remove" -o "$1" = "purge"; then + if ! test -e "/etc/init.d/syslog"; then + update-rc.d $OPT syslog remove + fi + fi +} |