blob: 2e3d9831b1c154c0f3452c1d4cdcee4986d6f36e [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 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 "
Brad Bishop19323692019-04-05 15:28:33 -040016S = "${WORKDIR}/git"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017
Andrew Geissler82c905d2020-04-13 13:39:40 -050018EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger"
19
20do_install_append () {
21 install -d ${D}${sysconfdir}
22 install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
23 install -d ${D}${sysconfdir}/init.d
24 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
25}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027SYSTEMD_PACKAGES = "${PN}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050028SYSTEMD_SERVICE_${PN} = "syslogd.service"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029SYSTEMD_AUTO_ENABLE = "enable"
30
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031INITSCRIPT_NAME = "syslog"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
Brad Bishopd5ae7d92018-06-14 09:52:03 -070033RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
36
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037ALTERNATIVE_PRIORITY = "100"
38
39ALTERNATIVE_${PN}-doc = "syslogd.8"
40ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
41
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042pkg_prerm_${PN} () {
43 if test "x$D" = "x"; then
44 if test "$1" = "upgrade" -o "$1" = "remove"; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045 /etc/init.d/syslog stop || :
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 fi
47 fi
48}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049
50python () {
51 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
52 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
53}