# -*- 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/elastic/harp 0.2.11 v
go.offline_build    no
revision            0

categories          security
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

description         Secret management by contract toolchain

long_description    \
    Harp is a tool set to operate secret management by contract. The \
    objective is to reduce the value centric management by handling secret \
    data in a reproducible way by providing a technical stack to describe how \
    your value is managed by contracts and pipelines. Furthermore, we know \
    that naming thing is hard, as a consequence a secret could be \
    consistently associated to a predictable secret identifier used as a key \
    to refer to the secret value. Finally, the secret can hold additional \
    metadata (ownership, rotation period, leak severity, etc.) which can be \
    consumed during the pipeline executions. These key/value associations \
    (path ⇒ value) form a Bundle stored in an immutable file named a \
    Container. This Container acts as a pivot format to allow Harp commands \
    to communicate and create data management pipelines. In addition to that, \
    it provides a template engine used to generate various confidence values \
    (password, passphrase, crypto keys, etc.) and allow more sophisticated \
    rendering operations (configuration files, etc.). Finally, it provides a \
    SDK to allow developers to integrate Harp features in their products, \
    and/or extend the Harp pipeline features by creating new plugins.

checksums           rmd160  7d616bc13700d7777be337cc9fcfaf119b98cad3 \
                    sha256  a84116377a4e770b604bddca9810bac2c679e7e715886ba9993836ef3808f8ac \
                    size    3149692

build.pre_args-append \
    -ldflags \" \
        -s -w \
        -X ${go.package}/build/version.Name=${name} \
        -X ${go.package}/build/version.AppName=${go.package}/cmd/${name}  \
        -X ${go.package}/build/version.Version=v${version} \
        -X ${go.package}/build/version.BuildTags=defaults \
    \"

build.args          ./cmd/${name}

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