From ea28f4ea0693df02d3e51da23915c74d7f35bedf Mon Sep 17 00:00:00 2001 From: James Meyer Date: Wed, 15 Aug 2012 10:44:21 -0500 Subject: geoip-database 20120706 -new --- abs/extra/geoip-database/PKGBUILD | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 abs/extra/geoip-database/PKGBUILD diff --git a/abs/extra/geoip-database/PKGBUILD b/abs/extra/geoip-database/PKGBUILD new file mode 100644 index 0000000..7b8d4d9 --- /dev/null +++ b/abs/extra/geoip-database/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 163822 2012-07-20 22:15:57Z foutrelis $ +# Maintainer: Evangelos Foutras + +pkgname=geoip-database +pkgver=20120706 +pkgrel=1 +pkgdesc="GeoLite country geolocation database compiled by MaxMind" +arch=('any') +url="http://www.maxmind.com/app/ip-location" +license=('custom:OPEN DATA LICENSE') +source=(GeoIP-$pkgver.dat.gz::http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz + GeoIPv6-$pkgver.dat.gz::http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz + http://geolite.maxmind.com/download/geoip/database/LICENSE.txt) +noextract=(GeoIP-$pkgver.dat.gz + GeoIPv6-$pkgver.dat.gz) + +build() { + cd "$srcdir" + + for _database_name in GeoIP GeoIPv6; do + gunzip -c $_database_name-$pkgver.dat.gz >$_database_name.dat + done +} + +check() { + cd "$srcdir" + + for _database in {GeoIP,GeoIPv6}.dat; do + if ! grep -q 'MaxMind Inc All Rights Reserved' $_database; then + error "Copyright notice is missing from $_database; something is fishy!" + return 1 + fi + done +} + +package() { + cd "$srcdir" + + install -d "$pkgdir/usr/share/GeoIP" + install -m644 -t "$pkgdir/usr/share/GeoIP" GeoIP.dat GeoIPv6.dat + + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" +} + +# vim:set ts=2 sw=2 et: +md5sums=('1bfcf1600cabcae5ff37fbddf82ba231' + '586740960300f6c5018eef279214d2b8' + 'a1381bd1aa0a0c91dc31b3f1e847cf4a') -- cgit v0.12