blob: bcf8aa7a9653dab77520b4befe7c5822c56b5f3c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "System Log Daemons"
2DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd"
3HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
4SECTION = "base"
5
6LICENSE = "GPLv2+ & BSD"
7LICENSE_syslogd = "BSD"
8LICENSE_klogd = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
10 file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
12 "
13
14inherit update-rc.d update-alternatives
15
16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
17 file://no-strip-install.patch \
18 file://sysklogd \
19 file://syslog.conf \
20 "
21
22SRC_URI_append_e500v2 = " file://no-vectorization.patch"
23
24INITSCRIPT_NAME = "syslog"
25CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
26
27CFLAGS_append = " -DSYSV"
28
29do_install () {
30 install -d ${D}${mandir}/man8 \
31 ${D}${mandir}/man5 \
32 ${D}${base_sbindir}
33 oe_runmake 'BINDIR=${D}${base_sbindir}' \
34 'MANDIR=${D}${mandir}' install
35 install -d ${D}${sysconfdir}
36 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
37 install -d ${D}${sysconfdir}/init.d
38 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
39}
40
41# sysklogd package has no internal systemd support, so we weigh busybox's
42# sysklogd utility over it in case of systemd
43ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
44
45ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
46
47ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
48ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
49ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
50ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
51
52pkg_prerm_${PN} () {
53 if test "x$D" = "x"; then
54 if test "$1" = "upgrade" -o "$1" = "remove"; then
55 /etc/init.d/syslog stop
56 fi
57 fi
58}