summaryrefslogtreecommitdiffstats
path: root/recipes-containers/criu/criu_3.9.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/criu/criu_3.9.bb')
-rw-r--r--recipes-containers/criu/criu_3.9.bb87
1 files changed, 87 insertions, 0 deletions
diff --git a/recipes-containers/criu/criu_3.9.bb b/recipes-containers/criu/criu_3.9.bb
new file mode 100644
index 00000000..36c356db
--- /dev/null
+++ b/recipes-containers/criu/criu_3.9.bb
@@ -0,0 +1,87 @@
1SUMMARY = "CRIU"
2DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for \
3Linux operating system. Using this tool, you can freeze a running application \
4(or part of it) and checkpoint it to a hard drive as a collection of files. \
5You can then use the files to restore and run the application from the point \
6it was frozen at. The distinctive feature of the CRIU project is that it is \
7mainly implemented in user space"
8HOMEPAGE = "http://criu.org"
9SECTION = "console/tools"
10LICENSE = "GPLv2"
11
12EXCLUDE_FROM_WORLD = "1"
13
14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
15
16SRCREV = "202b7745bd0c37a1732ebe2fb009a157d338bf95"
17PV = "3.9+git${SRCPV}"
18
19SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
20 file://0001-criu-Fix-toolchain-hardcode.patch \
21 file://0002-criu-Skip-documentation-install.patch \
22 file://0001-criu-Change-libraries-install-directory.patch \
23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
24 "
25
26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
27
28DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet"
29RDEPENDS_${PN} = "bash"
30
31S = "${WORKDIR}/git"
32
33#
34# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
35# if the ARCH is ARMv7 or ARMv6.
36# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
37#
38EXTRA_OEMAKE_arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0"
39EXTRA_OEMAKE_x86-64 += "ARCH=x86 WERROR=0"
40EXTRA_OEMAKE_aarch64 += "ARCH=arm64 WERROR=0"
41
42EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
43EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
44
45CFLAGS += "-D__USE_GNU -D_GNU_SOURCE "
46
47CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3"
48CFLAGS_arm += "-D__WORDSIZE"
49
50# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
51export LDFLAGS=""
52export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3"
53
54export BUILD_SYS
55export HOST_SYS
56
57inherit setuptools
58
59PACKAGECONFIG ??= ""
60PACKAGECONFIG[selinux] = ",,libselinux"
61
62CLEANBROKEN = "1"
63
64do_compile_prepend() {
65 rm -rf ${S}/images/google/protobuf/descriptor.proto
66 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
67}
68
69do_compile () {
70 oe_runmake
71}
72
73do_install () {
74 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
75 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
76}
77
78FILES_${PN} += "${systemd_unitdir}/ \
79 ${libdir}/python2.7/site-packages/ \
80 ${libdir}/pycriu/ \
81 ${libdir}/crit-0.0.1-py2.7.egg-info \
82 "
83
84FILES_${PN}-staticdev += " \
85 ${libexecdir}/compel/std.lib.a \
86 ${libexecdir}/compel/fds.lib.a \
87 "