summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2012-08-30 08:05:35 +0000
committerSergey Popov <pinkbyte@gentoo.org>2012-08-30 08:05:35 +0000
commitb5ca03e1f3bd2b06dc0fbf784eb6fea5c2bdef1f (patch)
tree7240e4cb10e1028159f6b5274952141584cb2452 /dev-libs/geoip
parentsci-biology/allpaths: Respect CXXFLAGS (diff)
downloadgentoo-2-b5ca03e1f3bd2b06dc0fbf784eb6fea5c2bdef1f.tar.gz
gentoo-2-b5ca03e1f3bd2b06dc0fbf784eb6fea5c2bdef1f.tar.bz2
gentoo-2-b5ca03e1f3bd2b06dc0fbf784eb6fea5c2bdef1f.zip
New revision, added IPv6 database for cities wrt bug #429932. Thanks to mva
(Portage version: 2.2.0_alpha123/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/geoip')
-rw-r--r--dev-libs/geoip/ChangeLog8
-rwxr-xr-xdev-libs/geoip/files/geoipupdate-r1.sh27
-rw-r--r--dev-libs/geoip/geoip-1.4.8-r1.ebuild62
3 files changed, 96 insertions, 1 deletions
diff --git a/dev-libs/geoip/ChangeLog b/dev-libs/geoip/ChangeLog
index f81648a5071d..e5380612636e 100644
--- a/dev-libs/geoip/ChangeLog
+++ b/dev-libs/geoip/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/geoip
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/ChangeLog,v 1.130 2012/06/19 20:59:02 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/ChangeLog,v 1.131 2012/08/30 08:05:35 pinkbyte Exp $
+
+*geoip-1.4.8-r1 (30 Aug 2012)
+
+ 30 Aug 2012; Sergey Popov <pinkbyte@gentoo.org> +files/geoipupdate-r1.sh,
+ +geoip-1.4.8-r1.ebuild:
+ New revision, added IPv6 database for cities wrt bug #429932. Thanks to mva
19 Jun 2012; Jeroen Roovers <jer@gentoo.org> geoip-1.4.8.ebuild:
Update HOMEPAGE.
diff --git a/dev-libs/geoip/files/geoipupdate-r1.sh b/dev-libs/geoip/files/geoipupdate-r1.sh
new file mode 100755
index 000000000000..f4081d100f25
--- /dev/null
+++ b/dev-libs/geoip/files/geoipupdate-r1.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+GEOIP_MIRROR="http://geolite.maxmind.com/download/geoip/database"
+GEOIPDIR=/usr/share/GeoIP
+TMPDIR=
+
+DATABASES="GeoLiteCity GeoLiteCountry/GeoIP asnum/GeoIPASNum GeoIPv6 GeoLiteCityv6-beta/GeoLiteCityv6"
+
+if [ -d "${GEOIPDIR}" ]; then
+ cd $GEOIPDIR
+ if [ -n "${DATABASES}" ]; then
+ TMPDIR=$(mktemp -d geoipupdate.XXXXXXXXXX)
+
+ echo "Updating GeoIP databases..."
+
+ for db in $DATABASES; do
+ fname=$(basename $db)
+
+ wget --no-verbose -t 3 -T 60 "${GEOIP_MIRROR}/${db}.dat.gz" -O "${TMPDIR}/${fname}.dat.gz"
+ gunzip -fdc "${TMPDIR}/${fname}.dat.gz" > "${TMPDIR}/${fname}.dat"
+ mv "${TMPDIR}/${fname}.dat" "${GEOIPDIR}/${fname}.dat"
+ chmod 0644 "${GEOIPDIR}/${fname}.dat"
+ done
+ [ -d "${TMPDIR}" ] && rm -rf $TMPDIR
+ fi
+fi
+
diff --git a/dev-libs/geoip/geoip-1.4.8-r1.ebuild b/dev-libs/geoip/geoip-1.4.8-r1.ebuild
new file mode 100644
index 000000000000..a419ff6dbed0
--- /dev/null
+++ b/dev-libs/geoip/geoip-1.4.8-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/geoip-1.4.8-r1.ebuild,v 1.1 2012/08/30 08:05:35 pinkbyte Exp $
+
+EAPI=4
+
+inherit autotools
+
+MY_P=${P/geoip/GeoIP}
+
+DESCRIPTION="easily lookup countries by IP addresses, even when Reverse DNS entries don't exist"
+HOMEPAGE="http://www.maxmind.com/app/ip-location"
+SRC_URI="
+ http://www.maxmind.com/download/geoip/api/c/${MY_P}.tar.gz
+ ipv6? ( http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
+ http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz )
+"
+
+# GPL-2 for md5.c - part of libGeoIPUpdate, MaxMind for GeoLite Country db
+LICENSE="LGPL-2.1 GPL-2 MaxMind2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 perl-geoipupdate static-libs"
+
+RDEPEND="
+ perl-geoipupdate? (
+ dev-perl/PerlIO-gzip
+ dev-perl/libwww-perl
+ )
+"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e "s:usr local share GeoIP:usr share GeoIP:" \
+ -e "s:usr local etc:etc:" \
+ -i apps/geoipupdate-pureperl.pl || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use perl-geoipupdate && dobin apps/geoipupdate-pureperl.pl
+ dodoc AUTHORS ChangeLog README TODO conf/GeoIP.conf.default
+ rm "${ED}/etc/GeoIP.conf.default"
+ if ! use static-libs; then
+ rm -f "${ED}"/usr/lib*/lib*.la
+ fi
+
+ if use ipv6; then
+ insinto /usr/share/GeoIP
+ doins "${WORKDIR}/GeoIPv6.dat" || die
+ doins "${WORKDIR}/GeoLiteCityv6.dat"
+ fi
+
+ newsbin "${FILESDIR}/geoipupdate-r1.sh" geoipupdate.sh
+}