libmaxminddb 0.5.2
Maxmind has a new data format. libmaxminddb succeeds libgeoip and supports newer data sets. Closes Homebrew/homebrew#24614. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
888b20754b
commit
a11d3f6c43
1 changed files with 27 additions and 0 deletions
27
Formula/libmaxminddb.rb
Normal file
27
Formula/libmaxminddb.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
require 'formula'
|
||||
|
||||
class Libmaxminddb < Formula
|
||||
homepage 'https://github.com/maxmind/libmaxminddb'
|
||||
url 'https://github.com/maxmind/libmaxminddb/releases/download/0.5.2/libmaxminddb-0.5.2.tar.gz'
|
||||
sha1 'db7618a97c222cab0a0ba2fb8439abcd1465f10c'
|
||||
|
||||
option :universal
|
||||
|
||||
def install
|
||||
ENV.universal_binary if build.universal?
|
||||
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
system "curl", "-O", "http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz"
|
||||
system "gunzip", "GeoLite2-Country.mmdb.gz"
|
||||
system "#{bin}/mmdblookup", "-f", "GeoLite2-Country.mmdb",
|
||||
"-i", "8.8.8.8"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue