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" |
Brad Bishop | 75f0387 | 2018-11-03 09:41:57 -0700 | [diff] [blame] | 7 | LICENSE = "Apache-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 9 | |
| 10 | inherit native |
| 11 | inherit phosphor-settings-manager |
Matt Spinler | 0a8ea63 | 2017-12-14 13:31:55 -0600 | [diff] [blame] | 12 | inherit mrw-xml |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 13 | |
Gunnar Mills | 8c6516f | 2017-10-04 15:38:33 -0500 | [diff] [blame] | 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 | } |