commit:     c2c94fa938ba982886433103d4d64b242d25111f
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  4 23:00:59 2021 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Jan  4 23:08:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2c94fa9

app-emulation/docker-cli: new package, docker command line binary

Starting with docker-20.10.1, the "docker" command line binary has been
split into this package by upstream.

Bug: https://bugs.gentoo.org/762520
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 app-emulation/docker-cli/Manifest                  |  1 +
 app-emulation/docker-cli/docker-cli-20.10.1.ebuild | 63 ++++++++++++++++++++++
 app-emulation/docker-cli/metadata.xml              |  8 +++
 3 files changed, 72 insertions(+)

diff --git a/app-emulation/docker-cli/Manifest 
b/app-emulation/docker-cli/Manifest
new file mode 100644
index 00000000000..191059685e0
--- /dev/null
+++ b/app-emulation/docker-cli/Manifest
@@ -0,0 +1 @@
+DIST docker-cli-20.10.1.tar.gz 7705467 BLAKE2B 
e1bbca2a0bf4e8a78600f8c4090d20f6ce173fe8efa9609048771312afb420b9176257d0540a8dc0700c02fb0c117cfdbb0c8ffc6f81049c62b78417b1b18d14
 SHA512 
47d15647db2a4ca6de29ba1d67aa198b9baa4af9ccf08e92e2a7222f28391567f8a2f6beeb4d8d80fa16a05ce8902de16b8951da2a34cbed9e27c72e0443c3e8

diff --git a/app-emulation/docker-cli/docker-cli-20.10.1.ebuild 
b/app-emulation/docker-cli/docker-cli-20.10.1.ebuild
new file mode 100644
index 00000000000..6349b29fa6a
--- /dev/null
+++ b/app-emulation/docker-cli/docker-cli-20.10.1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+GIT_COMMIT=831ebeae96
+EGO_PN="github.com/docker/cli"
+inherit bash-completion-r1  golang-vcs-snapshot
+
+DESCRIPTION="the command line binary for docker"
+HOMEPAGE="https://www.docker.com/";
+MY_PV=${PV/_/-}
+SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="hardened"
+
+RDEPEND="!<app-emulation/docker-20.10.1"
+
+RESTRICT="installsources strip"
+
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+src_prepare() {
+       default
+       sed -i 's@dockerd\?\.exe@@g' contrib/completion/bash/docker || die
+       sed -i 's@md2man@go-md2man@' man/md2man-all.sh || die
+}
+
+src_compile() {
+       export DISABLE_WARN_OUTSIDE_CONTAINER=1
+       export GOPATH="${WORKDIR}/${P}"
+       # setup CFLAGS and LDFLAGS for separate build target
+       # see https://github.com/tianon/docker-overlay/pull/10
+       export CGO_CFLAGS="-I${ROOT}/usr/include"
+       export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
+               emake \
+               LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
+               VERSION="$(cat VERSION)" \
+               GITCOMMIT="${GIT_COMMIT}" \
+               dynbinary
+
+       # build man pages
+       # see "cli/scripts/docs/generate-man.sh" (which also does "go get" for 
go-md2man)
+       go build -o "${T}"/gen-manpages ./man ||
+               die 'build gen-manpages failed'
+       "${T}"/gen-manpages --root "$(pwd)" --target "$(pwd)"/man/man1 ||
+               die 'gen-manpages failed'
+       ./man/md2man-all.sh -q ||
+               die 'md2man-all.sh failed'
+}
+
+src_install() {
+       dobin build/docker
+       doman man/man*/*
+       dobashcomp contrib/completion/bash/*
+       bashcomp_alias docker dockerd
+       insinto /usr/share/fish/vendor_completions.d/
+       doins contrib/completion/fish/docker.fish
+       insinto /usr/share/zsh/site-functions
+       doins contrib/completion/zsh/_*
+}

diff --git a/app-emulation/docker-cli/metadata.xml 
b/app-emulation/docker-cli/metadata.xml
new file mode 100644
index 00000000000..3c49bd23955
--- /dev/null
+++ b/app-emulation/docker-cli/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>willi...@gentoo.org</email>
+                       <name>William Hubbs</name>
+                               </maintainer>
+                                       </pkgmetadata>

Reply via email to