# Maintainer: Chloe Kudryavtsev pkgname=minio-client _pkgname=mc _pkgver='RELEASE.2019-12-17T23-26-28Z' 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="ceb95fd6ad31d714160b5c982198b41d917abb2357faf4690d416f73e6ce2e3201b37d6637baaeb6cc00b32c452c04d73aa5cd2787692bf96e07715483f3fc69 mc-RELEASE.2019-12-17T23-26-28Z.tar.gz"