diff options
author | adamw <adamw@FreeBSD.org> | 2014-07-22 20:24:58 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2014-07-22 20:24:58 +0800 |
commit | abf41cae2b7254c0d8f9b03f37edcbbd6846d2ad (patch) | |
tree | 667057f497724307df1fffaa5eac5cdc79cd28e7 | |
parent | 4d353ea454266c13e9bea702ebf4b7181b50ebe1 (diff) | |
download | freebsd-ports-gnome-abf41cae2b7254c0d8f9b03f37edcbbd6846d2ad.tar.gz freebsd-ports-gnome-abf41cae2b7254c0d8f9b03f37edcbbd6846d2ad.tar.zst freebsd-ports-gnome-abf41cae2b7254c0d8f9b03f37edcbbd6846d2ad.zip |
Fetch the GeoIPv6 data along with the IPv4 data. This change
means that to update the IPv6 data you must use the included
geoipupdate.sh script, not the source-provided geoipdate command.
Add a pkg-message about how to update.
PR: 189618
Submitted by: futatuki@yf.bsdclub.org
Also,
PR: 187906
Submitted by: Miroslav Lachman
-rw-r--r-- | net/GeoIP/Makefile | 4 | ||||
-rw-r--r-- | net/GeoIP/files/geoipupdate.sh.in | 28 | ||||
-rw-r--r-- | net/GeoIP/files/pkg-message.in | 4 |
3 files changed, 33 insertions, 3 deletions
diff --git a/net/GeoIP/Makefile b/net/GeoIP/Makefile index 454a21d3c0e7..e2ab94a238f0 100644 --- a/net/GeoIP/Makefile +++ b/net/GeoIP/Makefile @@ -3,7 +3,7 @@ PORTNAME= GeoIP PORTVERSION= 1.4.8 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net geography MASTER_SITES= http://geolite.maxmind.com/download/geoip/api/c/ @@ -16,7 +16,7 @@ USE_LDCONFIG= yes USE_AUTOTOOLS= aclocal automake libtool libtoolize autoconf AUTOMAKE_ARGS= --add-missing -SUB_FILES= geoipupdate.sh +SUB_FILES= geoipupdate.sh pkg-message post-install: ${INSTALL_SCRIPT} ${WRKDIR}/geoipupdate.sh ${STAGEDIR}${PREFIX}/bin diff --git a/net/GeoIP/files/geoipupdate.sh.in b/net/GeoIP/files/geoipupdate.sh.in index 89145deaf6b3..6e937aa32579 100644 --- a/net/GeoIP/files/geoipupdate.sh.in +++ b/net/GeoIP/files/geoipupdate.sh.in @@ -1,2 +1,28 @@ #!/bin/sh -fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | gunzip > %%DATADIR%%/GeoIP.dat + +TEMPFILE=`mktemp %%DATADIR%%/GeoIP.dat-XXXXXX` +if fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | gunzip >> $TEMPFILE ; then + chmod 644 $TEMPFILE + if ! mv $TEMPFILE %%DATADIR%%/GeoIP.dat ; then + rm $TEMPFILE + echo Unable to overwrite %%DATADIR%%/GeoIP.dat + exit 2 + fi +else + rm $TEMPFILE + echo GeoIP.dat download failed + exit 1 +fi +TEMPFILE=`mktemp %%DATADIR%%/GeoIPv6.dat-XXXXXX` +if fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz | gunzip >> $TEMPFILE ; then + chmod 644 $TEMPFILE + if ! mv $TEMPFILE %%DATADIR%%/GeoIPv6.dat ; then + rm $TEMPFILE + echo Unable to overwrite %%DATADIR%%/GeoIPv6.dat + exit 2 + fi +else + rm $TEMPFILE + echo GeoIPv6.dat download failed + exit 1 +fi diff --git a/net/GeoIP/files/pkg-message.in b/net/GeoIP/files/pkg-message.in new file mode 100644 index 000000000000..33d448300daa --- /dev/null +++ b/net/GeoIP/files/pkg-message.in @@ -0,0 +1,4 @@ +GeoIP does not ship with the latest data file, and it does +not ship with any IPv6 data! To obtain the latest v4 and v6 +data, run: +# %%PREFIX%%/bin/geoipupdate.sh |