# Contributor: Chloe Kudryavtsev # Maintainer: Hoang Nguyen pkgname=minio-client _pkgname=mc pkgver=0.20230721.204427 # 0.20230323.200304 -> 2023-03-23T20-03-04Z _pkgver="${pkgver:2:4}-${pkgver:6:2}-${pkgver:8:2}T${pkgver:11:2}-${pkgver:13:2}-${pkgver:15:2}Z" pkgrel=1 pkgdesc="The MinIO Client" url="https://minio.io/" arch="all" license="AGPL-3.0-or-later" makedepends="go" source="https://github.com/minio/mc/archive/RELEASE.$_pkgver/$pkgname-$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-RELEASE.$_pkgver" # secfixes: # 0.20230111.031416-r0: # - CVE-2022-41717 export CGO_ENABLED=0 export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" export GOFLAGS="$GOFLAGS -modcacherw" build() { local prefix='github.com/minio/mc/cmd' local date=${_pkgver%%T*} local time=${_pkgver#*T} go build -tags kqueue -o bin/mcli -ldflags " -X $prefix.Version=${date}T${time//-/:} -X $prefix.CopyrightYear=${date%%-*} -X $prefix.ReleaseTag=RELEASE.$_pkgver -X $prefix.CommitID=0000000000000000000000000000000000000000 -X $prefix.ShortCommitID=000000000000 " } check() { # mc/cmd is disabled, seems to be outdated and fails on all my systems # shellcheck disable=2046 go test -tags kqueue $(go list ./... | grep -v cmd) } package() { install -Dm755 bin/mcli -t "$pkgdir"/usr/bin/ } sha512sums=" 1abc2847d23e02f29d88ed939d83c37ddaa45edb1848100a4c07c0fb55b41ab1981b1544aba06c59d8f31971fdb913f29be72d0858c60eea5890985a206527c9 minio-client-2023-07-21T20-44-27Z.tar.gz "