criu: force python to install in ${libdir}

Historically Yocto installs python modules in ${libdir} and not the
no-arch variant. The criu install was following every other distros
use of the non-arch variant, /usr/lib, which was being picked up by
the QA check. Modify the criu Makefile to enable us to overwrite this
location by using setup.py's install-lib directive.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Mark Asselstine 2017-04-24 16:31:30 -04:00 committed by Bruce Ashfield
parent 76c38f219d
commit d3c6004e92
2 changed files with 32 additions and 0 deletions

View File

@ -22,6 +22,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
file://0002-criu-Skip-documentation-install.patch \
file://0001-criu-Change-libraries-install-directory.patch \
${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \
file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
"
COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
@ -67,6 +68,7 @@ do_compile () {
}
do_install () {
export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
}

View File

@ -0,0 +1,30 @@
From 2e0c5c66786016f6443da2c1ff15ad77f018ec9b Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Mon, 24 Apr 2017 16:12:05 -0400
Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
I am not sure why Yocto installs python modules in arch specific
/usr/libXX directories but it does. Allow the recipe to pass this via
INSTALL_LIB.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
lib/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Makefile b/lib/Makefile
index f1c0821..c714d12 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -56,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
$(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(E) " INSTALL " crit
- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
+ $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(INSTALL_LIB)
.PHONY: install
uninstall:
--
2.7.4