# Contributor: Jake Buchholz Göktürk # Maintainer: Jake Buchholz Göktürk pkgname=docker-cli-buildx pkgver=0.11.2 pkgrel=1 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" 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="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${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 -v -modcacherw -ldflags "$ldflags" -o docker-buildx ./cmd/buildx } check() { # bake and gitutil tests do not succeed inside abuild environment local pkgs="$(go list -modcacherw ./... | grep -Ev '(bake|gitutil)')" go test -modcacherw -short $pkgs ./docker-buildx version } package() { # this is circular to have top-level, so depend on it in package itself depends="docker-cli" install -Dm755 docker-buildx "$pkgdir$_buildx_installdir"/docker-buildx } sha512sums=" 6f3718edf1e86c4422e1419580e4c38cf378a59555067be2aa6fac3e7f8878afe39d777765ace274cd9c47630f39cbacfacfdc4ecadd6ff46d5ee37d8f9bc75c buildx-0.11.2.tar.gz "