blob: d5ec1bc531cc65b22e982ea25f6147bfa013dea8 [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"
7
8inherit native
9inherit phosphor-settings-manager
Matt Spinler0a8ea632017-12-14 13:31:55 -060010inherit mrw-xml
Gunnar Mills8c6516f2017-10-04 15:38:33 -050011
12inherit obmc-phosphor-license
13
14DEPENDS += "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}