Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 1 | # 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 | |
| 5 | SUMMARY = "Generates MRW settings override YAML for phosphor-settings-manager." |
| 6 | PR = "r1" |
| 7 | |
| 8 | inherit native |
| 9 | inherit phosphor-settings-manager |
Matt Spinler | 0a8ea63 | 2017-12-14 13:31:55 -0600 | [diff] [blame] | 10 | inherit mrw-xml |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 11 | |
| 12 | inherit obmc-phosphor-license |
| 13 | |
| 14 | DEPENDS += "mrw-native mrw-perl-tools-native" |
| 15 | |
| 16 | SRC_URI += "file://mrw-override-settings.yaml" |
| 17 | |
| 18 | S = "${WORKDIR}" |
| 19 | |
Matt Spinler | 8280d07 | 2018-03-09 11:04:05 -0600 | [diff] [blame] | 20 | MRW_EXPRESSION_VARS ?= "" |
| 21 | |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 22 | do_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 Spinler | 0a8ea63 | 2017-12-14 13:31:55 -0600 | [diff] [blame] | 32 | -i ${mrw_datadir}/${MRW_XML} \ |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 33 | -s ${DEST}/mrw-override-settings.yaml \ |
| 34 | -o ${SETTINGS}/mrw-settings.override.yaml \ |
Matt Spinler | 8280d07 | 2018-03-09 11:04:05 -0600 | [diff] [blame] | 35 | ${MRW_EXPRESSION_VARS} \ |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 36 | -f |
| 37 | } |