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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           perl5 1.0

name                liboping
subport             liboping-devel {}
perl5.branches      5.24

categories          net
platforms           darwin
license             LGPL-2.1 GPL-2
maintainers         nomaintainer
description         C library and program for ICMP echo requests
long_description    C library and ncurses-based frontend to generate ICMP \
                    echo requests to multiple hosts in parallel
homepage            http://verplant.org/liboping/

if {${subport} eq ${name}} {
#   # it would make sense to switch to github after a new release to avoid conflicting checksums
#   github.setup    octo liboping 1.8.0 liboping-
    conflicts       liboping-devel
    version         1.8.0
    revision        2

    master_sites    http://verplant.org/liboping/files/

    checksums       sha256  824792ae7fc5e9569bacc4167b89de31f6ba8476de44760f0bc272682e894b41 \
                    rmd160  c17e66bcfe9e531746a850d0b68bbcd70b55d5bf

} else {
    github.setup    octo liboping 74470ba
    conflicts       liboping
    version         20150213
    revision        2

    checksums       rmd160  9ccebb45977595b249019b64986e128197621c6a \
                    sha256  62b8108fa1713d0a037d9af9fe10bcd89d13307649e529a65f8ddefd8790ba46

    use_autoreconf  yes
    livecheck.type  none
}

depends_lib         port:ncurses \
                    port:perl${perl5.major}

configure.perl      ${perl5.bin}

post-destroot {
    fs-traverse f ${destroot}${prefix} {
        if {[file isfile ${f}]} {
            switch [file tail ${f}] {
                .packlist -
                perllocal.pod {
                    delete ${f}
                }
            }
        }
    }
}