summaryrefslogtreecommitdiff
path: root/recipes-support/libusbgx/libusbgx_git.bb
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-06-11 18:40:02 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-06-22 08:59:42 +0200
commit330647f0473894e0475a0073a185e7c98d69192d (patch)
tree4c66d09f21c4e28701df10088eb4f6a5224de0bc /recipes-support/libusbgx/libusbgx_git.bb
parent77fcf610f135e1050ec22bd985f0389eab8ff105 (diff)
libusbgx: rework g1.schema handling
Add the product name at compile time so that we do not need to provide slightly different copies of the file. While at it set package arch to machine arch. The packages created are machine specific due to the g1.schema file. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 3fa96f28bb30643cac3b8a49d3abd7c976acb704)
Diffstat (limited to 'recipes-support/libusbgx/libusbgx_git.bb')
-rw-r--r--recipes-support/libusbgx/libusbgx_git.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/recipes-support/libusbgx/libusbgx_git.bb b/recipes-support/libusbgx/libusbgx_git.bb
index 17707ee..2cd9e21 100644
--- a/recipes-support/libusbgx/libusbgx_git.bb
+++ b/recipes-support/libusbgx/libusbgx_git.bb
@@ -16,11 +16,16 @@ SRCBRANCH = "master"
SRC_URI = " \
git://github.com/libusbgx/libusbgx.git;branch=${SRCBRANCH} \
file://usbg.service \
- file://g1.schema \
+ file://g1.schema.in \
"
S = "${WORKDIR}/git"
+MACHINE_NAME ?= "${MACHINE}"
+do_compile_append () {
+ sed -e "s:@@PRODUCT_NAME@@:${MACHINE_NAME}:" ${WORKDIR}/g1.schema.in > ${WORKDIR}/g1.schema
+}
+
do_install_append () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system/
@@ -36,6 +41,7 @@ SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "usbg.service"
PACKAGES =+ "${PN}-examples"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN}-examples = " \
${bindir}/gadget-* \