summaryrefslogtreecommitdiff
path: root/recipes-support/libusbgx/libusbgx-config.bbappend
blob: dba89c909640e169916523297988a85b8232afad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

PACKAGE_ARCH:tdx = "${MACHINE_ARCH}"

SRC_URI:append:tdx = " \
    file://g1.schema.in \
    file://setup-board.sh \
"

OURFILEPATH = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"

do_install:append:tdx() {
    sed -e "s:@@PRODUCT_NAME@@:${MACHINE}:" ${OURFILEPATH}/g1.schema.in > ${OURFILEPATH}/g1.schema
    sed -i "s:IMPORT_SCHEMAS=.*:IMPORT_SCHEMAS=\"g1\":" ${D}${sysconfdir}/default/usbgx

    install -d ${D}${sysconfdir}/usbgx
    install -m 0644 ${OURFILEPATH}/g1.schema ${D}${sysconfdir}/usbgx/g1.schema

    install -d ${D}${sysconfdir}/usbgx.d
    install -m 0755 ${OURFILEPATH}/setup-board.sh ${D}${sysconfdir}/usbgx.d
}