blob: f151dd87f783f1656b73c5e2455f59209dec0461 [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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014inherit update-rc.d update-alternatives systemd
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
17 file://no-strip-install.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018 file://0001-Fix-build-with-musl.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019 file://0001-fix-problems-that-causes-a-segmentation-fault-under-.patch \
20 file://0002-Make-way-for-respecting-flags-from-environment.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 file://sysklogd \
22 file://syslog.conf \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023 file://syslogd.service \
24 file://klogd.service \
25 file://tmpfiles.sysklogd.conf \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 "
27
28SRC_URI_append_e500v2 = " file://no-vectorization.patch"
29
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030SYSTEMD_PACKAGES = "${PN}"
31SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service"
32SYSTEMD_AUTO_ENABLE = "enable"
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034INITSCRIPT_NAME = "syslog"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
Brad Bishopd5ae7d92018-06-14 09:52:03 -070036RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038CFLAGS += "-DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
40do_install () {
41 install -d ${D}${mandir}/man8 \
42 ${D}${mandir}/man5 \
43 ${D}${base_sbindir}
44 oe_runmake 'BINDIR=${D}${base_sbindir}' \
45 'MANDIR=${D}${mandir}' install
46 install -d ${D}${sysconfdir}
47 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
48 install -d ${D}${sysconfdir}/init.d
49 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
Brad Bishop6e60e8b2018-02-01 10:27:11 -050050 install -d ${D}${systemd_unitdir}/system
51 install -m 644 ${WORKDIR}/syslogd.service ${D}${systemd_unitdir}/system
52 install -m 644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
53 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
54 install -d ${D}${exec_prefix}/lib/tmpfiles.d
55 install -m 644 ${WORKDIR}/tmpfiles.sysklogd.conf ${D}${exec_prefix}/lib/tmpfiles.d/sysklogd.conf
56 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057}
58
Brad Bishop6e60e8b2018-02-01 10:27:11 -050059FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
60
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080061ALTERNATIVE_PRIORITY = "100"
62
63ALTERNATIVE_${PN}-doc = "syslogd.8"
64ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
65
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066pkg_prerm_${PN} () {
67 if test "x$D" = "x"; then
68 if test "$1" = "upgrade" -o "$1" = "remove"; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060069 /etc/init.d/syslog stop || :
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070 fi
71 fi
72}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050073
74python () {
75 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
76 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
77}