summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/skopeo/skopeo_git.bb73
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-containers/skopeo/skopeo_git.bb b/recipes-containers/skopeo/skopeo_git.bb
new file mode 100644
index 00000000..82d3f23c
--- /dev/null
+++ b/recipes-containers/skopeo/skopeo_git.bb
@@ -0,0 +1,73 @@
1HOMEPAGE = "https://github.com/containers/skopeo"
2SUMMARY = "Work with remote images registries - retrieving information, images, signing content"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=7e611105d3e369954840a6668c438584"
5
6DEPENDS = " \
7 gpgme \
8 multipath-tools \
9 btrfs-tools \
10 glib-2.0 \
11 ostree \
12"
13
14inherit go
15
16RDEPENDS_${PN} = " \
17 gpgme \
18 libgpg-error \
19 libassuan \
20"
21
22SRC_URI = "git://github.com/containers/skopeo"
23
24SRCREV = "1cf1e06582142c522543560f2bc6d6756696e8ad"
25PV = "v0.1.39-dev+git${SRCPV}"
26GO_IMPORT = "import"
27
28S = "${WORKDIR}/git"
29
30inherit goarch
31inherit pkgconfig
32
33# This disables seccomp and apparmor, which are on by default in the
34# go package.
35EXTRA_OEMAKE="BUILDTAGS=''"
36
37do_compile() {
38 export GOARCH="${TARGET_GOARCH}"
39
40 # Setup vendor directory so that it can be used in GOPATH.
41 #
42 # Go looks in a src directory under any directory in GOPATH but riddler
43 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
44 #
45 # We also need to link in the ipallocator directory as that is not under
46 # a src directory.
47 ln -sfn . "${S}/src/import/vendor/src"
48 mkdir -p "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
49 ln -sfn "${S}/src/import/skopeo" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo"
50 ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/projectatomic/skopeo/version"
51 export GOPATH="${S}/src/import/vendor"
52
53 # Pass the needed cflags/ldflags so that cgo
54 # can find the needed headers files and libraries
55 export CGO_ENABLED="1"
56 export CFLAGS=""
57 export LDFLAGS=""
58 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
59 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
60 cd ${S}/src/import
61
62 oe_runmake binary-local
63}
64
65do_install() {
66 install -d ${D}/${sbindir}
67 install -d ${D}/${sysconfdir}/containers
68
69 install ${S}/src/import/skopeo ${D}/${sbindir}/
70 install ${S}/src/import/default-policy.json ${D}/${sysconfdir}/containers/policy.json
71}
72
73INSANE_SKIP_${PN} += "ldflags"