app-emulation/containerd: update HOMEPAGE, metadata
[gentoo.git] / app-emulation / containerd / containerd-1.3.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 EGO_PN="github.com/containerd/${PN}"
6
7 inherit toolchain-funcs
8
9 if [[ ${PV} == *9999 ]]; then
10         inherit golang-vcs
11 else
12         MY_PV="${PV/_rc/-rc.}"
13         EGIT_COMMIT="v${MY_PV}"
14         CONTAINERD_COMMIT="c7a4f87"
15         SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
16         KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
17         inherit golang-vcs-snapshot
18 fi
19
20 DESCRIPTION="A daemon to control runC"
21 HOMEPAGE="https://containerd.io/"
22
23 LICENSE="Apache-2.0"
24 SLOT="0"
25 IUSE="apparmor +btrfs +cri hardened +seccomp"
26
27 DEPEND="btrfs? ( sys-fs/btrfs-progs )
28         seccomp? ( sys-libs/libseccomp )"
29 RDEPEND=">=app-emulation/runc-1.0.0_rc9
30         seccomp? ( sys-libs/libseccomp )"
31
32 S=${WORKDIR}/${P}/src/${EGO_PN}
33
34 RESTRICT="test"
35
36 src_prepare() {
37         default
38         if [[ ${PV} != *9999* ]]; then
39                 sed -i -e "s/git describe --match.*$/echo ${PV})/"\
40                         -e "s/git rev-parse HEAD.*$/echo $CONTAINERD_COMMIT)/"\
41                         -e "s/-s -w//" \
42                         Makefile || die
43         fi
44 }
45
46 src_compile() {
47         local options=( $(usex btrfs "" "no_btrfs") $(usex cri "" "no_cri") $(usex seccomp "seccomp" "") $(usex apparmor "apparmor" "") )
48         export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor
49         LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') BUILDTAGS="${options[@]}" emake
50 }
51
52 src_install() {
53         newinitd "${FILESDIR}"/${PN}.initd ${PN}
54         keepdir /var/lib/containerd
55         dobin bin/*
56 }