53 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
# Copyright 1999-2025 Gentoo Authors
 | 
						|
# Distributed under the terms of the GNU General Public License v2
 | 
						|
 | 
						|
EAPI=8
 | 
						|
 | 
						|
inherit go-module
 | 
						|
 | 
						|
MY_PV="$(ver_cut 1-3)T$(ver_cut 4-7)Z"
 | 
						|
MY_PV=${MY_PV//./-}
 | 
						|
YEAR="$(ver_cut 1)"
 | 
						|
COMMIT_ID=d0cada583fce88f60cb276ddfb06f5cb16820069
 | 
						|
 | 
						|
DESCRIPTION="An Amazon S3 compatible object storage server"
 | 
						|
HOMEPAGE="https://github.com/minio/minio"
 | 
						|
SRC_URI="https://github.com/minio/minio/archive/RELEASE.${MY_PV}.tar.gz -> ${P}.tar.gz"
 | 
						|
SRC_URI+=" https://people.znc.in/~dessa/gentoo/${P}-vendor.tar.xz"
 | 
						|
 | 
						|
S="${WORKDIR}/${PN}-RELEASE.${MY_PV}"
 | 
						|
LICENSE="Apache-2.0 BSD MIT MPL-2.0"
 | 
						|
SLOT="0"
 | 
						|
KEYWORDS="~amd64"
 | 
						|
RESTRICT="test" # bug #927667, fails with network-sandbox
 | 
						|
 | 
						|
DEPEND="
 | 
						|
	acct-user/minio
 | 
						|
	acct-group/minio
 | 
						|
"
 | 
						|
 | 
						|
src_compile() {
 | 
						|
	# go run buildscripts/gen-ldflags.go
 | 
						|
	local ldflags="-s -w \
 | 
						|
		-X github.com/minio/minio/cmd.Version=${MY_PV} \
 | 
						|
		-X github.com/minio/minio/cmd.CopyrightYear=${YEAR} \
 | 
						|
		-X github.com/minio/minio/cmd.ReleaseTag=RELEASE.${MY_PV} \
 | 
						|
		-X github.com/minio/minio/cmd.CommitID=${COMMIT_ID}"
 | 
						|
	ego build -trimpath --ldflags "${ldflags}"
 | 
						|
}
 | 
						|
 | 
						|
src_install() {
 | 
						|
	dobin minio
 | 
						|
 | 
						|
	insinto /etc/default
 | 
						|
	doins "${FILESDIR}"/minio.default
 | 
						|
 | 
						|
	dodoc README.md CONTRIBUTING.md
 | 
						|
 | 
						|
	systemd_dounit "${FILESDIR}"/minio.service
 | 
						|
	newinitd "${FILESDIR}"/minio.initd minio
 | 
						|
 | 
						|
	keepdir /var/{lib,log}/minio
 | 
						|
	fowners minio:minio /var/{lib,log}/minio
 | 
						|
}
 |