blob: bf3961be4280dea81d2640fa656f0396852e8c0a [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001SUMMARY = "Management Component Control Protocol utilities"
2HOMEPAGE = "http://www.github.com/CodeConstruct/mctp"
3SECTION = "net"
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only"
Andrew Geisslereff27472021-10-29 15:35:00 -05005
6LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21"
7
Patrick Williams8e7b46e2023-05-01 14:19:06 -05008SRCREV = "a591ad885aa28f113cb45870b2fd5bce48378d6f"
Andrew Geissler595f6302022-01-24 19:11:47 +00009
10SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https"
Andrew Geisslereff27472021-10-29 15:35:00 -050011
12S = "${WORKDIR}/git"
13
14inherit meson pkgconfig systemd
15
16PACKAGECONFIG ??= " \
17 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
18"
19
20# mctpd will only be built if pkg-config detects libsystemd; in which case
21# we'll want to declare the dep and install the service.
22PACKAGECONFIG[systemd] = ",,systemd,libsystemd"
Patrick Williams2194f502022-10-16 14:26:09 -050023SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target"
Patrick Williams864cc432023-02-09 14:54:44 -060024SYSTEMD_AUTO_ENABLE:${PN} = "enable"
Andrew Geisslereff27472021-10-29 15:35:00 -050025
26do_install:append () {
27 if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
28 install -d ${D}${systemd_system_unitdir}
29 install -m 0644 ${S}/conf/mctpd.service \
30 ${D}${systemd_system_unitdir}/mctpd.service
Patrick Williams2194f502022-10-16 14:26:09 -050031 install -m 0644 ${S}/conf/*.target \
32 ${D}${systemd_system_unitdir}/
Andrew Geissler595f6302022-01-24 19:11:47 +000033 install -d ${D}${datadir}/dbus-1/system.d
34 install -m 0644 ${S}/conf/mctpd-dbus.conf \
35 ${D}${datadir}/dbus-1/system.d/mctpd.conf
Andrew Geisslereff27472021-10-29 15:35:00 -050036 fi
37}
Andrew Geissler595f6302022-01-24 19:11:47 +000038
39FILES:${PN} += " \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \
41 '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \
42"