summaryrefslogtreecommitdiffstats
path: root/util/lib/geo/Makefile
diff options
context:
space:
mode:
authorYour Name <you@example.com>2013-02-05 12:29:45 +0000
committerYour Name <you@example.com>2013-02-05 12:29:45 +0000
commitc5bd7df1ba5839e1a5a018381a109025d7bb3c6a (patch)
treeddee180f43a9300c2be09e6676f781e8f0462a4b /util/lib/geo/Makefile
parentb55bb65e05f6645d87470b94ef56ec0c3d6c160d (diff)
parent5b87cdd1f83e8191f01ac9e9c3441e2a47874a20 (diff)
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to 'util/lib/geo/Makefile')
-rw-r--r--util/lib/geo/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/lib/geo/Makefile b/util/lib/geo/Makefile
new file mode 100644
index 00000000..d13cd471
--- /dev/null
+++ b/util/lib/geo/Makefile
@@ -0,0 +1,15 @@
+all: node_modules GeoLiteCity.dat
+
+node_modules: package.json
+ npm install
+ @touch -r $< $@
+
+GeoLiteCity.dat:
+ @test -e GeoLiteCity.dat && ln -s GeoLiteCity.dat $@ || { \
+ echo 'No GeoIP City database found.'; \
+ echo 'You can get one from http://dev.maxmind.com/geoip/geolite:'; \
+ echo ' wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'; \
+ echo ' gunzip GeoLiteCity.dat.gz'; \
+ exit 23; \
+ }
+