[wam][cef] Add the agl-cef feature to use cef as a wam backend
[AGL/meta-agl-devel.git] / meta-agl-ic-container / classes / cm-config.bbclass
1 # Helper class for container manager config creation.
2 # Assumes that:
3 # - Recipe name is 'cm-config-' + <guest name>
4 # - Corresponding files {config,system.conf}.<guest name>.in are in
5 #   the file search path
6 # - That references to the DRM lease device name are parameterized
7 #   with @DRM_LEASE_DEVICE@ in the .in files
8
9 python __anonymous() {
10     bpn = d.getVar('BPN')
11     if not bpn.startswith('cm-config-'):
12         bb.error('Recipe name does not start with \'cm-config-\'')
13     config = bpn[10:]
14     d.setVar('CM_CONFIG_NAME', config)
15 }
16
17 S = "${WORKDIR}"
18
19 DRM_LEASE_DEVICE ??= "card0-HDMI-A-1"
20
21 do_configure[noexec] = "1"
22 do_compile[noexec] = "1"
23
24 do_install:append () {
25     install -m 0755 -d ${D}/opt/container/guests/${CM_CONFIG_NAME}
26     for f in system.conf.${CM_CONFIG_NAME}.in; do
27         sed -e 's|@DRM_LEASE_DEVICE@|${DRM_LEASE_DEVICE}|g' \
28             ${WORKDIR}/$f > ${D}/opt/container/guests/${CM_CONFIG_NAME}/${f%.${CM_CONFIG_NAME}.in}
29     done
30 }
31
32 FILES:${PN}:append = "/opt/container/guests/${CM_CONFIG_NAME}"