blob: 023626ed8369e41e558b782d16093c6f0094a93c [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"
8LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
Gunnar Mills8c6516f2017-10-04 15:38:33 -05009
10inherit native
11inherit phosphor-settings-manager
Matt Spinler0a8ea632017-12-14 13:31:55 -060012inherit mrw-xml
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}