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

github.setup        maxmind geoip-api-c 1.6.9 v
github.tarball_from releases
name                libgeoip
categories          devel net
license             LGPL-2.1+
platforms           darwin
maintainers         pixilla openmaintainer
description         Gets country code by IP address
long_description    ${description}

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

checksums           rmd160  244fa293f86bc24df6a4b7a6643f111830faf1ed \
                    sha256  4b446491843de67c1af9b887da17a3e5939e0aeed4826923a5f4bf09d845096f

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