| SUMMARY = "mctp Controller Init Service" | 
 | DESCRIPTION = "Provides a service that initiates mctp controller for PE i2c buses" | 
 | PR = "r1" | 
 | LICENSE = "Apache-2.0" | 
 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" | 
 |  | 
 | S = "${WORKDIR}/mctp-cntlr-init" | 
 |  | 
 | inherit systemd | 
 |  | 
 | SRC_URI =  " \ | 
 |     file://mctp-controller-init.sh \ | 
 |     file://mctp-controller-init.service \ | 
 | " | 
 |  | 
 | DEPENDS += "systemd" | 
 | RDEPENDS:${PN} += " \ | 
 |     bash \ | 
 |     mctp \ | 
 | " | 
 | FILES:${PN} += "${datadir}/mctp" | 
 |  | 
 | # For listing all PE i2c bus number. | 
 | GBMC_MCTP_I2C_BUSES ?= "" | 
 |  | 
 | do_install() { | 
 |     if [ -z '${GBMC_MCTP_I2C_BUSES}' ]; then | 
 |         echo 'Missing GBMC_MCTP_I2C_BUSES' >&2 | 
 |         exit 1 | 
 |     fi | 
 |  | 
 |     install -d ${D}${datadir}/mctp | 
 |     echo 'bus="${GBMC_MCTP_I2C_BUSES}"' >${D}${datadir}/mctp/i2c-bus-config.sh | 
 |  | 
 |     install -d ${D}${bindir} | 
 |     install -m 0755 ${WORKDIR}/mctp-controller-init.sh ${D}${bindir}/ | 
 |  | 
 |     install -d ${D}${systemd_system_unitdir} | 
 |     install -m 0644 ${WORKDIR}/mctp-controller-init.service ${D}${systemd_system_unitdir}/ | 
 | } | 
 |  | 
 | SYSTEMD_PACKAGES = "${PN}" | 
 |  | 
 | SYSTEMD_SERVICE:${PN} = " mctp-controller-init.service" |