# -*- 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
# $Id: Portfile 103845 2013-03-08 21:45:03Z cal@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0

name                libssh
epoch               1
version             0.5.4
set major           [join [lrange [split ${version} .] 0 1] .]
categories          devel security net
platforms           darwin
maintainers         cal openmaintainer
license             LGPL-2.1

description         an SSH library

long_description    The ssh library was designed to be used by \
                    programmers needing a working SSH implementation \
                    by the mean of a library.

homepage            http://www.libssh.org
master_sites        https://red.libssh.org/attachments/download/41

checksums           rmd160  a134cb99f57c544cd31d43bf28506b42b27131e2 \
                    sha256  5f3825caebf7c47e6c6025aa048cb967e32c2b6cbfdc04109f05a35cbf4dca80

depends_lib         port:openssl \
                    port:zlib

post-extract {
    file mkdir ${workpath}/build
}

# standard post-arg, where to find the primary CMakeLists.txt file.
configure.post_args ../${distname}
configure.dir       ${workpath}/build
configure.args-append \
                    -DWITH_GCRYPT=OFF \
                    -DWITH_INTERNAL_DOC=OFF \
                    -DWITH_LIBZ=ON
build.dir           ${workpath}/build

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name} (\\d+\\.\\d+(\\.\\d+)+)
