Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "System Log Daemons" |
| 2 | DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" |
| 3 | HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" |
| 4 | SECTION = "base" |
| 5 | |
| 6 | LICENSE = "GPLv2+ & BSD" |
| 7 | LICENSE_syslogd = "BSD" |
| 8 | LICENSE_klogd = "GPLv2+" |
| 9 | LIC_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 | |
| 14 | inherit update-rc.d update-alternatives |
| 15 | |
| 16 | SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ |
| 17 | file://no-strip-install.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 18 | file://0001-Fix-build-with-musl.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | file://sysklogd \ |
| 20 | file://syslog.conf \ |
| 21 | " |
| 22 | |
| 23 | SRC_URI_append_e500v2 = " file://no-vectorization.patch" |
| 24 | |
| 25 | INITSCRIPT_NAME = "syslog" |
| 26 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" |
| 27 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | EXTRA_OEMAKE = "-e MAKEFLAGS=" |
| 29 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | CFLAGS_append = " -DSYSV" |
| 31 | |
| 32 | do_install () { |
| 33 | install -d ${D}${mandir}/man8 \ |
| 34 | ${D}${mandir}/man5 \ |
| 35 | ${D}${base_sbindir} |
| 36 | oe_runmake 'BINDIR=${D}${base_sbindir}' \ |
| 37 | 'MANDIR=${D}${mandir}' install |
| 38 | install -d ${D}${sysconfdir} |
| 39 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf |
| 40 | install -d ${D}${sysconfdir}/init.d |
| 41 | install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog |
| 42 | } |
| 43 | |
| 44 | # sysklogd package has no internal systemd support, so we weigh busybox's |
| 45 | # sysklogd utility over it in case of systemd |
| 46 | ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" |
| 47 | |
| 48 | ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" |
| 49 | |
| 50 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" |
| 51 | ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" |
| 52 | ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" |
| 53 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" |
| 54 | |
| 55 | pkg_prerm_${PN} () { |
| 56 | if test "x$D" = "x"; then |
| 57 | if test "$1" = "upgrade" -o "$1" = "remove"; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 58 | /etc/init.d/syslog stop || : |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | fi |
| 60 | fi |
| 61 | } |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 62 | |
| 63 | python () { |
| 64 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 65 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 66 | } |