# -*- 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.12 v
go.offline_build    no
go.toolchain_min    1.23.8
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  c3b5feb74b899d04d40ae7f40eb65ec2e89e4746 \
                    sha256  edba6e0fc8c87ea3814b8dce3ce7a61a74ae897d4b00b88f95752b9e8810923e \
                    size    3078183

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/
}
