aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker-cli-buildx/APKBUILD
blob: 879a560aafa9a425a22b15f9d3e8ebf7674f274e (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
# Contributor: Jake Buchholz Göktürk <tomalok@gmail.com>
# Maintainer: Jake Buchholz Göktürk <tomalok@gmail.com>
pkgname=docker-cli-buildx
_commit=ed00243a0ce2a0aee75311b06e32d33b44729689
pkgver=0.9.1
pkgrel=0
pkgdesc="A Docker CLI plugin for extended build capabilities"
url="https://docs.docker.com/engine/reference/commandline/buildx_build"
arch="all"
license="Apache-2.0"
depends="docker-cli"
makedepends="go"
options="net"
source="buildx-$pkgver.tar.gz::https://github.com/docker/buildx/archive/v$pkgver.tar.gz"

_buildx_installdir="/usr/libexec/docker/cli-plugins"

builddir="$srcdir"/buildx-"$pkgver"

export GOCACHE="$srcdir/go-cache"
export GOTMPDIR="$srcdir"
export GOMODCACHE="$srcdir/go"

build() {
	PKG=github.com/docker/buildx
	local ldflags="-X $PKG/version.Version=v$pkgver -X $PKG/version.Revision=$_commit -X $PKG/version.Package=$PKG"
	go build -modcacherw -ldflags "$ldflags" -o docker-buildx ./cmd/buildx
}

check() {
	# filecount tests are excluded because they depend on exact file sizes
	# which depend on filesystem used.
	local pkgs="$(go list -modcacherw ./... | grep -Ev '(plugins/inputs/filecount)')"
	go test -modcacherw -short $pkgs
	./docker-buildx version
}

package() {
	install -Dm755 docker-buildx "$pkgdir$_buildx_installdir"/docker-buildx
}

sha512sums="
1d672ae9daa0f1c830fc56c2c3638389312a87c645aed97f4a0ee56eaef936ab833c04d11969a423e0d5ab5388f29db20d7a1fe6c9b0ec7d981123243b4eaa4b  buildx-0.9.1.tar.gz
"