libattr: remove libattr because it is clashing with udev/attr and is not used by...
[openembedded.git] / recipes / rsyslog / rsyslog.inc
blobd94ab34d3b809fa8db826b5404d923c62195214e
1 DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
2 DEPENDS = "zlib"
3 HOMEPAGE = "http://www.rsyslog.com/"
4 LICENSE = "GPLv3"
5 INC_PR = "r1"
7 SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
8           file://rsyslog.conf \
9           file://initscript"
12 inherit autotools
14 do_install_append() {
15         install -d ${D}/${sysconfdir}/${PN}
16         install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
17         install -d ${D}/${sysconfdir}/init.d
18         install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
21 # syslog initscript is handled explicitly because order of
22 # update-rc.d and update-alternatives is important
23 DEPENDS_append = " update-rc.d update-rc.d-native"
24 RDEPENDS_${PN}_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
26 pkg_postinst_${PN} () {
27         update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
29         if test "x$D" != "x"; then
30                 OPT="-r $D"
31         else
32                 OPT="-s"
33         fi
34         update-rc.d $OPT syslog defaults
37 pkg_prerm_${PN} () {
38         if test "x$D" = "x"; then
39                 if test "$1" = "upgrade" -o "$1" = "remove"; then
40                         /etc/init.d/syslog stop
41                 fi
42         fi
44         update-alternatives --remove syslog-init syslog.${PN}
47 pkg_postrm_${PN} () {
48         if test "x$D" != "x"; then
49                 OPT="-r $D"
50         else
51                 OPT=""
52         fi
53         if test "$1" = "remove" -o "$1" = "purge"; then
54                 if ! test -e "/etc/init.d/syslog"; then
55                         update-rc.d $OPT syslog remove
56                 fi
57         fi
60 CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
62 INITSCRIPT_NAME = "syslog"