diff options
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb new file mode 100644 index 000000000..406dc6d70 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb @@ -0,0 +1,64 @@ +SUMMARY = "Phosphor Fan" +DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \ +control applications." +PR = "r1" + +require ${PN}.inc + +inherit autotools pkgconfig pythonnative +inherit obmc-phosphor-systemd +inherit phosphor-fan + +S = "${WORKDIR}/git" + +# Common build dependencies +DEPENDS += "autoconf-archive-native" +DEPENDS += "python-pyyaml-native" +DEPENDS += "python-mako-native" +DEPENDS += "sdbusplus" +DEPENDS += "phosphor-logging" + +# Package configuration +FAN_PACKAGES = " \ + ${PN}-presence-tach \ + ${PN}-control \ + phosphor-chassis-cooling-type \ +" +PACKAGES_remove = "${PN}" +PACKAGES += "${FAN_PACKAGES}" +PACKAGECONFIG ??= "presence control cooling-type" +SYSTEMD_PACKAGES = "${FAN_PACKAGES}" +RDEPENDS_${PN}-dev = "${FAN_PACKAGES}" +RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}" + +# -------------------------------------- +# ${PN}-presence-tach specific configuration +PACKAGECONFIG[presence] = " \ + --enable-presence \ + FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ + --disable-presence, \ + virtual/phosphor-fan-presence-config \ + , \ +" +RDEPENDS_${PN}-presence-tach += "sdbusplus" + +# Needed to install into the obmc-host-start target +TMPL = "phosphor-fan-presence-tach@.service" +INSTFMT = "phosphor-fan-presence-tach@{0}.service" +TGTFMT = "obmc-host-start@{0}.target" +FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" + +FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" +SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}" +SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" + +# -------------------------------------- +# ${PN}-control specific configuration +PACKAGECONFIG[control] = "--enable-control,--disable-control,," +FILES_${PN}-control = "${sbindir}/phosphor-fan-control" + +# -------------------------------------- +# phosphor-chassis-cooling-type specific configuration +PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev," +RDEPENDS_phosphor-chassis-cooling-type += "libevdev" +FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type" |