# -*- 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        maxmind geoip-api-c 1.6.12 v
revision            0
github.tarball_from releases
name                libgeoip
categories          devel net
license             LGPL-2.1+
platforms           darwin
maintainers         nomaintainer
description         Gets country code by IP address
long_description    {*}${description}

homepage            http://dev.maxmind.com/geoip/
distname            GeoIP-${version}

checksums           rmd160  80d8c7d9c4822879e33ecde31056e56bfbb78a6e \
                    sha256  1dfb748003c5e4b7fd56ba8c4cd786633d5d6f409547584f6910398389636f80 \
                    size    473914

# For stricter sed, some files are not UTF-8
build.env           LC_CTYPE=C
destroot.env        LC_CTYPE=C

test.run            yes
test.target         check

post-destroot {
    delete ${destroot}${prefix}/etc/GeoIP.conf
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        ChangeLog \
        NEWS.md \
        README.md \
        ${destroot}${prefix}/share/doc/${name}
}
