blob: 8899daa1b0a381384fdba7a5b43c66a135fbeb19 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "System Log Daemons"
Andrew Geissler82c905d2020-04-13 13:39:40 -05002DESCRIPTION = "The sysklogd package implements system log daemons: syslogd"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
4SECTION = "base"
5
Andrew Geissler82c905d2020-04-13 13:39:40 -05006LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \
8 file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009 "
10
Andrew Geissler82c905d2020-04-13 13:39:40 -050011inherit update-rc.d update-alternatives systemd autotools
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Brad Bishop19323692019-04-05 15:28:33 -040013SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014 file://sysklogd \
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 file://0001-fix-one-rarely-reproduced-parallel-build-problem.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 "
Brad Bishop19323692019-04-05 15:28:33 -040017S = "${WORKDIR}/git"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Andrew Geissler82c905d2020-04-13 13:39:40 -050019EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger"
20
21do_install_append () {
22 install -d ${D}${sysconfdir}
23 install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
24 install -d ${D}${sysconfdir}/init.d
25 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
26}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028SYSTEMD_PACKAGES = "${PN}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050029SYSTEMD_SERVICE_${PN} = "syslogd.service"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030SYSTEMD_AUTO_ENABLE = "enable"
31
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032INITSCRIPT_NAME = "syslog"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
Brad Bishopd5ae7d92018-06-14 09:52:03 -070034RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
37
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038ALTERNATIVE_PRIORITY = "100"
39
40ALTERNATIVE_${PN}-doc = "syslogd.8"
41ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
42
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043pkg_prerm_${PN} () {
44 if test "x$D" = "x"; then
45 if test "$1" = "upgrade" -o "$1" = "remove"; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046 /etc/init.d/syslog stop || :
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047 fi
48 fi
49}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050050
51python () {
52 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
53 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
54}