void-packages/srcpkgs/geoip-data/template

30 lines
1.1 KiB
Bash
Raw Normal View History

2017-04-16 20:04:11 +02:00
# Template file for 'geoip-data'
pkgname=geoip-data
version=20171002
revision=1
2017-04-16 20:04:11 +02:00
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/"
2017-04-19 10:01:58 +02:00
noarch=yes
2017-04-16 20:04:11 +02:00
2017-10-02 16:26:35 +02:00
do_fetch() {
2017-10-02 16:34:01 +02:00
$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
}
2017-04-16 20:04:11 +02:00
do_install() {
local f
2017-04-16 20:04:11 +02:00
vmkdir usr/share/GeoIP
for f in GeoIP GeoIPv6 GeoLiteCity GeoLiteCityv6 GeoIPASNum GeoIPASNumv6; do
2017-10-02 16:34:01 +02:00
zcat ../${f}.dat.gz > ${f}.dat
rm -f ../${f}.dat.gz
vinstall ${f}.dat 644 usr/share/GeoIP
2017-04-16 20:04:11 +02:00
done
}