diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-05-06 15:47:44 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-05-06 15:47:49 -0400 |
| commit | b7800ccc2aac9c2ac643a554c002758430163f4e (patch) | |
| tree | 6c3e5a80d408fa43b999fb4529ab1e2cfd9e1c45 | |
| parent | f4a608b4d28ae66800c931fd58bc5083abbd03e5 (diff) | |
| download | meta-virtualization-b7800ccc2aac9c2ac643a554c002758430163f4e.tar.gz | |
umoci: introduce umoci recipe for image building
Importing umoci from meta-overc
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/umoci/umoci_git.bb | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-containers/umoci/umoci_git.bb b/recipes-containers/umoci/umoci_git.bb new file mode 100644 index 00000000..caeb0943 --- /dev/null +++ b/recipes-containers/umoci/umoci_git.bb | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | HOMEPAGE = "https://github.com/openSUSE/umoci" | ||
| 2 | SUMMARY = "umoci modifies Open Container images" | ||
| 3 | LICENSE = "Apache-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
| 5 | |||
| 6 | RDEPENDS_${PN} = "skopeo \ | ||
| 7 | " | ||
| 8 | |||
| 9 | SRCREV_umoci = "6e68a6a2ae3e12ad78110ab9e68aa56f8281498f" | ||
| 10 | SRC_URI = "git://github.com/openSUSE/umoci;branch=master;name=umoci;destsuffix=git/src/github.com/openSUSE/umoci \ | ||
| 11 | " | ||
| 12 | |||
| 13 | PV = "v0.3.1-dev+git${SRCPV}" | ||
| 14 | S = "${WORKDIR}/git/src/github.com/openSUSE/umoci" | ||
| 15 | GO_IMPORT = "github.com/openSUSE/umoci" | ||
| 16 | |||
| 17 | inherit goarch | ||
| 18 | inherit go | ||
| 19 | |||
| 20 | # This disables seccomp and apparmor, which are on by default in the | ||
| 21 | # go package. | ||
| 22 | EXTRA_OEMAKE="BUILDTAGS=''" | ||
| 23 | |||
| 24 | do_compile() { | ||
| 25 | export GOARCH="${TARGET_GOARCH}" | ||
| 26 | export GOPATH="${WORKDIR}/git/" | ||
| 27 | |||
| 28 | # Pass the needed cflags/ldflags so that cgo | ||
| 29 | # can find the needed headers files and libraries | ||
| 30 | export CGO_ENABLED="1" | ||
| 31 | export CFLAGS="" | ||
| 32 | export LDFLAGS="" | ||
| 33 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 34 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 35 | |||
| 36 | export GO111MODULE=off | ||
| 37 | |||
| 38 | cd ${S} | ||
| 39 | |||
| 40 | oe_runmake umoci | ||
| 41 | } | ||
| 42 | |||
| 43 | do_install() { | ||
| 44 | install -d ${D}/${sbindir} | ||
| 45 | install ${S}/umoci ${D}/${sbindir} | ||
| 46 | } | ||
| 47 | |||
| 48 | INSANE_SKIP_${PN} += "ldflags already-stripped" | ||
