mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-15 23:05:34 +01:00
boinc-client: Make script install not depend on host install paths
The install target is checking for install paths on build host assuming thats where it will run too, which breaks cross builds. Add a patch to aide the install from recipe. Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
aea550e75d
commit
bbc6fa72c3
|
|
@ -0,0 +1,52 @@
|
|||
From 8a8305c78143438e2bd497d55188a0da3442db08 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 27 Apr 2022 09:11:38 -0700
|
||||
Subject: [PATCH] scripts: Do not check for files on build host
|
||||
|
||||
This will result in varied behaviour depending upon what kind of host is
|
||||
used to build it. We dont want that. Instead check for these files and
|
||||
dirs in staging area and create these markers in recipe via a
|
||||
do_install_prepend to aide install piece a bit here ( systemd vs
|
||||
sysvinit ) etc.
|
||||
|
||||
Upstream-Status: Inappropriate [OE-Specific]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
client/scripts/Makefile.am | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/client/scripts/Makefile.am b/client/scripts/Makefile.am
|
||||
index 2a53203d84..62a0defa93 100644
|
||||
--- a/client/scripts/Makefile.am
|
||||
+++ b/client/scripts/Makefile.am
|
||||
@@ -2,21 +2,21 @@
|
||||
|
||||
install-exec-hook:
|
||||
chmod +x boinc-client
|
||||
- if [ -d /etc/init.d ] ; then \
|
||||
+ if [ -d $(DESTDIR)/etc/init.d ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d ; \
|
||||
$(INSTALL) -b boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client ; \
|
||||
fi
|
||||
- if [ -d /usr/lib/systemd/system ] ; then \
|
||||
+ if [ -d $(DESTDIR)/usr/lib/systemd/system ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)/usr/lib/systemd/system/ ; \
|
||||
$(INSTALL_DATA) boinc-client.service $(DESTDIR)/usr/lib/systemd/system/boinc-client.service ; \
|
||||
- elif [ -d /lib/systemd/system ] ; then \
|
||||
+ elif [ -d $(DESTDIR)/lib/systemd/system ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)/lib/systemd/system/ ; \
|
||||
$(INSTALL_DATA) boinc-client.service $(DESTDIR)/lib/systemd/system/boinc-client.service ; \
|
||||
fi
|
||||
- if [ -d /etc/sysconfig ] ; then \
|
||||
+ if [ -d $(DESTDIR)/etc/sysconfig ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \
|
||||
$(INSTALL_DATA) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \
|
||||
- elif [ -d /etc/default ] ; then \
|
||||
+ elif [ -d $(DESTDIR)/etc/default ] ; then \
|
||||
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/default ; \
|
||||
$(INSTALL_DATA) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/default/boinc-client ; \
|
||||
else \
|
||||
--
|
||||
2.36.0
|
||||
|
||||
|
|
@ -35,6 +35,7 @@ SRC_URI = "git://github.com/BOINC/boinc;protocol=https;branch=${BRANCH} \
|
|||
file://boinc-AM_CONDITIONAL.patch \
|
||||
file://gtk-configure.patch \
|
||||
file://4563.patch \
|
||||
file://0001-scripts-Do-not-check-for-files-on-build-host.patch \
|
||||
"
|
||||
|
||||
inherit gettext autotools pkgconfig features_check systemd
|
||||
|
|
@ -75,17 +76,14 @@ do_compile:prepend () {
|
|||
sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${B}/libtool
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)} -a \
|
||||
-e ${D}${nonarch_libdir}/systemd/system/boinc-client.service; then
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
mv \
|
||||
${D}${nonarch_libdir}/systemd/system/boinc-client.service \
|
||||
${D}${systemd_system_unitdir}/boinc-client.service
|
||||
rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir}/systemd/system \
|
||||
${D}${nonarch_libdir}/systemd \
|
||||
${D}${nonarch_libdir}
|
||||
do_install:prepend() {
|
||||
# help script install a bit to do right thing for OE
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
mkdir -p ${D}${systemd_system_unitdir}
|
||||
else
|
||||
mkdir -p ${D}${sysconfdir}/init.d
|
||||
fi
|
||||
mkdir -p ${D}${sysconfdir}/default
|
||||
}
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "boinc-client.service"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user