sys-cluster/nomad/nomad-0.12.8.ebuild
author Da Risk <da_risk@geekorum.com>
Sat, 20 Feb 2021 15:30:24 -0400
changeset 244 dd84d90b2177
parent 238 115a8fb29060
permissions -rw-r--r--
remove pep257-> replaced by pydocstyle
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
238
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     1
# Copyright 2020 Gentoo Authors
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     2
# Distributed under the terms of the GNU General Public License v2
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     3
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     4
EAPI=7
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     5
inherit go-module systemd
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     6
GIT_COMMIT=99fa2774301199ee20e661c7c1832a6ee1d5c553
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     7
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     8
DESCRIPTION="A simple and flexible workload orchestrator "
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
     9
HOMEPAGE="https://nomadproject.io"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    10
SRC_URI="https://github.com/hashicorp/nomad/archive/v${PV}.tar.gz -> ${P}.tar.gz"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    11
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    12
LICENSE="MPL-2.0"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    13
SLOT="0"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    14
KEYWORDS="~amd64"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    15
IUSE="nvidia"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    16
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    17
RESTRICT+=" test"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    18
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    19
src_compile() {
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    20
	local go_ldflags go_tags
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    21
	go_ldflags="-X github.com/hashicorp/nomad/version.GitCommit=${GIT_COMMIT}"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    22
	go_tags="codegen_generated ui $(usex nvidia '' 'nonvidia')"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    23
	CGO_ENABLED=1 \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    24
		go build \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    25
		-trimpath \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    26
		-ldflags "${go_ldflags}" \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    27
		-mod=vendor \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    28
		-tags "${go_tags}" \
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    29
		-o bin/${PN} || die "compile failed"
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    30
}
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    31
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    32
src_install() {
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    33
	dobin bin/${PN}
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    34
	systemd_dounit dist/systemd/nomad.service
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    35
	insinto /etc/nomad.d
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    36
	newins dist/client.hcl client.hcl.example
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    37
	newins dist/server.hcl server.hcl.example
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    38
	einstalldocs
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    39
dodoc CHANGELOG.md
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    40
	keepdir /var/lib/nomad /var/log/nomad
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    41
	newconfd "${FILESDIR}/nomad.confd" nomad
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    42
	newinitd "${FILESDIR}/nomad.initd" nomad
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    43
	insinto /etc/logrotate.d
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    44
	newins "${FILESDIR}/nomad.logrotated" nomad
115a8fb29060 bump sys-cluster nomad
Da Risk <da_risk@geekorum.com>
parents:
diff changeset
    45
}