void-packages/srcpkgs/geoip-data/template

30 lines
1.1 KiB
Bash

# Template file for 'geoip-data'
pkgname=geoip-data
version=20171002
revision=1
create_wrksrc=yes
short_desc="Non-DNS IP-to-country resolver C library and utilities (data files)"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="CC BY-SA 4.0"
homepage="https://dev.maxmind.com/geoip/legacy/geolite/"
noarch=yes
do_fetch() {
$XBPS_FETCH_CMD http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
$XBPS_FETCH_CMD http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
$XBPS_FETCH_CMD http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
$XBPS_FETCH_CMD http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
$XBPS_FETCH_CMD http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
$XBPS_FETCH_CMD http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
}
do_install() {
local f
vmkdir usr/share/GeoIP
for f in GeoIP GeoIPv6 GeoLiteCity GeoLiteCityv6 GeoIPASNum GeoIPASNumv6; do
zcat ../${f}.dat.gz > ${f}.dat
rm -f ../${f}.dat.gz
vinstall ${f}.dat 644 usr/share/GeoIP
done
}