# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/hashicorp/nomad 1.9.4 v
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            0

homepage            https://www.nomadproject.io

description         \
    Nomad is an open source scheduler for scheduling virtualized, \
    containerized, and standalone applications.

long_description    \
    Nomad is a flexible container orchestration tool that enables an \
    organization to easily deploy and manage any containerized or legacy \
    application using a single, unified workflow. Nomad can run a diverse \
    workload of Docker, non-containerized, microservice, and batch \
    applications.

categories          net
installs_libs       no
# Hasicorp Business Source License
license             Commercial Permissive
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

# Nomad's build process requires the git repository.
fetch.type          git

# The "dev" build target must be used to build just the binary for this
# platform, instead of for ALL platforms
# - https://www.nomadproject.io/docs/install/index.html#compiling-from-source
build.cmd           make
build.target        bootstrap
build.post_args     dev
build.env           GOPATH=${workpath} PATH=$env(PATH):${workpath}/bin
use_configure       no
# Bootstrap target must run before dev, so we disable parallel building.
use_parallel_build  no

destroot {
    xinstall -m 0755 ${workpath}/bin/${name} ${destroot}${prefix}/bin/${name}
}

github.livecheck.regex \
                    {([0-9.]+)}
