blob: de7c025065289ab307b08ea2fde0693f55c085bc [file] [log] [blame]
Brad Bishopb0c3b272017-01-11 11:12:32 -05001SUMMARY = "OpenBMC hwmon poller"
2DESCRIPTION = "OpenBMC hwmon poller."
3PR = "r1"
Patrick Venture8f1d06b2018-10-01 20:22:40 -07004PV = "1.0+git${SRCPV}"
Brad Bishopb0c3b272017-01-11 11:12:32 -05005LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
7
Patrick Venture8f1d06b2018-10-01 20:22:40 -07008inherit autotools pkgconfig
9inherit obmc-phosphor-systemd
Brad Bishop030da252017-01-11 15:30:07 -050010
Matthew Barth22546d92020-11-17 08:45:59 -060011PACKAGECONFIG ??= ""
12# Autotools configure option to enable/disable max31785-msl
13PACKAGECONFIG[max31785-msl] = "--enable-max31785-msl, --disable-max31785-msl"
14# Meson configure option to enable/disable max31785-msl
15# PACKAGECONFIG[max31785-msl] = "-Denable-max31785-msl=true, -Denable-max31785-msl=false"
16
Brad Bishop1d34ddd2017-08-01 21:33:30 -040017PACKAGE_BEFORE_PN = "max31785-msl"
18SYSTEMD_PACKAGES = "${PN} max31785-msl"
19
Brad Bishop030da252017-01-11 15:30:07 -050020SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Hwmon@.service"
Matthew Barth22546d92020-11-17 08:45:59 -060021SYSTEMD_SERVICE_max31785-msl = "${@bb.utils.contains('PACKAGECONFIG', 'max31785-msl', 'phosphor-max31785-msl@.service', '', d)}"
Brad Bishopb0c3b272017-01-11 11:12:32 -050022
23DEPENDS += "autoconf-archive-native"
Brad Bishopf4393bf2017-02-20 14:36:31 -050024DEPENDS += " \
25 sdbusplus \
William A. Kennington III4223a352018-10-18 19:23:49 -070026 sdeventplus \
Patrick Venture9d2aa342020-05-21 08:32:30 -070027 stdplus \
Brad Bishopf4393bf2017-02-20 14:36:31 -050028 phosphor-dbus-interfaces \
29 phosphor-logging \
Patrick Venture03c53912018-09-14 09:54:18 -070030 gpioplus \
Patrick Venture5fe521d2019-03-11 14:06:11 -070031 cli11 \
Brad Bishopf4393bf2017-02-20 14:36:31 -050032 "
33
Brad Bishopb0c3b272017-01-11 11:12:32 -050034
35RDEPENDS_${PN} += "\
Joel Stanley7b29e202017-09-05 17:44:33 +100036 bash \
Brad Bishopb0c3b272017-01-11 11:12:32 -050037 "
38
Brad Bishopfe7871c2017-02-22 20:50:13 -050039RRECOMMENDS_${PN} += "${VIRTUAL-RUNTIME_phosphor-hwmon-config}"
40
Brad Bishop1d34ddd2017-08-01 21:33:30 -040041FILES_max31785-msl = "${bindir}/max31785-msl"
42RDEPENDS_max31785-msl = "${VIRTUAL-RUNTIME_base-utils} i2c-tools"
43
Brad Bishopb0c3b272017-01-11 11:12:32 -050044SRC_URI += "git://github.com/openbmc/phosphor-hwmon"
Brad Bishop030da252017-01-11 15:30:07 -050045SRC_URI += "file://70-hwmon.rules"
Brandon Wyman675ce0b2017-06-21 16:32:56 -050046SRC_URI += "file://70-iio.rules"
Joel Stanley7b29e202017-09-05 17:44:33 +100047SRC_URI += "file://start_hwmon.sh"
Brad Bishopb0c3b272017-01-11 11:12:32 -050048
Andrew Geissler328da482020-11-18 20:14:13 +000049SRCREV = "94555352240ba7ac577a7017c0719cd9bbeb7a23"
Brad Bishopb0c3b272017-01-11 11:12:32 -050050
51S = "${WORKDIR}/git"
Brad Bishop030da252017-01-11 15:30:07 -050052
53do_install_append() {
54
Brad Bishopf5812fd2017-01-26 09:12:57 -050055 install -d ${D}/${base_libdir}/udev/rules.d/
Brad Bishopd0c97c02019-11-14 14:37:51 -050056 install -m 0644 ${WORKDIR}/70-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
57 install -m 0644 ${WORKDIR}/70-iio.rules ${D}/${base_libdir}/udev/rules.d/
Joel Stanley7b29e202017-09-05 17:44:33 +100058
59 install -d ${D}${bindir}
60 install -m 0755 ${WORKDIR}/start_hwmon.sh ${D}${bindir}
Brad Bishop030da252017-01-11 15:30:07 -050061}