aboutsummaryrefslogtreecommitdiffstats
path: root/testing/minio/APKBUILD
blob: 2f3a8175fd47244e008610b8232eff23a72590fd (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=minio
_pkgver='RELEASE.2019-08-21T19-40-07Z'
pkgver=${_pkgver#*.}
pkgver=${pkgver%T*}
pkgver=0.${pkgver//-}
pkgrel=0
pkgdesc="An open source object storage server compatible with Amazon S3"
pkgusers="minio"
pkggroups="minio"
url="https://minio.io/"
arch="all"
license="Apache-2.0"
install="minio.pre-install"
makedepends="go"
source="
	minio.initd
	minio.confd
	$pkgname-$pkgver.tar.gz::https://github.com/minio/minio/archive/$_pkgver.tar.gz
	"
builddir="$srcdir/src/github.com/minio/$pkgname"
options="net"
subpackages="$pkgname-openrc"

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/minio
}

check() {
	# pkg/disk: doesn't know what btrfs is
	# pkg/s3select: fails on 32bit systems
	GO111MODULE=on go test -tags kqueue $(go list ./... | grep -v \
		-e pkg/disk \
		-e pkg/s3select
		)
}

package() {
	install -Dm755 "$builddir"/bin/minio \
		"$pkgdir"/usr/bin/minio
	install -Dm755 "$srcdir"/"$pkgname".initd \
		"$pkgdir"/etc/init.d/"$pkgname"
	install -Dm644 "$srcdir"/"$pkgname".confd \
		"$pkgdir"/etc/conf.d/"$pkgname"
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="6427a225d4e6c51cc5de077ccd29ddf52556722cf958e83e480df1c5882aa4fa7daebfeb970e80f8f9c3176594d8e427e8c8dbf268ce945647a11bdf1e69affd  minio.initd
ed9790fbadfb38e4d660eb1befd87e803d70dec04d936e8cd26def4a9c21240bb7cae8750ae3395aa4761e6738b9e346c86ba57761cfde30efe46d2cb459a7e4  minio.confd
f66a746a3155ab20054e70b48aac035000bb590adda63e74520eb6da54a37e11c978b3528238cfe90ed5ce9270e93b2951a513b261e1ed4d7360fc6e082450c7  minio-0.20190821.tar.gz"