# -*- 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/b4nst/clef 0.1.0 v
go.offline_build    no
revision            0

description         CLI secret management

long_description    \
    clef is a simple and secure command-line tool for managing secrets. \
    It was created to help keep sensitive data—like API keys and tokens—out \
    of shell configuration files. Instead of hardcoding values in .bashrc, \
    .zshrc, or similar, you can store and retrieve them safely using clef.

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

fetch.type          git

depends_build-append \
                    port:goreleaser

build {
    system -W ${worksrcpath} \
        {
            goreleaser build    --single-target \
                                --id=darwin-build \
                                --skip=post-hooks \
                                --skip=validate
        }
}

destroot {
    xinstall -m 0755 \
        {*}[glob ${worksrcpath}/dist/*darwin*/${name}] \
        ${destroot}${prefix}/bin/

    xinstall -d ${destroot}${prefix}/share/${name}
    copy ${worksrcpath}/example ${destroot}${prefix}/share/${name}
}
