blob: a67d6819dca7cb82fe2975420062c2eba9de39e0 [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.
4
5SUMMARY = "Generates MRW settings override YAML for phosphor-settings-manager."
6PR = "r1"
Brad Bishop75f03872018-11-03 09:41:57 -07007LICENSE = "Apache-2.0"
Brad Bishop6f3f0aa2019-09-13 12:14:05 -04008LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Gunnar Mills8c6516f2017-10-04 15:38:33 -05009
Gunnar Mills8c6516f2017-10-04 15:38:33 -050010inherit phosphor-settings-manager
Matt Spinler0a8ea632017-12-14 13:31:55 -060011inherit mrw-xml
Joseph Reynolds79809ea2021-02-26 15:37:31 -060012inherit native
Gunnar Mills8c6516f2017-10-04 15:38:33 -050013
Gunnar Mills8c6516f2017-10-04 15:38:33 -050014DEPENDS += "mrw-native mrw-perl-tools-native"
15
16SRC_URI += "file://mrw-override-settings.yaml"
17
18S = "${WORKDIR}"
19
Matt Spinler8280d072018-03-09 11:04:05 -060020MRW_EXPRESSION_VARS ?= ""
21
Gunnar Mills8c6516f2017-10-04 15:38:33 -050022do_install() {
23 DEST=${D}${config_datadir}
24 install -D mrw-override-settings.yaml ${DEST}/mrw-override-settings.yaml
25
26 SETTINGS=${D}${settings_datadir}
27 install -d ${SETTINGS}
28
29 # gen_settings.pl replaces any MRW variables with their value
30 ${bindir}/perl-native/perl \
31 ${bindir}/gen_settings.pl \
Matt Spinler0a8ea632017-12-14 13:31:55 -060032 -i ${mrw_datadir}/${MRW_XML} \
Gunnar Mills8c6516f2017-10-04 15:38:33 -050033 -s ${DEST}/mrw-override-settings.yaml \
34 -o ${SETTINGS}/mrw-settings.override.yaml \
Matt Spinler8280d072018-03-09 11:04:05 -060035 ${MRW_EXPRESSION_VARS} \
Gunnar Mills8c6516f2017-10-04 15:38:33 -050036 -f
37}