blob: eca531d05d2fbcd80c0132ddc90a1ac84f0c4f81 [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 "
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060016
William A. Kennington IIIac69b482021-06-02 12:28:27 -070017SRCREV = "17b68ca89ab814bb623b615c4e7088d619ed8829"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060018
Brad Bishop19323692019-04-05 15:28:33 -040019S = "${WORKDIR}/git"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
Andrew Geissler82c905d2020-04-13 13:39:40 -050021EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger"
22
Patrick Williams213cb262021-08-07 19:21:33 -050023do_install:append () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050024 install -d ${D}${sysconfdir}
25 install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
26 install -d ${D}${sysconfdir}/init.d
27 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
28}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030SYSTEMD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050031SYSTEMD_SERVICE:${PN} = "syslogd.service"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050032SYSTEMD_AUTO_ENABLE = "enable"
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034INITSCRIPT_NAME = "syslog"
Patrick Williams213cb262021-08-07 19:21:33 -050035CONFFILES:${PN} = "${sysconfdir}/syslog.conf"
36RCONFLICTS:${PN} = "rsyslog busybox-syslog syslog-ng"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050039
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040ALTERNATIVE_PRIORITY = "100"
41
Patrick Williams213cb262021-08-07 19:21:33 -050042ALTERNATIVE:${PN}-doc = "syslogd.8"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
44
Patrick Williams213cb262021-08-07 19:21:33 -050045pkg_prerm:${PN} () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 if test "x$D" = "x"; then
47 if test "$1" = "upgrade" -o "$1" = "remove"; then
Patrick Williamsc0f7c042017-02-23 20:41:17 -060048 /etc/init.d/syslog stop || :
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 fi
50 fi
51}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050052
53python () {
54 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
55 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
56}