Patrick Williams | d849ec7 | 2016-08-17 14:59:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "CRIU" |
| 2 | DESCRIPTION = "Checkpoint/Restore In Userspace, or CRIU, is a software tool for \ |
| 3 | Linux 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. \ |
| 5 | You can then use the files to restore and run the application from the point \ |
| 6 | it was frozen at. The distinctive feature of the CRIU project is that it is \ |
| 7 | mainly implemented in user space" |
| 8 | HOMEPAGE = "http://criu.org" |
| 9 | SECTION = "console/tools" |
| 10 | LICENSE = "GPLv2" |
| 11 | |
| 12 | EXCLUDE_FROM_WORLD = "1" |
| 13 | |
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa" |
| 15 | |
| 16 | SRCREV = "4c5b23e52c1dc4e3fbbc7472b92e7b1ce9d22f02" |
| 17 | PR = "r0" |
| 18 | PV = "1.6+git${SRCPV}" |
| 19 | |
| 20 | SRC_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 | |
| 26 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" |
| 27 | |
| 28 | DEPENDS += "protobuf-c-native protobuf-c" |
| 29 | |
| 30 | S = "${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 | # |
| 37 | EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0" |
| 38 | EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0" |
| 39 | EXTRA_OEMAKE_aarch64 += "ARCH=${TARGET_ARCH} WERROR=0" |
| 40 | |
| 41 | EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no" |
| 42 | EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" |
| 43 | |
| 44 | CFLAGS += "-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'" |
| 47 | export LDFLAGS="" |
| 48 | |
| 49 | export BUILD_SYS |
| 50 | export HOST_SYS |
| 51 | |
| 52 | inherit setuptools |
| 53 | |
| 54 | do_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 | |
| 59 | do_compile () { |
| 60 | oe_runmake |
| 61 | } |
| 62 | |
| 63 | do_install () { |
| 64 | oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install |
| 65 | } |
| 66 | |
| 67 | FILES_${PN} += "${systemd_unitdir}/ \ |
| 68 | ${libdir}/python2.7/site-packages/ \ |
| 69 | ${libdir}/pycriu/ \ |
| 70 | ${libdir}/crit-0.0.1-py2.7.egg-info \ |
| 71 | " |