blob: 406dc6d70b4c3c4aaf103408fec2b46bec7930a8 [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 \
25 phosphor-chassis-cooling-type \
26"
27PACKAGES_remove = "${PN}"
28PACKAGES += "${FAN_PACKAGES}"
29PACKAGECONFIG ??= "presence control cooling-type"
30SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
31RDEPENDS_${PN}-dev = "${FAN_PACKAGES}"
32RDEPENDS_${PN}-staticdev = "${FAN_PACKAGES}"
33
34# --------------------------------------
35# ${PN}-presence-tach specific configuration
36PACKAGECONFIG[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"
43RDEPENDS_${PN}-presence-tach += "sdbusplus"
44
45# Needed to install into the obmc-host-start target
46TMPL = "phosphor-fan-presence-tach@.service"
47INSTFMT = "phosphor-fan-presence-tach@{0}.service"
48TGTFMT = "obmc-host-start@{0}.target"
49FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
50
51FILES_${PN}-presence-tach = "${sbindir}/phosphor-fan-presence-tach"
52SYSTEMD_SERVICE_${PN}-presence-tach += "${TMPL}"
53SYSTEMD_LINK_${PN}-presence-tach += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
54
55# --------------------------------------
56# ${PN}-control specific configuration
57PACKAGECONFIG[control] = "--enable-control,--disable-control,,"
58FILES_${PN}-control = "${sbindir}/phosphor-fan-control"
59
60# --------------------------------------
61# phosphor-chassis-cooling-type specific configuration
62PACKAGECONFIG[cooling-type] = "--enable-cooling-type,--disable-cooling-type,libevdev,"
63RDEPENDS_phosphor-chassis-cooling-type += "libevdev"
64FILES_phosphor-chassis-cooling-type = "${sbindir}/phosphor-cooling-type"