1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit bash-completion-r1 golang-vcs-snapshot
8 DESCRIPTION="A tool that facilitates building OCI images"
9 HOMEPAGE="https://github.com/containers/buildah"
13 EGO_PN="${HOMEPAGE#*//}"
16 SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
17 RDEPEND="app-crypt/gpgme:=
19 dev-libs/libgpg-error:=
23 selinux? ( sys-libs/libselinux:= )"
26 REQUIRED_USE="!selinux? ( !ostree )"
27 S="${WORKDIR}/${P}/src/${EGO_PN}"
31 sed -e 's|^\(GIT_COMMIT ?= \).*|\1'${GIT_COMMIT}'|' -i Makefile || die
33 [[ -f ostree_tag.sh ]] || die
34 use ostree || { echo -e "#!/bin/sh\necho containers_image_ostree_stub" > \
35 ostree_tag.sh || die; }
37 [[ -f selinux_tag.sh ]] || die
38 use selinux || { echo -e "#!/bin/sh\ntrue" > \
39 selinux_tag.sh || die; }
43 env -u GOCACHE -u XDG_CACHE_HOME GOPATH="${WORKDIR}/${P}" emake all
47 dodoc CHANGELOG.md CONTRIBUTING.md README.md install.md troubleshooting.md
49 dodoc -r docs/tutorials
51 dobashcomp contrib/completions/bash/buildah
55 GOPATH="${WORKDIR}/${P}" emake test-unit