# Maintainer: Chloe Kudryavtsev pkgname=minio-client _pkgname=mc _pkgver='RELEASE.2019-08-21T19-59-10Z' 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/src/github.com/minio/$_pkgname" options="net" export GOPATH="$srcdir" export CGO_ENABLED=0 prepare() { mkdir -p ${builddir%/*} mv "$srcdir"/$_pkgname-$_pkgver "$builddir"/ default_prepare } build() { local _ldflags=$(go run buildscripts/gen-ldflags.go 2> /dev/null) GO111MODULE=on go build -tags kqueue --ldflags "$_ldflags" -o bin/mc } check() { # mc/cmd is disabled, seems to be outdated and fails on all my systems GO111MODULE=on go test -tags kqueue $(go list ./... | grep -v \ -e cmd \ ) } package() { install -Dm755 "$builddir"/bin/mc \ "$pkgdir"/usr/bin/mc } cleanup_srcdir() { go clean -modcache default_cleanup_srcdir } sha512sums="7e802f95c3b85ccdc31e4e1093953fa348f0935b6c85de6d5263aeba8489611bfb702a17e7c36abccadbcd558480c8b64be463dfe76d67e1e7570586db6e97c9 mc-RELEASE.2019-08-21T19-59-10Z.tar.gz"