Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "System Log Daemons" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | DESCRIPTION = "The sysklogd package implements system log daemons: syslogd" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" |
| 4 | SECTION = "base" |
| 5 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | LICENSE = "BSD-3-Clause" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \ |
| 8 | file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | " |
| 10 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | inherit update-rc.d update-alternatives systemd autotools |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | file://sysklogd \ |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 15 | file://0001-Makefile.am-fixup-issue-17.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | S = "${WORKDIR}/git" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger" |
| 20 | |
| 21 | do_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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | SYSTEMD_PACKAGES = "${PN}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | SYSTEMD_SERVICE_${PN} = "syslogd.service" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | SYSTEMD_AUTO_ENABLE = "enable" |
| 31 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | INITSCRIPT_NAME = "syslog" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 33 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf" |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 34 | RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" |
| 37 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | ALTERNATIVE_PRIORITY = "100" |
| 39 | |
| 40 | ALTERNATIVE_${PN}-doc = "syslogd.8" |
| 41 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" |
| 42 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 43 | pkg_prerm_${PN} () { |
| 44 | if test "x$D" = "x"; then |
| 45 | if test "$1" = "upgrade" -o "$1" = "remove"; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 46 | /etc/init.d/syslog stop || : |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | fi |
| 48 | fi |
| 49 | } |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 50 | |
| 51 | python () { |
| 52 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 53 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 54 | } |