summaryrefslogtreecommitdiff
path: root/app-containers/buildah/buildah-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-28 10:32:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-28 10:32:42 +0100
commit5d1fadfaf82053fc45d6120cb990be1ffb05fc8d (patch)
tree8d36fff15d7c7ebb6834f324a115e82f24cdbaf2 /app-containers/buildah/buildah-9999.ebuild
parent5684fb5128e63f45e3c4a58a58ba9b2a124a2a28 (diff)
gentoo auto-resync : 28:10:2023 - 10:32:42
Diffstat (limited to 'app-containers/buildah/buildah-9999.ebuild')
-rw-r--r--app-containers/buildah/buildah-9999.ebuild102
1 files changed, 47 insertions, 55 deletions
diff --git a/app-containers/buildah/buildah-9999.ebuild b/app-containers/buildah/buildah-9999.ebuild
index 8ca21b070f70..4c03a24b3508 100644
--- a/app-containers/buildah/buildah-9999.ebuild
+++ b/app-containers/buildah/buildah-9999.ebuild
@@ -7,7 +7,10 @@ inherit go-module linux-info
DESCRIPTION="A tool that facilitates building OCI images"
HOMEPAGE="https://github.com/containers/buildah"
-LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
+# main pkg
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
SLOT="0"
IUSE="apparmor btrfs +seccomp systemd doc test"
@@ -15,22 +18,20 @@ RESTRICT="test"
EXTRA_DOCS=(
"CHANGELOG.md"
"CONTRIBUTING.md"
- "README.md"
"install.md"
"troubleshooting.md"
"docs/tutorials"
)
-if [[ ${PV} == *9999* ]]; then
+if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/containers/buildah.git"
else
SRC_URI="https://github.com/containers/buildah/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- GIT_COMMIT=2326d49
KEYWORDS="~amd64 ~arm64"
fi
-DEPEND="
+RDEPEND="
systemd? ( sys-apps/systemd )
btrfs? ( sys-fs/btrfs-progs )
seccomp? ( sys-libs/libseccomp:= )
@@ -40,7 +41,7 @@ DEPEND="
dev-libs/libassuan:=
sys-apps/shadow:=
"
-RDEPEND="${DEPEND}"
+DEPEND="${RDEPEND}"
pkg_pretend() {
local CONFIG_CHECK=""
@@ -53,71 +54,62 @@ pkg_pretend() {
src_prepare() {
default
- sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die
+ # ensure all necessary files are there
+ local file
+ for file in docs/Makefile hack/libsubid_tag.sh hack/apparmor_tag.sh \
+ hack/systemd_tag.sh btrfs_installed_tag.sh btrfs_tag.sh; do
+ [[ -f "${file}" ]] || die
+ done
- [[ -f hack/libsubid_tag.sh ]] && echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die
+ sed -i -e "s|/usr/local|${EPREFIX}/usr|g" Makefile docs/Makefile || die
+ echo -e '#!/usr/bin/env bash\necho libsubid' > hack/libsubid_tag.sh || die
- [[ -f hack/apparmor_tag.sh ]] || die
- if use apparmor; then
- echo -e '#!/usr/bin/env bash\necho apparmor' > hack/apparmor_tag.sh || die
- else
- echo -e '#!/usr/bin/env bash\necho' > hack/apparmor_tag.sh || die
- fi
+ cat <<-EOF > hack/apparmor_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex apparmor 'echo apparmor' echo)
+ EOF
use seccomp || {
- cat << 'EOF' > "${T}/disable_seccomp.patch"
---- Makefile
-+++ Makefile
-@@ -5 +5 @@
--SECURITYTAGS ?= seccomp $(APPARMORTAG)
-+SECURITYTAGS ?= $(APPARMORTAG)
-EOF
- eapply -p0 "${T}/disable_seccomp.patch" || die
+ cat <<-'EOF' > "${T}/disable_seccomp.patch"
+ --- a/Makefile
+ +++ b/Makefile
+ @@ -5 +5 @@
+ -SECURITYTAGS ?= seccomp $(APPARMORTAG)
+ +SECURITYTAGS ?= $(APPARMORTAG)
+ EOF
+ eapply "${T}/disable_seccomp.patch" || die
}
- [[ -f hack/systemd_tag.sh ]] || die
- if use systemd; then
- echo -e '#!/usr/bin/env bash\necho systemd' > hack/systemd_tag.sh || die
- else
- echo -e '#!/usr/bin/env bash\necho' > hack/systemd_tag.sh || die
- fi
-
- [[ -f btrfs_installed_tag.sh && -f btrfs_tag.sh ]] || die
- if use btrfs; then
- echo -e '#!/usr/bin/env bash\necho btrfs_noversion' > btrfs_tag.sh || die
- echo -e '#!/usr/bin/env bash\necho' > btrfs_installed_tag.sh || die
- else
- echo -e '#!/usr/bin/env bash\necho exclude_graphdriver_btrfs' > btrfs_installed_tag.sh || die
- echo -e '#!/usr/bin/env bash\necho' > btrfs_tag.sh || die
- fi
+ cat <<-EOF > hack/systemd_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex systemd 'echo systemd' echo)
+ EOF
+
+ echo -e "#!/usr/bin/env bash\n echo" > btrfs_installed_tag.sh || die
+ cat <<-EOF > btrfs_tag.sh || die
+ #!/usr/bin/env bash
+ $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion')
+ EOF
use test || {
- cat << 'EOF' > "${T}/disable_tests.patch"
---- Makefile
-+++ Makefile
-@@ -54 +54 @@
--all: bin/buildah bin/imgtype bin/copy bin/tutorial docs
-+all: bin/buildah docs
-EOF
- eapply -p0 "${T}/disable_tests.patch" || die
+ cat <<-'EOF' > "${T}/disable_tests.patch"
+ --- a/Makefile
+ +++ b/Makefile
+ @@ -54 +54 @@
+ -all: bin/buildah bin/imgtype bin/copy bin/tutorial docs
+ +all: bin/buildah docs
+ EOF
+ eapply "${T}/disable_tests.patch" || die
}
}
-src_compile() {
- if [[ ${PV} == *9999* ]]; then
- emake all
- else
- emake GIT_COMMIT=${GIT_COMMIT} all
- fi
-}
-
src_test() {
emake test-unit
}
src_install() {
- default
- emake DESTDIR="${D}" install.completions
+ emake DESTDIR="${D}" install install.completions
+ einstalldocs
use doc && dodoc -r "${EXTRA_DOCS[@]}"
}