blob: c428550e143266e2e0636201acd0a84ec34bf1eb [file] [log] [blame]
Delphine CC Chiu006c1492023-06-27 14:02:40 +08001SENSOR_CONFIGS ?= "virtual_sensor_config.json"
Kumar Thangavel76202e12021-02-17 13:06:10 +05302
Delphine CC Chiu006c1492023-06-27 14:02:40 +08003SRC_URI:append = "\
4 ${@ ' '.join([ 'file://' + x for x in d.getVar('SENSOR_CONFIGS').split()])} \
5 "
Kumar Thangavel76202e12021-02-17 13:06:10 +05306
Patrick Williams6f746642021-08-06 07:40:55 -05007do_install:append() {
Delphine CC Chiu006c1492023-06-27 14:02:40 +08008 # Delete the default one from Meson.
9 if [ -e "${D}${datadir}/phosphor-virtual-sensor/virtual_sensor_config.json" ]; then
10 rm "${D}${datadir}/phosphor-virtual-sensor/virtual_sensor_config.json"
11 fi
Kumar Thangavel76202e12021-02-17 13:06:10 +053012
Delphine CC Chiu006c1492023-06-27 14:02:40 +080013 # Install the ones from our meta-layer.
Patrick Williamsda5d6d62023-03-24 09:29:39 -050014 install -d ${D}${datadir}/phosphor-virtual-sensor
Delphine CC Chiu006c1492023-06-27 14:02:40 +080015 for s in ${SENSOR_CONFIGS}; do
16 install -m 0644 ${WORKDIR}/$s ${D}${datadir}/phosphor-virtual-sensor
17 done
Kumar Thangavel76202e12021-02-17 13:06:10 +053018}