blob: e82729b8ab3a89add76a2d378fe608a92edbbb04 (
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
|
# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="the spiffe runtime environment"
HOMEPAGE="https://github.com/spiffe/spire"
SRC_URI="https://github.com/spiffe/spire/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
COMMON_DEPEND="acct-group/spire
acct-user/spire"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
src_prepare() {
default
sed -i -e 's/build:.*tidy/build:/' Makefile
}
src_compile() {
emake build
}
src_test() {
go test ./... || die "tests failed"
}
src_install() {
exeinto /opt/spire
doexe bin/*
keepdir /opt/spire/.data
insinto /etc/spire
doins -r conf/*
dosym ../../etc/spire /opt/spire/conf
dosym ../../opt/spire/spire-agent /usr/bin/spire-agent
dosym ../../opt/spire/spire-server /usr/bin/spire-server
dodoc -r doc/*
newconfd "${FILESDIR}"/spire-agent.confd spire-agent
newinitd "${FILESDIR}"/spire-agent.initd spire-agent
newconfd "${FILESDIR}"/spire-server.confd spire-server
newinitd "${FILESDIR}"/spire-server.initd spire-server
keepdir /var/log/spire
fowners spire:spire /opt/spire/.data
fowners spire:spire /var/log/spire
}
|