Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | SUMMARY = "Management Component Control Protocol utilities" |
| 2 | HOMEPAGE = "http://www.github.com/CodeConstruct/mctp" |
| 3 | SECTION = "net" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5 | |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" |
| 7 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8 | PV = "1.0+git${SRCPV}" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 10 | SRCREV = "ae3a9162d6c5df0fa50abc34fc951dfd0e3d23c5" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 11 | |
| 12 | SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | inherit meson pkgconfig systemd |
| 17 | |
| 18 | PACKAGECONFIG ??= " \ |
| 19 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ |
| 20 | " |
| 21 | |
| 22 | # mctpd will only be built if pkg-config detects libsystemd; in which case |
| 23 | # we'll want to declare the dep and install the service. |
| 24 | PACKAGECONFIG[systemd] = ",,systemd,libsystemd" |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 25 | SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target" |
| 26 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 27 | |
| 28 | do_install:append () { |
| 29 | if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then |
| 30 | install -d ${D}${systemd_system_unitdir} |
| 31 | install -m 0644 ${S}/conf/mctpd.service \ |
| 32 | ${D}${systemd_system_unitdir}/mctpd.service |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 33 | install -m 0644 ${S}/conf/*.target \ |
| 34 | ${D}${systemd_system_unitdir}/ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 35 | install -d ${D}${datadir}/dbus-1/system.d |
| 36 | install -m 0644 ${S}/conf/mctpd-dbus.conf \ |
| 37 | ${D}${datadir}/dbus-1/system.d/mctpd.conf |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 38 | fi |
| 39 | } |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 40 | |
| 41 | FILES:${PN} += " \ |
| 42 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ |
| 43 | '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ |
| 44 | " |