blob: 298498909a93513e5e0942927c9ceef495e6de9d (
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
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
MY_PN="buildx"
DESCRIPTION="Docker CLI plugin for extended build capabilities with BuildKit"
HOMEPAGE="https://github.com/docker/buildx"
SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
DEPEND="app-containers/docker"
RDEPEND="${DEPEND}"
src_compile() {
local _buildx_r='github.com/docker/buildx'
ego build -mod=vendor -o docker-buildx \
-ldflags "-linkmode=external \
-X $_buildx_r/version.Version=${PV} \
-X $_buildx_r/version.Revision=$(date -u +%FT%T%z) \
-X $_buildx_r/version.Package=$_buildx_r" \
./cmd/buildx
}
src_test() {
ego test ./...
}
src_install() {
exeinto /usr/libexec/docker/cli-plugins
doexe docker-buildx
dodoc README.md
}
|