summaryrefslogtreecommitdiffstats
path: root/util/lib/geo/Makefile
blob: d13cd471239b75f12c1108823b4b5c42e5fafb8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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; \
	}