blob: 9122522ba530710a5d492c4826fbda6dc0eaf792 [file] [log] [blame]
Gunnar Mills8c6516f2017-10-04 15:38:33 -05001# Generates MRW settings override yaml for phosphor-settings-manager
2# The default YAML file, mrw-override-settings.yaml, is empty, therefore no
3# settings will be overwritten. To override, modify mrw-override-settings.yaml.
Gunnar Mills8c6516f2017-10-04 15:38:33 -05004SUMMARY = "Generates MRW settings override YAML for phosphor-settings-manager."
Brad Bishop75f03872018-11-03 09:41:57 -07005LICENSE = "Apache-2.0"
Brad Bishop6f3f0aa2019-09-13 12:14:05 -04006LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Gunnar Mills8c6516f2017-10-04 15:38:33 -05007DEPENDS += "mrw-native mrw-perl-tools-native"
Ed Tanous9936f862022-09-19 09:13:20 -07008PR = "r1"
Gunnar Mills8c6516f2017-10-04 15:38:33 -05009
10SRC_URI += "file://mrw-override-settings.yaml"
11
12S = "${WORKDIR}"
13
Ed Tanous9936f862022-09-19 09:13:20 -070014inherit phosphor-settings-manager
15inherit mrw-xml
16inherit native
Matt Spinler8280d072018-03-09 11:04:05 -060017
Gunnar Mills8c6516f2017-10-04 15:38:33 -050018do_install() {
19 DEST=${D}${config_datadir}
20 install -D mrw-override-settings.yaml ${DEST}/mrw-override-settings.yaml
Gunnar Mills8c6516f2017-10-04 15:38:33 -050021 SETTINGS=${D}${settings_datadir}
22 install -d ${SETTINGS}
Gunnar Mills8c6516f2017-10-04 15:38:33 -050023 # gen_settings.pl replaces any MRW variables with their value
24 ${bindir}/perl-native/perl \
25 ${bindir}/gen_settings.pl \
Matt Spinler0a8ea632017-12-14 13:31:55 -060026 -i ${mrw_datadir}/${MRW_XML} \
Gunnar Mills8c6516f2017-10-04 15:38:33 -050027 -s ${DEST}/mrw-override-settings.yaml \
28 -o ${SETTINGS}/mrw-settings.override.yaml \
Matt Spinler8280d072018-03-09 11:04:05 -060029 ${MRW_EXPRESSION_VARS} \
Gunnar Mills8c6516f2017-10-04 15:38:33 -050030 -f
31}
Ed Tanous9936f862022-09-19 09:13:20 -070032
33MRW_EXPRESSION_VARS ?= ""