blob: 8878c4ed79c4cc1ed093ed9ababcf731997f9a8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit shell-completion go-module
MY_PV=${PV/_/-}
# update this on every bump
GIT_COMMIT=d8eb465f86cfceeb57f8582e373d41a558d35503
# To create the man pages tarball, run the following in the git source
# directory:
#git checkout ${PV}
# make manpages
# tar -acf ${P}-man.tar.xz man/man?
DESCRIPTION="the command line binary for docker"
HOMEPAGE="https://www.docker.com/"
SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/cli-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="hardened selinux"
RDEPEND="selinux? ( sec-policy/selinux-docker )"
RESTRICT="installsources strip test"
src_unpack() {
default
cd "${S}"
ln -s vendor.mod go.mod
ln -s vendor.sum go.sum
}
src_prepare() {
default
sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
}
src_compile() {
export DISABLE_WARN_OUTSIDE_CONTAINER=1
# setup CFLAGS and LDFLAGS for separate build target
# see https://github.com/tianon/docker-overlay/pull/10
CGO_CFLAGS+=" -I${ESYSROOT}/usr/include"
CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)"
emake \
LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
VERSION="${PV}" \
GITCOMMIT="${GIT_COMMIT}" \
dynbinary manpages
}
src_install() {
dobin build/docker
doman man/man?/*
dobashcomp contrib/completion/bash/docker
bashcomp_alias docker dockerd
dofishcomp contrib/completion/fish/docker.fish
dozshcomp contrib/completion/zsh/_*
}
pkg_postinst() {
has_version "app-containers/docker-buildx" && return
ewarn "the 'docker build' command is deprecated and will be removed in a"
ewarn "future release. If you need this functionality, install"
ewarn "app-containers/docker-buildx."
}
|