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

github.setup        ThomasHabets arping 2.28 arping-
github.tarball_from archive
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.

checksums           rmd160  cf26bbbbae0ca54a5ab5d1af2ad981b11b5f3fcc \
                    sha256  43b94dbb96d288096ebe0e81c0411c2e69d329d7447ac1fd7b758eda38fd35a8 \
                    size    64384

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib-append  port:libnet \
                    port:libpcap

configure.cmd       ./bootstrap.sh && ./configure

# 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 ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}/COPYING
    xinstall -m 644 ${worksrcpath}/README \
        ${destroot}${prefix}/share/doc/${name}
}
