blob: 7d62f354b1a08f5a07f8967182b76ad0c00832ab [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
Patrick Williamse69d2352017-02-23 20:56:04 -060014LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
Patrick Williamsd849ec72016-08-17 14:59:38 -050015
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016SRCREV = "a31c1854e10580a09621e539c3ec052b875a8e06"
17PV = "3.4+git${SRCPV}"
Patrick Williamsd849ec72016-08-17 14:59:38 -050018
19SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
Patrick Williamse69d2352017-02-23 20:56:04 -060020 file://0001-criu-Fix-toolchain-hardcode.patch \
21 file://0002-criu-Skip-documentation-install.patch \
22 file://0001-criu-Change-libraries-install-directory.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040024 file://fix-building-on-newest-glibc-and-kernel.patch \
Patrick Williamse69d2352017-02-23 20:56:04 -060025 "
Patrick Williamsd849ec72016-08-17 14:59:38 -050026
27COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
28
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet"
30RDEPENDS_${PN} = "bash"
Patrick Williamsd849ec72016-08-17 14:59:38 -050031
32S = "${WORKDIR}/git"
33
34#
35# CRIU just can be built on ARMv7 and ARMv6, so the Makefile check
36# if the ARCH is ARMv7 or ARMv6.
37# ARM BSPs need set CRIU_BUILD_ARCH variable for building CRIU.
38#
Patrick Williamse69d2352017-02-23 20:56:04 -060039EXTRA_OEMAKE_arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0"
40EXTRA_OEMAKE_x86-64 += "ARCH=x86 WERROR=0"
41EXTRA_OEMAKE_aarch64 += "ARCH=arm64 WERROR=0"
Patrick Williamsd849ec72016-08-17 14:59:38 -050042
43EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
44EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
45
Patrick Williamse69d2352017-02-23 20:56:04 -060046CFLAGS += "-D__USE_GNU -D_GNU_SOURCE "
47
48CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3"
Patrick Williamsd849ec72016-08-17 14:59:38 -050049
50# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
51export LDFLAGS=""
52
53export BUILD_SYS
54export HOST_SYS
55
56inherit setuptools
57
Patrick Williamse69d2352017-02-23 20:56:04 -060058PACKAGECONFIG ??= ""
59PACKAGECONFIG[selinux] = ",,libselinux"
60
Brad Bishop316dfdd2018-06-25 12:45:53 -040061CLEANBROKEN = "1"
62
Patrick Williamsd849ec72016-08-17 14:59:38 -050063do_compile_prepend() {
Patrick Williamse69d2352017-02-23 20:56:04 -060064 rm -rf ${S}/images/google/protobuf/descriptor.proto
65 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
Patrick Williamsd849ec72016-08-17 14:59:38 -050066}
67
68do_compile () {
69 oe_runmake
70}
71
72do_install () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050073 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
Patrick Williamsd849ec72016-08-17 14:59:38 -050074 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
75}
76
77FILES_${PN} += "${systemd_unitdir}/ \
78 ${libdir}/python2.7/site-packages/ \
79 ${libdir}/pycriu/ \
80 ${libdir}/crit-0.0.1-py2.7.egg-info \
81 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050082
83FILES_${PN}-staticdev += " \
84 ${libexecdir}/compel/std.lib.a \
85 ${libexecdir}/compel/fds.lib.a \
86 "