maintainer="Michał Polański <michal@polanski.me>"
pkgname=warp-s3
pkgver=1.0.6
pkgrel=0
pkgdesc="Benchmarking tool for S3"
url="https://github.com/minio/warp"
license="AGPL-3.0"
arch="all !armhf !armv7 !x86" # tests fail on 32-bit architectures
makedepends="go"
options="net"
source="https://github.com/minio/warp/archive/v$pkgver/warp-s3-$pkgver.tar.gz"
builddir="$srcdir/warp-$pkgver"

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

build() {
	go build \
		-ldflags "-X github.com/minio/warp/pkg.Version=$pkgver" \
		-o warp-s3
}

check() {
	go test ./...
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
f8657186eae7ffb6d568d92b558fd196a0abe357fb1983de8995dd9cb9c0ea695973aad16fef545c8734a0ce534e001f1e4f9742e14016db752105441a386da4  warp-s3-1.0.6.tar.gz
"
