xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Management Component Control Protocol utilities"
2HOMEPAGE = "http://www.github.com/CodeConstruct/mctp"
3SECTION = "net"
4LICENSE = "GPL-2.0-only"
5
6LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21"
7
8PV = "1.0+git${SRCPV}"
9
10SRCREV = "669740432af525c19a6a41cec777406fbbc24836"
11
12SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https"
13
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"
25SYSTEMD_SERVICE:${PN} = "mctpd.service"
26
27do_install:append () {
28    if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
29        install -d ${D}${systemd_system_unitdir}
30        install -m 0644 ${S}/conf/mctpd.service \
31                ${D}${systemd_system_unitdir}/mctpd.service
32        install -d ${D}${datadir}/dbus-1/system.d
33        install -m 0644 ${S}/conf/mctpd-dbus.conf \
34                ${D}${datadir}/dbus-1/system.d/mctpd.conf
35    fi
36}
37
38FILES:${PN} += " \
39    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \
40            '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \
41"
42