termux-packages/packages/geoip2-database/build.sh
Leonid Pliushch 4f8933a860
geoip2-database: don't use https://dl.bintray.com/xeffyr/sources
Package is a year as outdated and likely should be removed.

MaxMind has restricted its database distribution and publishing
any new version would be license violation.
2021-02-04 19:00:17 +00:00

21 lines
912 B
Bash

TERMUX_PKG_HOMEPAGE=https://dev.maxmind.com/geoip/geoip2/geolite2/
TERMUX_PKG_DESCRIPTION="GeoLite2 IP geolocation databases compiled by MaxMind"
TERMUX_PKG_LICENSE="CC0-1.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
# 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_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/termux/distfiles/releases/download/2021.01.04/geolite2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=7afd73d90325d4a8aa3707c0c4a34f89a4b469fe43b4f3a3d69da23884af1e70
termux_step_make_install() {
install -Dm600 \
-t "$TERMUX_PREFIX"/share/GeoIP/ \
"${TERMUX_PKG_SRCDIR}"/GeoLite2-{ASN,Country,City}.mmdb
}