summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/settings/phosphor-settings-read-settings-mrw-native.bb
blob: 9122522ba530710a5d492c4826fbda6dc0eaf792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Generates MRW settings override yaml for phosphor-settings-manager
# The default YAML file, mrw-override-settings.yaml, is empty, therefore no
# settings will be overwritten. To override, modify mrw-override-settings.yaml.
SUMMARY = "Generates MRW settings override YAML for phosphor-settings-manager."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
DEPENDS += "mrw-native mrw-perl-tools-native"
PR = "r1"

SRC_URI += "file://mrw-override-settings.yaml"

S = "${WORKDIR}"

inherit phosphor-settings-manager
inherit mrw-xml
inherit native

do_install() {
    DEST=${D}${config_datadir}
    install -D mrw-override-settings.yaml ${DEST}/mrw-override-settings.yaml
    SETTINGS=${D}${settings_datadir}
    install -d ${SETTINGS}
    # gen_settings.pl replaces any MRW variables with their value
    ${bindir}/perl-native/perl \
        ${bindir}/gen_settings.pl \
        -i ${mrw_datadir}/${MRW_XML} \
        -s ${DEST}/mrw-override-settings.yaml \
        -o ${SETTINGS}/mrw-settings.override.yaml \
        ${MRW_EXPRESSION_VARS} \
        -f
}

MRW_EXPRESSION_VARS ?= ""