# Maintainer: Chloe Kudryavtsev pkgname=minio-client _pkgname=mc _pkgver='RELEASE.2020-04-25T00-43-23Z' pkgver=${_pkgver#*.} pkgver=${pkgver%T*} pkgver=0.${pkgver//-} pkgrel=0 pkgdesc="The MinIO Client" url="https://minio.io/" arch="all" license="Apache-2.0" makedepends="go" source="$_pkgname-$pkgver.tar.gz::https://github.com/minio/$_pkgname/archive/$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-$_pkgver" options="net" export GOPATH="$srcdir" export CGO_ENABLED=0 build() { local _ldflags=$(go run buildscripts/gen-ldflags.go 2> /dev/null) go build -tags kqueue --ldflags "$_ldflags" -o bin/mc } check() { # mc/cmd is disabled, seems to be outdated and fails on all my systems go test -tags kqueue $(go list ./... | grep -v \ -e cmd \ ) } package() { install -Dm755 "$builddir"/bin/mc \ "$pkgdir"/usr/bin/mcli } cleanup_srcdir() { go clean -modcache default_cleanup_srcdir } sha512sums="a57d57c948fd661b2676c94edb241d3eab8294458e2dfa3f012a4d94ad773461e16dac47bde89fda0ec08c3129dbe6734daa30a21b7090e9c4f08e9d45d70039 mc-0.20200425.tar.gz"