aboutsummaryrefslogtreecommitdiffstats
path: root/testing/minio/APKBUILD
blob: 1342b66994b4db3e7583119b2ff0c84819c6540b (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=minio
_pkgver='RELEASE.2019-03-27T22-35-21Z'
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
	https://github.com/minio/minio/archive/$_pkgver.tar.gz
	"
builddir="$srcdir/src/github.com/minio/$pkgname"
options="!check" # pkg/disk fails with "disk_test.go:42: Unexpected FSType UNKNOWN"
subpackages="$pkgname-openrc"

export GOPATH="$srcdir"
export CGO_ENABLED=0

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$_pkgver "$builddir"/
	cd "$builddir"
	default_prepare
}

build() {
	cd "$builddir"
	local _ldflags=$(go run buildscripts/gen-ldflags.go 2> /dev/null)
	go build -tags kqueue --ldflags "$_ldflags" -o bin/minio
}

check() {
	cd "$builddir"
	go test -tags kqueue ./...
}

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"
}

sha512sums="18e55dc143c0d71afa8ba758de2efde40946704de65d7a53bfb5f2162fedc736a3f596d0fa75e514cb615e3bbf65809a60bd4b1c2fa22be39d18613d7ab42395  minio.initd
ed9790fbadfb38e4d660eb1befd87e803d70dec04d936e8cd26def4a9c21240bb7cae8750ae3395aa4761e6738b9e346c86ba57761cfde30efe46d2cb459a7e4  minio.confd
1fce454f0cbbb90bd8fff48c20a3a93cac464ea8dda1acb5687a566a5db641e912ff57a9b8e73192df5a7eb896f265945da734f89cf6c57dc9e2a0c8554f8d10  RELEASE.2019-03-27T22-35-21Z.tar.gz"