# $Id: Portfile 63015 2010-01-23 16:33:53Z nox@macports.org $

PortSystem 1.0

name			libgeoip
version			1.4.6
categories		devel net
platforms		darwin
maintainers		mobygames.com:bhirt
description		Gets country code by IP address
long_description	${description}

homepage		http://www.maxmind.com/app/c
master_sites		http://www.maxmind.com/download/geoip/api/c/ \
			http://www.maxmind.com/download/geoip/api/c/old/
distname		GeoIP-${version}
checksums		md5     cb14b1beeb40631a12676b11ca0c309a \
			sha1    e692954f447c13270de7860e586696991776d8a3 \
			rmd160  67097c3f9c6bbdba1a4f7ee796713720dba19b0f

test.run		yes
test.target		check

configure.args	--mandir=${prefix}/share/man

post-destroot	{
	xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL \
		NEWS README TODO ${destroot}${prefix}/share/doc/${name}
}

livecheck.type  regex
livecheck.url   http://geolite.maxmind.com/download/geoip/api/c/
livecheck.regex {GeoIP-(\d+(?:\.\d+)*)}
