geoip2-database: db files are no longer in public access

Now we will reuse ones from last our build, even if they can
be outdated.

See related issue https://github.com/termux/termux-packages/issues/4750.
This commit is contained in:
Leonid Pliushch 2020-01-10 14:54:15 +02:00
parent 7e66fa991c
commit 74e20fe618

View File

@ -5,15 +5,16 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
# Bump date ~once per month to update package.
# MaxMind removed databases from public access:
# https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/
# Reusing files from the our last build (2019.12.21).
TERMUX_PKG_VERSION=20191221
TERMUX_PKG_SRCURL=('https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz'
'https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz'
'https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz')
TERMUX_PKG_SHA256=('SKIP_CHECKSUM' 'SKIP_CHECKSUM' 'SKIP_CHECKSUM')
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://dl.bintray.com/xeffyr/sources/geoip2-database/geolite2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=7afd73d90325d4a8aa3707c0c4a34f89a4b469fe43b4f3a3d69da23884af1e70
termux_step_make_install() {
install -Dm600 \
-t "$TERMUX_PREFIX"/share/GeoIP/ \
$(find "$TERMUX_PKG_SRCDIR" -type f -iname \*.mmdb)
"${TERMUX_PKG_SRCDIR}"/GeoLite2-{ASN,Country,City}.mmdb
}