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

name            scanssh
version         2.1
revision        3
categories      net security
license         BSD BSD-old ISC
maintainers     nomaintainer
description     scanner for finding ssh servers and their software version
long_description \
                scanssh protocol scanner scans a list of addresses and \
                networks for running SSH protocol servers and their \
                version numbers. scanssh protocol scanner supports \
                random selection of IP addresses from large network \
                ranges and is useful for gathering statistics on the \
                deployment of SSH protocol servers in a company or the \
                Internet as whole.

homepage        http://monkey.org/~provos/scanssh/
master_sites    http://monkey.org/~provos/
checksums       md5 9fab4253b56b2d15367d4872b370cdcb

depends_lib     port:libpcap \
                port:libdnet \
                port:libevent

configure.args  --mandir=${prefix}/share/man

patchfiles      patch-implicit.diff \
                CFLAGS.patch

# Update config.guess and config.sub to be able to build on arm64.
depends_build-append    port:automake
post-patch {
    set automake_dirs [glob -directory ${prefix}/share automake-*]
    set automake_dir [lindex [lsort -command vercmp $automake_dirs] end]
    copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \
        ${worksrcpath}
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
}
