27 lines
947 B
Plaintext
27 lines
947 B
Plaintext
# Description: Docker CLI plugin for extended build capabilities with BuildKit
|
|
# URL: https://github.com/docker/buildx/
|
|
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
|
# Depends on: docker
|
|
|
|
name=docker-buildx
|
|
version=0.12.1
|
|
release=1
|
|
source=(https://github.com/docker/buildx/archive/v${version}/$name-$version.tar.gz)
|
|
|
|
build() {
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
|
export GO111MODULE=on
|
|
|
|
cd buildx-$version
|
|
go build -mod=vendor -o docker-buildx -ldflags "-linkmode=external \
|
|
-X github.com/docker/buildx/version.Version=$version \
|
|
-X github.com/docker/buildx/version.Revision=30feaa1a915b869ebc2eea6328624b49facd4bfb \
|
|
-X github.com/docker/buildx/version.Package=github.com/docker/buildx" \
|
|
./cmd/buildx
|
|
install -Dm755 $name $PKG/usr/lib/docker/cli-plugins/$name
|
|
}
|