diff mbox series

[meta-oe,mickledore,12/36] libusbgx: drop hard-coded /usr/bin,/etc

Message ID 20230531111309.2454603-12-akuster808@gmail.com
State New
Headers show
Series [meta-oe,mickledore,01/36] libencode-perl: Remove buildpaths from generated .exh files | expand

Commit Message

akuster808 May 31, 2023, 11:12 a.m. UTC
From: Ming Liu <liu.ming50@gmail.com>

Drop hard-coded /usr/bin,/etc from gadget-start.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-support/libusbgx/libusbgx_git.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libusbgx/libusbgx_git.bb b/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
index 11e88935ef..2fe32a0770 100644
--- a/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
+++ b/meta-oe/recipes-support/libusbgx/libusbgx_git.bb
@@ -35,7 +35,9 @@  INITSCRIPT_PARAMS = "defaults"
 INHIBIT_UPDATERCD_BBCLASS = "${@bb.utils.contains('PACKAGECONFIG', 'examples', '1', '0', d)}"
 
 do_install:append() {
-    install -Dm 0755 ${WORKDIR}/gadget-start ${D}/${bindir}/gadget-start
+    install -Dm 0755 ${WORKDIR}/gadget-start ${D}${bindir}/gadget-start
+    sed -i -e 's,/usr/bin,${bindir},g' -e 's,/etc,${sysconfdir},g' ${D}${bindir}/gadget-start
+
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
         install -Dm 0644 ${WORKDIR}/usbgx.service ${D}${systemd_system_unitdir}/usbgx.service
     fi