# -*- 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               openssl 1.0
PortGroup               cmake 1.1

github.setup            3proxy 3proxy 1.0.2
github.tarball_from     archive
revision                0
categories              net
license                 BSD GPL-2+ LGPL-2.1+ Apache
maintainers             {mail.ru:nano103 @nano103} openmaintainer

description             tiny free proxy server

long_description        3proxy is a universal proxy server. It can be used \
                        to provide internal users with fully controllable \
                        access to external resources or to provide external \
                        users with access to internal resources.

homepage                https://3proxy.ru/

checksums               rmd160  1ad44011fd8e0fd2a7c7be63dcdd6a58bcfdafba \
                        sha256  dd138c975f5019149e8ba3509e04c2581e56e81db70b39eb4a47552eca045184 \
                        size    598474

depends_lib-append      port:pcre2

configure.args-append   -DCMAKE_INSTALL_SYSCONFDIR=${prefix}/etc

# 1.0 turns the FTP and mail proxies off by default; keep building them
configure.args-append   -D3PROXY_USE_FTP=ON \
                        -D3PROXY_USE_MAILPROXY=ON \
                        -D3PROXY_BUILD_FTPPR=ON \
                        -D3PROXY_BUILD_IMAPP=ON \
                        -D3PROXY_BUILD_POP3P=ON \
                        -D3PROXY_BUILD_SMTPP=ON

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} copying README.md \
        ${destroot}${prefix}/share/doc/${name}
}

github.livecheck.regex  {(\d+(?:.\d+)*)}
