diff options
| -rw-r--r-- | recipes-core/runv/runv_git.bb | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/recipes-core/runv/runv_git.bb b/recipes-core/runv/runv_git.bb new file mode 100644 index 00000000..5125d906 --- /dev/null +++ b/recipes-core/runv/runv_git.bb | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | HOMEPAGE = "https://github.com/hyperhq/runv" | ||
| 2 | SUMMARY = "Hypervisor-based Runtime for OCI" | ||
| 3 | DESCRIPTION = "Hypervisor-based Runtime for OCI" | ||
| 4 | |||
| 5 | SRCREV_runv = "b360a686abc6c6e896382990ef1b93ef07c7a677" | ||
| 6 | SRC_URI = "\ | ||
| 7 | git://github.com/hyperhq/runv.git;nobranch=1;name=runv \ | ||
| 8 | " | ||
| 9 | |||
| 10 | LICENSE = "Apache-2.0" | ||
| 11 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4106a50540bdec3b9734f9c70882d382" | ||
| 12 | |||
| 13 | GO_IMPORT = "import" | ||
| 14 | |||
| 15 | PV = "0.4.0+git${SRCREV_runv}" | ||
| 16 | |||
| 17 | inherit go | ||
| 18 | inherit goarch | ||
| 19 | inherit pkgconfig | ||
| 20 | inherit autotools-brokensep | ||
| 21 | |||
| 22 | PACKAGECONFIG[xen] = "--with-xen,--without-xen," | ||
| 23 | AUTOTOOLS_SCRIPT_PATH = "${S}/src/import/" | ||
| 24 | |||
| 25 | RDEPENDS_${PN} += " qemu" | ||
| 26 | |||
| 27 | do_compile() { | ||
| 28 | export GOARCH="${TARGET_GOARCH}" | ||
| 29 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" | ||
| 30 | export GOPATH="${S}/src/import:${S}/src/import/vendor" | ||
| 31 | |||
| 32 | # Pass the needed cflags/ldflags so that cgo | ||
| 33 | # can find the needed headers files and libraries | ||
| 34 | export CGO_ENABLED="1" | ||
| 35 | export CFLAGS="" | ||
| 36 | export LDFLAGS="" | ||
| 37 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 38 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 39 | |||
| 40 | # link fixups for compilation | ||
| 41 | rm -f ${S}/src/import/vendor/src | ||
| 42 | ln -sf ./ ${S}/src/import/vendor/src | ||
| 43 | |||
| 44 | mkdir -p ${S}/src/import/vendor/github.com/hyperhq/runv | ||
| 45 | |||
| 46 | echo fff | ||
| 47 | pwd | ||
| 48 | ln -sf src/import/cli | ||
| 49 | ln -sf ../../../../api ${S}/src/import/vendor/github.com/hyperhq/runv/api | ||
| 50 | ln -sf ../../../../cli ${S}/src/import/vendor/github.com/hyperhq/runv/cli | ||
| 51 | ln -sf ../../../../lib ${S}/src/import/vendor/github.com/hyperhq/runv/lib | ||
| 52 | ln -sf ../../../../driverloader ${S}/src/import/vendor/github.com/hyperhq/runv/driverloader | ||
| 53 | ln -sf ../../../../factory ${S}/src/import/vendor/github.com/hyperhq/runv/factory | ||
| 54 | ln -sf ../../../../hyperstart ${S}/src/import/vendor/github.com/hyperhq/runv/hyperstart | ||
| 55 | ln -sf ../../../../hypervisor ${S}/src/import/vendor/github.com/hyperhq/runv/hypervisor | ||
| 56 | ln -sf ../../../../template ${S}/src/import/vendor/github.com/hyperhq/runv/template | ||
| 57 | |||
| 58 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" | ||
| 59 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | ||
| 60 | |||
| 61 | # Pass the needed cflags/ldflags so that cgo | ||
| 62 | # can find the needed headers files and libraries | ||
| 63 | export CGO_ENABLED="1" | ||
| 64 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 65 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 66 | |||
| 67 | oe_runmake build-runv | ||
| 68 | } | ||
| 69 | |||
| 70 | do_install() { | ||
| 71 | localbindir="/usr/local/bin" | ||
| 72 | |||
| 73 | install -d ${D}${localbindir} | ||
| 74 | install -m 755 ${S}/runv ${D}/${localbindir} | ||
| 75 | } | ||
| 76 | |||
| 77 | deltask compile_ptest_base | ||
| 78 | |||
| 79 | FILES_${PN} += "/usr/local/bin/*" | ||
| 80 | |||
| 81 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 82 | INSANE_SKIP_${PN} += "ldflags already-stripped" | ||
