summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/buildah/buildah_git.bb57
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes-containers/buildah/buildah_git.bb b/recipes-containers/buildah/buildah_git.bb
new file mode 100644
index 00000000..024e82c1
--- /dev/null
+++ b/recipes-containers/buildah/buildah_git.bb
@@ -0,0 +1,57 @@
1HOMEPAGE = "https://buildah.io"
2SUMMARY = "A tool that facilitates building OCI container images."
3DESCRIPTION = "A tool that facilitates building OCI container images."
4
5# Apache-2.0 for containerd
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://src/github.com/containers/buildah/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
8
9S = "${WORKDIR}/git"
10
11BUILDAH_VERSION = "1.26"
12SRCREV_buildah = "0a9d6e6eaef2e2e7936313d449a4e226022eb865"
13
14PV = "${BUILDAH_VERSION}"
15
16inherit go
17inherit goarch
18inherit pkgconfig
19
20GO_IMPORT = "github.com/containers/buildah"
21GO_INSTALL = "${GO_IMPORT}"
22GO_WORKDIR = "${GO_INSTALL}"
23GOBUILDFLAGS += "-mod vendor"
24
25SRC_URI = " \
26 git://github.com/containers/buildah;branch=release-${BUILDAH_VERSION};name=buildah;protocol=https \
27 "
28
29DEPENDS = "libdevmapper btrfs-tools gpgme"
30RDEPENDS:${PN} = "cgroup-lite fuse-overlayfs libdevmapper podman"
31RDEPENDS:${PN}-dev = "bash perl"
32
33do_compile:prepend() {
34 cd ${S}/src/github.com/containers/buildah
35}
36
37go_do_compile() {
38 export TMPDIR="${GOTMPDIR}"
39 if [ -n "${GO_INSTALL}" ]; then
40 if [ -n "${GO_LINKSHARED}" ]; then
41 ${GO} install ${GOBUILDFLAGS} ./cmd/buildah
42 ${GO} install ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go
43 ${GO} install ${GOBUILDFLAGS} ./tests/copy/copy.go
44 rm -rf ${B}/bin
45 fi
46 ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./cmd/buildah
47 ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/imgtype/imgtype.go
48 ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} ./tests/copy/copy.go
49 fi
50}
51
52do_install:append() {
53 dest_dir=${D}/${sysconfdir}/containers
54 mkdir -p ${dest_dir}
55 install -m 666 ${S}/src/github.com/containers/buildah/docs/samples/registries.conf ${dest_dir}/buildah.registries.conf.sample
56 install -m 666 ${S}/src/github.com/containers/buildah/tests/policy.json ${dest_dir}/buildah.policy.json.sample
57}