# Maintainer: Chloe Kudryavtsev pkgname=minio-client _pkgname=mc _pkgver='RELEASE.2019-06-12T20-35-20Z' 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="https://github.com/minio/$_pkgname/archive/$_pkgver.tar.gz" builddir="$srcdir/src/github.com/minio/$_pkgname" options="!check" # tests seem to lag behind code 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() { GO111MODULE=on go test -tags kqueue ./... } package() { install -Dm755 "$builddir"/bin/mc \ "$pkgdir"/usr/bin/mc } cleanup_srcdir() { go clean -modcache default_cleanup_srcdir } sha512sums="28bd395493036f49f384342953140660b0aaed845bca51a9f104f31133cfc82f2e50b93cbfd61db923dfa8d655dff881d9cf36e79a5a5e6abebbb236d4504d02 RELEASE.2019-06-12T20-35-20Z.tar.gz"