blob: c70304d47ce6de130d2f574f7047e0e5782233eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=minio-client
_pkgname=mc
_pkgver='RELEASE.2019-07-24T02-55-56Z'
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="f72e3f05f2c6325d0fdf2f7cea047eb93411ccb47ea3b74184690c97dc2b91a7066796bc3b1a0ee5f62389a8ea532860adfcdb2c4718ac1677df23257ef9db12 mc-RELEASE.2019-07-24T02-55-56Z.tar.gz"
|