aboutsummaryrefslogblamecommitdiffstats
path: root/testing/minio/APKBUILD
blob: 1c3aef00e66b15fb857c5879e0bef86796d3e0ef (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                           
                                                     
             
                                      


                     
        
                                                                        

                 


                       
                           
                




                                                              
                                                




                                                                                   

           



                                                   


         
                      
                                                                         
                                                                               

 




                                  


                                              



                                                   

 




                              
                                                                                                                                                         
                                                                                                                                             
                                                                                                                                                                      
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=minio
_pkgver='RELEASE.2019-05-14T23-57-45Z'
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)
	GO111MODULE=on 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"
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="ee2881200295cb638a55eb58b27c10752f1c0eec8fd1b60c1d4457b494c1b5b4b43de9953de4f92d54cdf41d3ec86158e8ae9ad2dffbc590dfda30332b02e2a9  minio.initd
ed9790fbadfb38e4d660eb1befd87e803d70dec04d936e8cd26def4a9c21240bb7cae8750ae3395aa4761e6738b9e346c86ba57761cfde30efe46d2cb459a7e4  minio.confd
494e31bcdf32134e0e2f1477b46aa4aeb1579d599c58c46d28eaf9e61b023c976c61206f92734b075730b67322a35d01529728a25c51f22d324d2aa211ad8be8  RELEASE.2019-05-14T23-57-45Z.tar.gz"