summaryrefslogtreecommitdiff
path: root/app-containers/containerd/containerd-1.6.14.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-03 02:25:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-03 02:25:09 +0000
commit384d032fe7e048bb10cc9bc9881835c92d7e104c (patch)
tree59b969fdecd674b649820312bfa0b0f6043c25a0 /app-containers/containerd/containerd-1.6.14.ebuild
parent7a13078cb414752df1133d1767cc29260dc60fda (diff)
gentoo auto-resync : 03:01:2023 - 02:25:09
Diffstat (limited to 'app-containers/containerd/containerd-1.6.14.ebuild')
-rw-r--r--app-containers/containerd/containerd-1.6.14.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/app-containers/containerd/containerd-1.6.14.ebuild b/app-containers/containerd/containerd-1.6.14.ebuild
new file mode 100644
index 000000000000..e6a34e17a7f7
--- /dev/null
+++ b/app-containers/containerd/containerd-1.6.14.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+GIT_REVISION=9ba4b250366a5ddde94bb7c9d1def331423aa323
+inherit go-module systemd
+
+DESCRIPTION="A daemon to control runC"
+HOMEPAGE="https://containerd.io/"
+SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test"
+
+DEPEND="
+ btrfs? ( sys-fs/btrfs-progs )
+ seccomp? ( sys-libs/libseccomp )
+"
+
+# recommended version of runc is found in script/setup/runc-version
+RDEPEND="
+ ${DEPEND}
+ ~app-containers/runc-1.1.4
+"
+
+BDEPEND="
+ dev-go/go-md2man
+ virtual/pkgconfig
+"
+
+# tests require root or docker
+RESTRICT+="test"
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s/-s -w//" \
+ Makefile || die
+ sed -i \
+ -e "s:/usr/local:/usr:" \
+ containerd.service || die
+}
+
+src_compile() {
+ local options=(
+ $(usev apparmor)
+ $(usex btrfs "" "no_btrfs")
+ $(usex cri "" "no_cri")
+ $(usex device-mapper "" "no_devmapper")
+ $(usev seccomp)
+ $(usev selinux)
+ )
+
+ myemakeargs=(
+ BUILDTAGS="${options[*]}"
+ LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')"
+ REVISION="${GIT_REVISION}"
+ VERSION=v${PV}
+ )
+
+ # race condition in man target https://bugs.gentoo.org/765100
+ # we need to explicitly specify GOFLAGS for "go run" to use vendor source
+ emake "${myemakeargs[@]}" man -j1 #nowarn
+ emake "${myemakeargs[@]}" all
+
+}
+
+src_install() {
+ dobin bin/*
+ doman man/*
+ newinitd "${FILESDIR}"/${PN}.initd "${PN}"
+ systemd_dounit containerd.service
+ keepdir /var/lib/containerd
+
+ # we already installed manpages, remove markdown source
+ # before installing docs directory
+ rm -r docs/man || die
+
+ local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. )
+ einstalldocs
+}