# -*- 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           perl5 1.0
PortGroup           github 1.0

github.setup        kjokjo ipcalc 0.51
github.tarball_from archive
revision            0

categories          net
license             GPL-2+
platforms           any
supported_archs     noarch
maintainers         nomaintainer

description         calculates various network masks etc. from given ip-address
long_description    ipcalc takes an IP address and netmask and calculates the \
                    resulting broadcast, network, Cisco wildcard mask, and host \
                    range. By giving a second netmask, you can design sub- and \
                    supernetworks. It is also intended to be a teaching tool and \
                    presents the results as easy-to-understand binary values.

homepage            http://jodies.de/ipcalc/

checksums           rmd160  f6ff7686212c9ff390228c1191f25d58285dac29 \
                    sha256  a4dbfaeb7511b81830793ab9936bae9d7b1b561ad33e29106faaaf97ba1c117e \
                    size    25012

perl5.branches          5.28 5.30 5.32 5.34
perl5.default_branch    5.34
perl5.create_variants   ${perl5.branches}

configure {
    reinplace "s|/usr/bin/perl -w|${prefix}/bin/perl${perl5.major} -w|g" ${worksrcpath}/ipcalc
}

build {}

destroot {
    xinstall -m 755 ${worksrcpath}/ipcalc ${destroot}${prefix}/bin
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/changelog \
        ${destroot}${prefix}/share/doc/${name}
}
