Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "System Log Daemons" |
| 2 | DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" |
| 3 | HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" |
| 4 | SECTION = "base" |
| 5 | |
| 6 | LICENSE = "GPLv2+ & BSD" |
| 7 | LICENSE_syslogd = "BSD" |
| 8 | LICENSE_klogd = "GPLv2+" |
| 9 | LIC_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | inherit update-rc.d update-alternatives systemd |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | file://no-strip-install.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 18 | file://0001-Fix-build-with-musl.patch \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | file://0001-fix-problems-that-causes-a-segmentation-fault-under-.patch \ |
| 20 | file://0002-Make-way-for-respecting-flags-from-environment.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | file://sysklogd \ |
| 22 | file://syslog.conf \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 23 | file://syslogd.service \ |
| 24 | file://klogd.service \ |
| 25 | file://tmpfiles.sysklogd.conf \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | S = "${WORKDIR}/git" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | |
| 29 | SRC_URI_append_e500v2 = " file://no-vectorization.patch" |
| 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | SYSTEMD_PACKAGES = "${PN}" |
| 32 | SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service" |
| 33 | SYSTEMD_AUTO_ENABLE = "enable" |
| 34 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | INITSCRIPT_NAME = "syslog" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 36 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf" |
Brad Bishop | d5ae7d9 | 2018-06-14 09:52:03 -0700 | [diff] [blame] | 37 | RCONFLICTS_${PN} = "rsyslog busybox-syslog syslog-ng" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | CFLAGS += "-DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | |
| 41 | do_install () { |
| 42 | install -d ${D}${mandir}/man8 \ |
| 43 | ${D}${mandir}/man5 \ |
| 44 | ${D}${base_sbindir} |
| 45 | oe_runmake 'BINDIR=${D}${base_sbindir}' \ |
| 46 | 'MANDIR=${D}${mandir}' install |
| 47 | install -d ${D}${sysconfdir} |
| 48 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf |
| 49 | install -d ${D}${sysconfdir}/init.d |
| 50 | install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 51 | install -d ${D}${systemd_unitdir}/system |
| 52 | install -m 644 ${WORKDIR}/syslogd.service ${D}${systemd_unitdir}/system |
| 53 | install -m 644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system |
| 54 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then |
| 55 | install -d ${D}${exec_prefix}/lib/tmpfiles.d |
| 56 | install -m 644 ${WORKDIR}/tmpfiles.sysklogd.conf ${D}${exec_prefix}/lib/tmpfiles.d/sysklogd.conf |
| 57 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 60 | FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" |
| 61 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 62 | ALTERNATIVE_PRIORITY = "100" |
| 63 | |
| 64 | ALTERNATIVE_${PN}-doc = "syslogd.8" |
| 65 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" |
| 66 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 67 | pkg_prerm_${PN} () { |
| 68 | if test "x$D" = "x"; then |
| 69 | if test "$1" = "upgrade" -o "$1" = "remove"; then |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 70 | /etc/init.d/syslog stop || : |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 71 | fi |
| 72 | fi |
| 73 | } |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 74 | |
| 75 | python () { |
| 76 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 77 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
| 78 | } |