summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb')
-rw-r--r--external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb80
1 files changed, 80 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb b/external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb
new file mode 100644
index 00000000..f5a62313
--- /dev/null
+++ b/external/meta-virtualization/recipes-containers/skopeo/skopeo_git.bb
@@ -0,0 +1,80 @@
+HOMEPAGE = "https://github.com/containers/skopeo"
+SUMMARY = "Work with remote images registries - retrieving information, images, signing content"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=7e611105d3e369954840a6668c438584"
+
+DEPENDS = " \
+ gpgme \
+ multipath-tools \
+ btrfs-tools \
+ glib-2.0 \
+ ostree \
+"
+
+inherit go
+
+RDEPENDS_${PN} = " \
+ gpgme \
+ libgpg-error \
+ libassuan \
+"
+
+SRC_URI = " \
+ git://github.com/containers/skopeo \
+ file://storage.conf \
+ file://registries.conf \
+"
+
+SRCREV = "1cf1e06582142c522543560f2bc6d6756696e8ad"
+PV = "v0.1.39-dev+git${SRCPV}"
+GO_IMPORT = "import"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit pkgconfig
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package.
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+
+ # Setup vendor directory so that it can be used in GOPATH.
+ #
+ # Go looks in a src directory under any directory in GOPATH but riddler
+ # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
+ #
+ # We also need to link in the ipallocator directory as that is not under
+ # a src directory.
+ ln -sfn . "${S}/src/import/vendor/src"
+ mkdir -p "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
+ ln -sfn "${S}/src/import/skopeo" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
+ ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo/version"
+ export GOPATH="${S}/src/import/vendor"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ cd ${S}/src/import
+
+ oe_runmake binary-local
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install -d ${D}/${sysconfdir}/containers
+
+ install ${S}/src/import/skopeo ${D}/${sbindir}/
+ install ${S}/src/import/default-policy.json ${D}/${sysconfdir}/containers/policy.json
+
+ install ${WORKDIR}/storage.conf ${D}/${sysconfdir}/containers/storage.conf
+ install ${WORKDIR}/registries.conf ${D}/${sysconfdir}/containers/registries.conf
+}
+
+INSANE_SKIP_${PN} += "ldflags"