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

github.setup        mtrojnar osslsigncode 2.2
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          devel security
maintainers         nomaintainer
license             GPL-3

description         OpenSSL-based signcode utility

long_description    Platform-independent tool for Authenticode signing of \
                    PE(EXE/SYS/DLL/etc), CAB and MSI files - uses OpenSSL \
                    and libcurl. It also supports timestamping (Authenticode \
                    and RFC3161).

checksums           md5     f282db8589787ea05c6f926acac95e59 \
                    sha1    bddf6bc2557b8635f1841da355e8c331d513c341 \
                    rmd160  1297ce5f1bb62ad4ddbd2382a1f0780c5a20cb49 \
                    sha256  a828f5d46b8d378f46110975f9aa3f5cb9c38461b5649472b4df253c86df6eb8 \
                    size    87701

use_autoreconf        yes

configure.args      --with-curl

depends_build-append \
                    port:pkgconfig

depends_lib         port:curl \
                    path:lib/libssl.dylib:openssl

if {${subport} eq ${name}} {
    conflicts       osslsigncode-devel
}

subport osslsigncode-devel {
    github.setup    mtrojnar osslsigncode 18810b7e0bb1d8e0d25b6c2565a065cf66bce5d7
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    version         20190728

    checksums       md5     cfb74a6ab726142ae7409435e510eeb2 \
                    sha1    3bca3693c1f12547bf6c30f07d722d726fa91f93 \
                    rmd160  ed3bfe6eafc7b08a1a948cc15085a49cbd7d8b90 \
                    sha256  32c06d9e4689cdf100ac740dfd170f569f6e928e6ca8e4e1565680936acc5e68 \
                    size    67647

    conflicts       osslsigncode
}
