termux-packages/packages/geoip2-database/build.sh

23 lines
1.0 KiB
Bash
Raw Normal View History

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 Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_VERSION=20190730
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')
2019-07-21 00:07:00 +02:00
## If these checksums become invalid - it's time to update package.
TERMUX_PKG_SHA256=('08e0d8a7b937e17416d58ee8290bb89ecabb9ed5323836d795ba88d564084f83'
'50142e7dace481fe35b84bf319799281fb438a989f8835c2ba2f714e5d63479b'
'c20c58fe8f97a76b5809fdee58e848fe6823338c14a23fb7fd9d8fc01e2e4b37')
termux_step_make_install() {
install -Dm600 \
-t "$TERMUX_PREFIX"/share/GeoIP/ \
$(find "$TERMUX_PKG_SRCDIR" -type f -iname \*.mmdb)
}