blob: 48bcdc271281b2fe149e9b8b02f146305e553775 [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001SUMMARY = "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=5cc804625b8b491b6b4312f0c9cb5efa"
15
16SRCREV = "4c5b23e52c1dc4e3fbbc7472b92e7b1ce9d22f02"
17PR = "r0"
18PV = "1.6+git${SRCPV}"
19
20SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
21 file://0001-criu-Fix-toolchain-hardcode.patch \
22 file://0002-criu-Skip-documentation-install.patch \
23 file://0001-criu-Change-libraries-install-directory.patch \
24 "
25
26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
27
28DEPENDS += "protobuf-c-native protobuf-c"
29
30S = "${WORKDIR}/git"
31
32#
33# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
34# if the ARCH is ARMv7 or ARMv6.
35# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
36#
37EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0"
38EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0"
39EXTRA_OEMAKE_aarch64 += "ARCH=${TARGET_ARCH} WERROR=0"
40
41EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
42EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
43
44CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
45
46# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
47export LDFLAGS=""
48
49export BUILD_SYS
50export HOST_SYS
51
52inherit setuptools
53
54do_compile_prepend() {
55 rm -rf ${S}/protobuf/google/protobuf/descriptor.proto
56 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/protobuf/google/protobuf/descriptor.proto
57}
58
59do_compile () {
60 oe_runmake
61}
62
63do_install () {
64 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
65}
66
67FILES_${PN} += "${systemd_unitdir}/ \
68 ${libdir}/python2.7/site-packages/ \
69 ${libdir}/pycriu/ \
70 ${libdir}/crit-0.0.1-py2.7.egg-info \
71 "