Brad Bishop | 2c5ba17 | 2017-04-22 16:26:22 -0400 | [diff] [blame] | 1 | SUMMARY = "Phosphor Fan" |
| 2 | DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \ |
| 3 | control applications." |
| 4 | PR = "r1" |
| 5 | |
| 6 | require ${PN}.inc |
| 7 | |
| 8 | inherit autotools pkgconfig pythonnative |
| 9 | inherit obmc-phosphor-systemd |
| 10 | inherit phosphor-fan |
| 11 | |
| 12 | S = "${WORKDIR}/git" |
| 13 | |
| 14 | # Common build dependencies |
| 15 | DEPENDS += "autoconf-archive-native" |
| 16 | DEPENDS += "python-pyyaml-native" |
| 17 | DEPENDS += "python-mako-native" |
| 18 | DEPENDS += "sdbusplus" |
| 19 | DEPENDS += "phosphor-logging" |
| 20 | |
| 21 | # Package configuration |
| 22 | FAN_PACKAGES = " \ |
| 23 | ${PN}-presence-tach \ |
| 24 | ${PN}-control \ |
| 25 | phosphor-chassis-cooling-type \ |
| 26 | " |
| 27 | PACKAGES_remove = "${PN}" |
| 28 | PACKAGES += "${FAN_PACKAGES}" |
| 29 | PACKAGECONFIG ??= "presence control cooling-type" |
| 30 | SYSTEMD_PACKAGES = "${FAN_PACKAGES}" |
| 31 | RDEPENDS_${PN}-dev = "${FAN_PACKAGES}" |
| 32 | RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}" |
| 33 | |
| 34 | # -------------------------------------- |
| 35 | # ${PN}-presence-tach specific configuration |
| 36 | PACKAGECONFIG[presence] = " \ |
| 37 | --enable-presence \ |
| 38 | FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \ |
| 39 | --disable-presence, \ |
| 40 | virtual/phosphor-fan-presence-config \ |
| 41 | , \ |
| 42 | " |
| 43 | RDEPENDS_${PN}-presence-tach += "sdbusplus" |
| 44 | |
| 45 | # Needed to install into the obmc-host-start target |
| 46 | TMPL = "phosphor-fan-presence-tach@.service" |
| 47 | INSTFMT = "phosphor-fan-presence-tach@{0}.service" |
| 48 | TGTFMT = "obmc-host-start@{0}.target" |
| 49 | FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" |
| 50 | |
| 51 | FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach" |
| 52 | SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}" |
| 53 | SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" |
| 54 | |
| 55 | # -------------------------------------- |
| 56 | # ${PN}-control specific configuration |
| 57 | PACKAGECONFIG[control] = "--enable-control,--disable-control,," |
| 58 | FILES_${PN}-control = "${sbindir}/phosphor-fan-control" |
| 59 | |
| 60 | # -------------------------------------- |
| 61 | # phosphor-chassis-cooling-type specific configuration |
| 62 | PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev," |
| 63 | RDEPENDS_phosphor-chassis-cooling-type += "libevdev" |
| 64 | FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type" |