aboutsummaryrefslogtreecommitdiffstats
path: root/main/geoip
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-01-31 12:30:35 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-01-31 12:30:47 +0000
commitae01bbf1922a43ecd3260657195683b69461c464 (patch)
tree1a23efea0915e30b593d3881bc7da6d12d9d8ac6 /main/geoip
parentc0958a44c4c19f5d6d98db6a3d7a4d18787fe160 (diff)
downloadaports-ae01bbf1922a43ecd3260657195683b69461c464.tar.bz2
aports-ae01bbf1922a43ecd3260657195683b69461c464.tar.xz
main/geoip: monthly update of db via cron job
Diffstat (limited to 'main/geoip')
-rw-r--r--main/geoip/APKBUILD5
-rwxr-xr-xmain/geoip/geoip.cron2
2 files changed, 5 insertions, 2 deletions
diff --git a/main/geoip/APKBUILD b/main/geoip/APKBUILD
index 8a47aca86b..ab8cac734a 100644
--- a/main/geoip/APKBUILD
+++ b/main/geoip/APKBUILD
@@ -3,7 +3,7 @@
pkgname="geoip"
_realname="GeoIP"
pkgver=1.4.8
-pkgrel=0
+pkgrel=2
pkgdesc="Lookup countries by IP addresses"
url="http://www.maxmind.com/app/ip-location"
arch="all"
@@ -18,7 +18,7 @@ _builddir="$srcdir"/$_realname-$pkgver
prepare() {
cd "$_builddir"
- # apply patches here
+ return 0
}
build() {
@@ -34,6 +34,7 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D ../../geoip.cron "$pkgdir"/etc/periodic/monthly/geoip
rm "$pkgdir"/usr/lib/*.la
}
diff --git a/main/geoip/geoip.cron b/main/geoip/geoip.cron
new file mode 100755
index 0000000000..b7c2ffd4d0
--- /dev/null
+++ b/main/geoip/geoip.cron
@@ -0,0 +1,2 @@
+#!/bin/sh
+wget -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -O /tmp/GeoIP.dat.gz && gunzip tmp/GeoIP.dat.gz && mv tmp/GeoIP.dat.gz /usr/share/GeoIP