# -*- 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/cloudflare/cfssl 1.6.5 v
revision            0

homepage            https://cfssl.org

description         Cloudflare's PKI and TLS toolkit

long_description    CFSSL is CloudFlare's PKI/TLS swiss army knife. It is \
                    both a command line tool and an HTTP API server for \
                    signing, verifying, and bundling TLS certificates. \
                    CFSSL consists of: a set of packages useful for \
                    building custom TLS PKI tools, the cfssl program - the \
                    canonical command line utility using the CFSSL \
                    packages, the multirootca program - a certificate \
                    authority server that can use multiple signing keys, \
                    the mkbundle program - used to build certificate pool \
                    bundles, the cfssljson program - which takes the JSON \
                    output from the cfssl and multirootca programs and writes \
                    certificates, keys, CSRs, and bundles to disk.

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

# Dependencies are already vendored in source, go.vendors not needed
checksums           rmd160  ab96c118b17efcc8d5d6d9a255d0530d8298a45c \
                    sha256  b682452402f403b6ee668bb042bd9b753fe48df84fa7a18a1c32606ffd4918af \
                    size    8164981

build.cmd           make
build.pre_args      VERSION=${version}
build.args          all

destroot {
    foreach cfssl_bin [glob ${worksrcpath}/bin/*] {
        xinstall -m 0755 ${cfssl_bin} ${destroot}${prefix}/bin/
    }

    # Build process builds rice which is used as part of the build process,
    # but rice is not part of cfssl.
    file delete ${destroot}${prefix}/bin/rice
}