summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2014-06-26 20:12:16 +0000
committerJeroen Roovers <jer@gentoo.org>2014-06-26 20:12:16 +0000
commit167d0c3ff875c79bc9ae020f56d6f8c0c0014d6b (patch)
treea07924ec0d080776a2201712b2b284ef02ca8a2a /dev-libs
parentVersion bump to Rails 4.1.2. (diff)
downloadgentoo-2-167d0c3ff875c79bc9ae020f56d6f8c0c0014d6b.tar.gz
gentoo-2-167d0c3ff875c79bc9ae020f56d6f8c0c0014d6b.tar.bz2
gentoo-2-167d0c3ff875c79bc9ae020f56d6f8c0c0014d6b.zip
Version bump. Do not update databases in postinst() but do remind people how (bug #513354). Add support for GeoLite ASN IPv6 to geoipupdate.sh (bug #515218).
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/geoip/ChangeLog10
-rwxr-xr-xdev-libs/geoip/files/geoipupdate-r4.sh43
-rw-r--r--dev-libs/geoip/geoip-1.6.1.ebuild51
3 files changed, 103 insertions, 1 deletions
diff --git a/dev-libs/geoip/ChangeLog b/dev-libs/geoip/ChangeLog
index a6a4b1fbe518..9ed4f9cec689 100644
--- a/dev-libs/geoip/ChangeLog
+++ b/dev-libs/geoip/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/geoip
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/ChangeLog,v 1.218 2014/06/14 21:27:10 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/ChangeLog,v 1.219 2014/06/26 20:12:16 jer Exp $
+
+*geoip-1.6.1 (26 Jun 2014)
+
+ 26 Jun 2014; Jeroen Roovers <jer@gentoo.org> +geoip-1.6.1.ebuild,
+ +files/geoipupdate-r4.sh:
+ Version bump. Do not update databases in postinst() but do remind people how
+ (bug #513354). Add support for GeoLite ASN IPv6 to geoipupdate.sh (bug
+ #515218).
14 Jun 2014; Jeroen Roovers <jer@gentoo.org> geoip-1.6.0-r3.ebuild:
Remove /usr/share/GeoIP contents when the package is unmerged.
diff --git a/dev-libs/geoip/files/geoipupdate-r4.sh b/dev-libs/geoip/files/geoipupdate-r4.sh
new file mode 100755
index 000000000000..3d8c8da5c124
--- /dev/null
+++ b/dev-libs/geoip/files/geoipupdate-r4.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+GEOIP_MIRROR="https://geolite.maxmind.com/download/geoip/database"
+GEOIPDIR=@PREFIX@/usr/share/GeoIP
+TMPDIR=
+
+DATABASES="
+ GeoIPv6
+ GeoLiteCity
+ GeoLiteCityv6-beta/GeoLiteCityv6
+ GeoLiteCountry/GeoIP
+ asnum/GeoIPASNum
+ asnum/GeoIPASNumv6
+"
+
+if [ "${1}" = -f ] || [ "${1}" = --force ]; then
+ force=true
+fi
+
+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)
+
+ if [ -f "${GEOIPDIR}/${fname}.dat" ] || [ ${force} ]; then
+ wget --no-verbose -t 3 -T 60 \
+ "${GEOIP_MIRROR}/${db}.dat.gz" \
+ -O "${TMPDIR}/${fname}.dat.gz"
+ if [ $? -eq 0 ]; then
+ gunzip -fdc "${TMPDIR}/${fname}.dat.gz" > "${TMPDIR}/${fname}.dat"
+ mv "${TMPDIR}/${fname}.dat" "${GEOIPDIR}/${fname}.dat"
+ chmod 0644 "${GEOIPDIR}/${fname}.dat"
+ fi
+ fi
+ done
+ [ -d "${TMPDIR}" ] && rm -rf $TMPDIR
+ fi
+fi
diff --git a/dev-libs/geoip/geoip-1.6.1.ebuild b/dev-libs/geoip/geoip-1.6.1.ebuild
new file mode 100644
index 000000000000..122ed91dfb9a
--- /dev/null
+++ b/dev-libs/geoip/geoip-1.6.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/geoip/geoip-1.6.1.ebuild,v 1.1 2014/06/26 20:12:16 jer Exp $
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="easily lookup countries by IP addresses, even when Reverse DNS entries don't exist"
+HOMEPAGE="https://github.com/maxmind/geoip-api-c"
+SRC_URI="
+ https://github.com/maxmind/${PN}-api-c/archive/v${PV}.tar.gz -> ${P}.tar.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 ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
+IUSE="static-libs"
+RESTRICT="test"
+
+DEPEND="net-misc/wget"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-api-c-${PV}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+ sed -e "s|@PREFIX@|${ROOT}|g" "${FILESDIR}"/geoipupdate-r4.sh > geoipupdate.sh || die
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog README* TODO
+
+ prune_libtool_files
+
+ keepdir /usr/share/GeoIP
+
+ dosbin geoipupdate.sh
+}
+
+pkg_postinst() {
+ elog "Don't forget to run the included geoipupdate.sh or geoipupdate (from"
+ elog "net-misc/geoipupdate) regularly to populate ${ROOT}/usr/share/GeoIP/"
+ elog "with geo-located IP address databases."
+}