# -*- 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                arping
version             2.26
revision            0
categories          net
maintainers         {snc @nerdling} openmaintainer
license             GPL-2
description         utility to find out if an IP address is already taken on a LAN
long_description    Arping is a util to find out if a specific IP address on \
                    the LAN is 'taken' and what MAC address owns it.

homepage            https://www.habets.pp.se/synscan/programs.php?prog=arping
master_sites        https://www.habets.pp.se/synscan/files/
checksums           rmd160  e24e001069be83fb29163c4a3c84229780e20cfe \
                    sha256  6768d63f861945ceb7875c23b0be27c8657795317d063e004a2f7f81d26979da \
                    size    199320

depends_lib-append  port:libnet \
                    port:libpcap

# See: https://trac.macports.org/wiki/WimplicitFunctionDeclaration#AddnamestowhitelistviaPortfile
configure.checks.implicit_function_declaration.whitelist-append strchr

post-destroot {
    xinstall -m 755 ${worksrcpath}/extra/arping-scan-net.sh \
        ${destroot}${prefix}/sbin/arping-scan-net
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} LICENSE README \
        ${destroot}${prefix}/share/doc/${name}
}

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