void-packages/srcpkgs/nomad/template

36 lines
1.0 KiB
Bash

# Template file for 'nomad'
pkgname=nomad
version=0.8.6
revision=1
build_style=go
go_import_path="github.com/hashicorp/nomad"
hostmakedepends="git govendor"
short_desc="Cluster scheduler designed to easily integrate into existing workflows"
maintainer="iaroki <iaroki@protonmail.com>"
license="MPL-2.0"
homepage="https://www.nomadproject.io/"
distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
checksum=e69b447dcc2caeb3d5ecf904cf3c8f327a5185a84442ee4241a796d89f96e143
patch_args="-Np1"
pre_build() {
# NOTE: This can probably be removed in nomad 0.9.x if Hashicorp updates
# their golang.org/x/crypto/blake2b dependency.
cd "$GOSRCPATH"
govendor fetch golang.org/x/sys/cpu@1b2967e3c290b7c545b3db0deeda16e9be4f98a2
govendor fetch golang.org/x/crypto/blake2b@de0752318171da717af4ce24d0a2e8626afaeb11
cd -
}
do_build() {
: ${go_package:=$go_import_path}
go build -o bin/nomad -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
}
do_install() {
vbin bin/nomad
vlicense LICENSE
vsconf dist/server.hcl
vsconf dist/client.hcl
}