blob: 19eb4db0a2df5b54705b07a1e68f4a89c3be0835 [file] [log] [blame]
Brad Bishop2c5ba172017-04-22 16:26:22 -04001SUMMARY = "Phosphor Fan"
2DESCRIPTION = "Phosphor fan provides a set of fan monitoring and \
3control applications."
4PR = "r1"
5
6require ${PN}.inc
7
8inherit autotools pkgconfig pythonnative
9inherit obmc-phosphor-systemd
10inherit phosphor-fan
11
12S = "${WORKDIR}/git"
13
14# Common build dependencies
15DEPENDS += "autoconf-archive-native"
16DEPENDS += "python-pyyaml-native"
17DEPENDS += "python-mako-native"
18DEPENDS += "sdbusplus"
19DEPENDS += "phosphor-logging"
20
21# Package configuration
22FAN_PACKAGES = " \
23 ${PN}-presence-tach \
24 ${PN}-control \
Matt Spinler39652c82017-05-01 14:29:20 -050025 ${PN}-monitor \
Brad Bishop2c5ba172017-04-22 16:26:22 -040026 phosphor-chassis-cooling-type \
27"
28PACKAGES_remove = "${PN}"
29PACKAGES += "${FAN_PACKAGES}"
Matt Spinler39652c82017-05-01 14:29:20 -050030PACKAGECONFIG ??= "presence control cooling-type monitor"
Brad Bishop2c5ba172017-04-22 16:26:22 -040031SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
32RDEPENDS_${PN}-dev = "${FAN_PACKAGES}"
33RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}"
34
35# --------------------------------------
36# ${PN}-presence-tach specific configuration
37PACKAGECONFIG[presence] = " \
38 --enable-presence \
39 FAN_DETECT_YAML_FILE=${STAGING_DIR_NATIVE}${presence_datadir}/config.yaml, \
40 --disable-presence, \
41 virtual/phosphor-fan-presence-config \
42 , \
43"
44RDEPENDS_${PN}-presence-tach += "sdbusplus"
45
Matt Spinlerbd9fdd92017-04-19 08:23:50 -050046# Needed to install into the obmc-chassis-poweron target
47TMPL_TACH = "phosphor-fan-presence-tach@.service"
48INSTFMT_TACH = "phosphor-fan-presence-tach@{0}.service"
49TGTFMT = "obmc-chassis-poweron@{0}.target"
50FMT_TACH = "../${TMPL_TACH}:${TGTFMT}.requires/${INSTFMT_TACH}"
Brad Bishop2c5ba172017-04-22 16:26:22 -040051
52FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach"
Matt Spinlerbd9fdd92017-04-19 08:23:50 -050053SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL_TACH}"
54SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}"
Brad Bishop2c5ba172017-04-22 16:26:22 -040055
56# --------------------------------------
57# ${PN}-control specific configuration
Matt Spinlerbd9fdd92017-04-19 08:23:50 -050058PACKAGECONFIG[control] = "--enable-control \
59 FAN_DEF_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/fans.yaml \
60 FAN_ZONE_YAML_FILE=${STAGING_DIR_NATIVE}${control_datadir}/zones.yaml \
61 FAN_ZONE_OUTPUT_DIR=${S}/control, \
62 --disable-control, \
63 virtual/phosphor-fan-control-fan-config \
64 phosphor-fan-control-zone-config-native \
65 , \
66"
67
68RDEPENDS_${PN}-control += "sdbusplus"
69
70TMPL_CONTROL = "phosphor-fan-control@.service"
71INSTFMT_CONTROL = "phosphor-fan-control@{0}.service"
72FMT_CONTROL = "../${TMPL_CONTROL}:${TGTFMT}.requires/${INSTFMT_CONTROL}"
73
Brad Bishop2c5ba172017-04-22 16:26:22 -040074FILES_${PN}-control = "${sbindir}/phosphor-fan-control"
Matt Spinlerbd9fdd92017-04-19 08:23:50 -050075SYSTEMD_SERVICE_${PN}-control += "${TMPL_CONTROL}"
76SYSTEMD_LINK_${PN}-control += "${@compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES')}"
Brad Bishop2c5ba172017-04-22 16:26:22 -040077
78# --------------------------------------
79# phosphor-chassis-cooling-type specific configuration
80PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev,"
81RDEPENDS_phosphor-chassis-cooling-type += "libevdev"
82FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type"
Matt Spinler39652c82017-05-01 14:29:20 -050083
84# --------------------------------------
85# ${PN}-monitor specific configuration
86PACKAGECONFIG[monitor] = "--enable-monitor \
87 FAN_MONITOR_YAML_FILE=${STAGING_DIR_NATIVE}${monitor_datadir}/monitor.yaml \
88 FAN_MONITOR_OUTPUT_DIR=${S}/monitor, \
89 --disable-monitor, \
90 phosphor-fan-monitor-config-native \
91 , \
92"
93
94RDEPENDS_${PN}-monitor += "sdbusplus"
95
96TMPL_MONITOR = "phosphor-fan-monitor@.service"
97INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service"
98FMT_MONITOR = "../${TMPL_MONITOR}:${TGTFMT}.requires/${INSTFMT_MONITOR}"
99
100FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor"
101SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}"
102SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}"