235
|
1 |
# Copyright 2020 Gentoo Authors |
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
|
3 |
|
|
4 |
EAPI=7 |
|
5 |
|
|
6 |
DESCRIPTION="The cluster manager from Hashicorp" |
|
7 |
HOMEPAGE="http://nomadproject.io" |
|
8 |
|
|
9 |
#RESTRICT="strip test" |
|
10 |
|
|
11 |
LICENSE="MPL-2.0" |
|
12 |
SLOT="0" |
|
13 |
KEYWORDS="~amd64" |
|
14 |
IUSE="" |
|
15 |
|
|
16 |
DEPEND="dev-go/go-bindata dev-go/go-bindata-assetfs" |
|
17 |
RDEPEND="${DEPEND} |
|
18 |
acct-group/nomad |
|
19 |
acct-user/nomad |
|
20 |
" |
|
21 |
BDEPEND=">=dev-lang/go-1.14.1" |
|
22 |
EGO_PN="github.com/hashicorp/${PN}" |
|
23 |
EGO_VENDOR=( |
|
24 |
"github.com/kardianos/govendor e31350db9750308ce016ebef8350a8ff1e0a37d0" |
|
25 |
) |
|
26 |
|
|
27 |
inherit golang-vcs-snapshot golang-build |
|
28 |
|
|
29 |
SRC_URI="https://github.com/hashicorp/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz |
|
30 |
$EGO_VENDOR_URI" |
|
31 |
|
|
32 |
src_compile() { |
|
33 |
ego_pn_check |
|
34 |
# for now disable nvidia support |
|
35 |
GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" \ |
|
36 |
GO_TAGS="nonvidia ui release" \ |
|
37 |
emake -C "${S}/src/${EGO_PN}" "pkg/linux_amd64/${PN}" |
|
38 |
} |
|
39 |
|
|
40 |
src_install() { |
|
41 |
dobin "${S}/src/${EGO_PN}/pkg/linux_amd64/${PN}" |
|
42 |
|
|
43 |
local x |
|
44 |
for x in /var/{lib,log}/${PN}; do |
|
45 |
keepdir "${x}" |
|
46 |
fowners ${PN}:${PN} "${x}" |
|
47 |
done |
|
48 |
keepdir "/etc/nomad.d/" |
|
49 |
|
|
50 |
newinitd "${FILESDIR}/${PN}.initd" "${PN}" |
|
51 |
newconfd "${FILESDIR}/${PN}.confd" "${PN}" |
|
52 |
} |