Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | HOMEPAGE = "https://github.com/opencontainers/runtime-tools" |
| 2 | SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification" |
| 3 | LICENSE = "GPLv2" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 4 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=b355a61a394a504dacde901c958f662c" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 6 | SRC_URI = "git://github.com/opencontainers/runtime-tools.git \ |
| 7 | file://0001-Revert-implement-add-set-function-for-hooks-items.patch \ |
| 8 | " |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 10 | SRCREV = "6e7da8148f4de2c9e9c9d3b345576898d4f412cb" |
| 11 | PV = "0.1.0+git${SRCPV}" |
| 12 | GO_IMPORT = "import" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 14 | INSANE_SKIP_${PN} += "ldflags" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 15 | |
| 16 | inherit goarch |
| 17 | inherit go |
| 18 | |
| 19 | do_compile() { |
| 20 | export GOARCH="${TARGET_GOARCH}" |
| 21 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 22 | export GOPATH="${S}/src/import:${S}/src/import/vendor" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 23 | |
| 24 | # Pass the needed cflags/ldflags so that cgo |
| 25 | # can find the needed headers files and libraries |
| 26 | export CGO_ENABLED="1" |
| 27 | export CFLAGS="" |
| 28 | export LDFLAGS="" |
| 29 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 30 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 31 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 32 | # link fixups for compilation |
| 33 | rm -f ${S}/src/import/vendor/src |
| 34 | ln -sf ./ ${S}/src/import/vendor/src |
| 35 | mkdir -p ${S}/src/import/vendor/github.com/opencontainers/runtime-tools |
| 36 | ln -sf ../../../../generate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/generate |
| 37 | ln -sf ../../../../validate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/validate |
| 38 | ln -sf ../../../../cmd ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/cmd |
| 39 | ln -sf ../../../../error ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/error |
| 40 | ln -sf ../../../../specerror ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/specerror |
| 41 | cd ${S}/src/import |
| 42 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 43 | oe_runmake |
| 44 | } |
| 45 | |
| 46 | do_install() { |
| 47 | install -d ${D}/${sbindir} |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 48 | install ${S}/src/import/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 49 | } |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 50 | |
| 51 | deltask compile_ptest_base |
| 52 | |