aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker-cli-buildx/APKBUILD
blob: 5f3d9aa0140394afc99348b421afec121724aadb (plain) (blame)
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=6224def4dd2c3d347eee19db595348c50d7cb491
pkgver=0.8.2
pkgrel=4
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="
2fe0280391d6bd4589d125e2f8a951320619d5635ce3dd0c9e06ca95e6025ab4e410a6e72e29b54a5546714a0c4c238084cdec290dfe342d739bec06681c8d4d  buildx-0.8.2.tar.gz
"