diff options
| author | Nicholas Sivo | 2013-11-23 14:56:38 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2013-11-23 16:08:07 -0800 |
| commit | fc55181fd3d844e204970456658ce4a308456b18 (patch) | |
| tree | b5a25358b5fba70fa1f339da7acd064e93cad442 /Library/Formula | |
| parent | 0a656a6561b96a7c0468578cde1fba82b48beba4 (diff) | |
| download | homebrew-fc55181fd3d844e204970456658ce4a308456b18.tar.bz2 | |
libmaxminddb 0.5.2
Maxmind has a new data format. libmaxminddb succeeds libgeoip and
supports newer data sets.
Closes #24614.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libmaxminddb.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Formula/libmaxminddb.rb b/Library/Formula/libmaxminddb.rb new file mode 100644 index 000000000..432be59df --- /dev/null +++ b/Library/Formula/libmaxminddb.rb @@ -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 |
