blob: 9e97a6a60aa3adbbc40374dce95c26310f0062bf [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
Andrew Geissler595f6302022-01-24 19:11:47 +00008PV = "1.0+git${SRCPV}"
Andrew Geisslereff27472021-10-29 15:35:00 -05009
Andrew Geissler87f5cff2022-09-30 13:13:31 -050010SRCREV = "ae3a9162d6c5df0fa50abc34fc951dfd0e3d23c5"
Andrew Geissler595f6302022-01-24 19:11:47 +000011
12SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https"
Andrew Geisslereff27472021-10-29 15:35:00 -050013
14S = "${WORKDIR}/git"
15
16inherit meson pkgconfig systemd
17
18PACKAGECONFIG ??= " \
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.
24PACKAGECONFIG[systemd] = ",,systemd,libsystemd"
Patrick Williams2194f502022-10-16 14:26:09 -050025SYSTEMD_SERVICE:${PN} = "mctpd.service mctp.target mctp-local.target"
26SYSTEMD_AUTO_ENABLE_${PN} = "enable"
Andrew Geisslereff27472021-10-29 15:35:00 -050027
28do_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 Williams2194f502022-10-16 14:26:09 -050033 install -m 0644 ${S}/conf/*.target \
34 ${D}${systemd_system_unitdir}/
Andrew Geissler595f6302022-01-24 19:11:47 +000035 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 Geisslereff27472021-10-29 15:35:00 -050038 fi
39}
Andrew Geissler595f6302022-01-24 19:11:47 +000040
41FILES:${PN} += " \
42 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \
43 '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \
44"