# -*- 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           github 1.0

maintainers         {@szczad gmail.com:szczad} openmaintainer

github.setup        weaveworks eksctl 0.10.1
github.tarball_from releases

supported_archs     x86_64

categories          sysutils
platforms           darwin
license             Apache-2.0
homepage            https://eksctl.io/

description         Simple CLI tool for creating clusterrs on AWS EKS
long_description    eksctl is a simple CLI tool for creating clusters on EKS - Amazon’s \
                    new managed Kubernetes service for EC2. It is written in Go, uses \
                    CloudFormation, was created by Weaveworks.

distname            eksctl_darwin_amd64
checksums           rmd160  5a4726db622f8a0380b2766c2d2db2d474f501ec \
                    sha256  103f20b6bb2cd40b81ca6ddbc15f67d11a8775f73f00863aa906f96e05b92087 \
                    size    24372206
dist_subdir         ${name}/${version}

extract.mkdir       yes
use_configure       no

build {}

destroot {
    xinstall ${worksrcpath}/eksctl \
        ${destroot}${prefix}/bin/eksctl

    set eksctlCompletionPrefix ${prefix}/share/eksctl/completion
    set bashCompletionPrefix ${prefix}/share/bash-completion/completions

    xinstall -d ${destroot}${eksctlCompletionPrefix}
    exec ${destroot}${prefix}/bin/eksctl completion bash \
        > ${destroot}${eksctlCompletionPrefix}/eksctl.bash

    xinstall -d ${destroot}${bashCompletionPrefix}
    ln -s ${eksctlCompletionPrefix}/eksctl.bash \
        ${destroot}${bashCompletionPrefix}/eksctl.bash
}