sys-cluster/nomad: add nomad with ui support
Package-Manager: Portage-3.0.13, Repoman-3.0.2
This commit is contained in:
parent
c9affa7475
commit
bbe249adb3
6 changed files with 92 additions and 0 deletions
45
sys-cluster/nomad/nomad-1.0.3.ebuild
Normal file
45
sys-cluster/nomad/nomad-1.0.3.ebuild
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Copyright 2020-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit go-module systemd
|
||||
GIT_COMMIT=d79b74c937496a7b94146b3615996652c5d27c58
|
||||
|
||||
DESCRIPTION="A simple and flexible workload orchestrator "
|
||||
HOMEPAGE="https://nomadproject.io"
|
||||
SRC_URI="https://github.com/hashicorp/nomad/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="nvidia ui"
|
||||
|
||||
RESTRICT+=" test"
|
||||
|
||||
src_compile() {
|
||||
local go_ldflags go_tags
|
||||
go_ldflags="-X github.com/hashicorp/nomad/version.GitCommit=${GIT_COMMIT}"
|
||||
go_tags="codegen_generated $(usex nvidia '' 'nonvidia') $(usex ui 'ui' '') release"
|
||||
CGO_ENABLED=1 \
|
||||
go build \
|
||||
-ldflags "${go_ldflags}" \
|
||||
-mod=vendor \
|
||||
-tags "${go_tags}" \
|
||||
-trimpath \
|
||||
-o bin/${PN} || die "compile failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/${PN}
|
||||
systemd_dounit dist/systemd/nomad.service
|
||||
insinto /etc/nomad.d
|
||||
newins dist/client.hcl client.hcl.example
|
||||
newins dist/server.hcl server.hcl.example
|
||||
einstalldocs
|
||||
dodoc CHANGELOG.md
|
||||
keepdir /var/lib/nomad /var/log/nomad
|
||||
newconfd "${FILESDIR}/nomad.confd" nomad
|
||||
newinitd "${FILESDIR}/nomad.initd" nomad
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/nomad.logrotated" nomad
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue