# -*- 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
PortGroup           qmake5 1.0

github.setup        openconnect openconnect-gui 1.3 v
revision            1
categories          net
platforms           darwin
maintainers         nomaintainer
license             GPL-2+

description         GUI client for openconnect VPN
long_description    ${description}

depends_lib-append  port:gnutls \
                    port:openconnect

depends_run         port:vpnc-scripts

checksums           rmd160  2ee0a3bf301b3c9af6bb3b7663875afea6f0a307 \
                    sha256  7377a5e3de6e5b0764723d66fbd0a1d8b380ddbb5b3862714197a4ba47ee8982

patchfiles          patch-common_h.diff

post-patch {
    reinplace -E "s|@PREFIX@|${prefix}|" ${worksrcpath}/common.h
}

destroot {
    copy "${worksrcpath}/openconnect-gui.app" ${destroot}${applications_dir}
}

livecheck.url       https://github.com/openconnect/openconnect-gui/releases
livecheck.regex     v(\[0-9.\]+)${extract.suffix}