diff options
Diffstat (limited to 'recipes-containers/oci-image-tools/oci-image-tools_git.bb')
| -rw-r--r-- | recipes-containers/oci-image-tools/oci-image-tools_git.bb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb new file mode 100644 index 00000000..48cae767 --- /dev/null +++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | HOMEPAGE = "https://github.com/opencontainers/image-tools" | ||
| 2 | SUMMARY = "A collection of tools for working with the OCI image format specification" | ||
| 3 | LICENSE = "Apache-2" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
| 5 | |||
| 6 | DEPENDS = "go-cross \ | ||
| 7 | oci-image-spec \ | ||
| 8 | oci-runtime-spec \ | ||
| 9 | go-digest \ | ||
| 10 | go-errors \ | ||
| 11 | spf13-cobra \ | ||
| 12 | spf13-pflag \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI = "git://github.com/opencontainers/image-tools.git" | ||
| 16 | SRCREV = "a358e03fde4e3628bf9fb7656bf643b63f975636" | ||
| 17 | PV = "0.1.0+git${SRCPV}" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit go-osarchmap | ||
| 22 | |||
| 23 | # This disables seccomp and apparmor, which are on by default in the | ||
| 24 | # go package. | ||
| 25 | EXTRA_OEMAKE="BUILDTAGS=''" | ||
| 26 | |||
| 27 | do_compile() { | ||
| 28 | export GOARCH="${TARGET_GOARCH}" | ||
| 29 | |||
| 30 | # Setup vendor directory so that it can be used in GOPATH. | ||
| 31 | # | ||
| 32 | # Go looks in a src directory under any directory in GOPATH but riddler | ||
| 33 | # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink. | ||
| 34 | # | ||
| 35 | # We also need to link in the ipallocator directory as that is not under | ||
| 36 | # a src directory. | ||
| 37 | ln -sfn . "${S}/vendor/src" | ||
| 38 | mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/" | ||
| 39 | ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image" | ||
| 40 | export GOPATH="${S}/vendor" | ||
| 41 | |||
| 42 | # Pass the needed cflags/ldflags so that cgo | ||
| 43 | # can find the needed headers files and libraries | ||
| 44 | export CGO_ENABLED="1" | ||
| 45 | export CFLAGS="" | ||
| 46 | export LDFLAGS="" | ||
| 47 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 48 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 49 | |||
| 50 | oe_runmake tools | ||
| 51 | } | ||
| 52 | |||
| 53 | do_install() { | ||
| 54 | install -d ${D}/${sbindir} | ||
| 55 | install ${S}/oci-create-runtime-bundle ${D}/${sbindir}/ | ||
| 56 | install ${S}/oci-image-validate ${D}/${sbindir}/ | ||
| 57 | install ${S}/oci-unpack ${D}/${sbindir}/ | ||
| 58 | } | ||
| 59 | |||
| 60 | INSANE_SKIP_${PN} += "ldflags" | ||
