dri2proto: upgrade from 2.3 to 2.4
[openembedded.git] / recipes / rsyslog / rsyslog.inc
blobab788658821d479e50aca6d83c41cd00fb2dabe5
1 DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
2 DEPENDS = "zlib"
3 HOMEPAGE = "http://www.rsyslog.com/"
4 LICENSE = "GPLv3"
5 INC_PR = "r2"
7 SRC_URI = "http://www.rsyslog.com/files/download/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         # remove all rc.d-links potentially created from alternative
35         # syslog packages before creating new ones
36         update-rc.d $OPT -f syslog remove
37         update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 .
40 pkg_prerm_${PN} () {
41         if test "x$D" = "x"; then
42                 if test "$1" = "upgrade" -o "$1" = "remove"; then
43                         /etc/init.d/syslog stop
44                 fi
45         fi
47         update-alternatives --remove syslog-init syslog.${PN}
50 pkg_postrm_${PN} () {
51         if test "x$D" != "x"; then
52                 OPT="-r $D"
53         else
54                 OPT=""
55         fi
56         if test "$1" = "remove" -o "$1" = "purge"; then
57                 if ! test -e "/etc/init.d/syslog"; then
58                         update-rc.d $OPT syslog remove
59                 fi
60         fi
63 CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
64 FILES_${PN} += "${base_libdir}/systemd"
66 INITSCRIPT_NAME = "syslog"