aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/geoipupdate.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/Library/Formula/geoipupdate.rb b/Library/Formula/geoipupdate.rb
index 9396f6723..fef7b8341 100644
--- a/Library/Formula/geoipupdate.rb
+++ b/Library/Formula/geoipupdate.rb
@@ -6,20 +6,33 @@ class Geoipupdate < Formula
sha1 'd3c90ad9c9ad5974e8a5a30c504e7827978ddea7'
head 'https://github.com/maxmind/geoipupdate.git'
+ if build.head?
+ depends_on 'autoconf' => :build
+ depends_on 'automake' => :build
+ depends_on 'libtool' => :build
+ end
+
option :universal
def install
ENV.universal_binary if build.universal?
+ # Download free databases by default
+ # See https://github.com/maxmind/geoip-api-c#150
+ inreplace 'conf/GeoIP.conf.default', 'YOUR_USER_ID_HERE', '999999'
+ inreplace 'conf/GeoIP.conf.default', 'YOUR_LICENSE_KEY_HERE', '000000000000'
+ inreplace 'conf/GeoIP.conf.default', /^ProductIds .*$/, 'ProductIds 506 533'
+
system "./bootstrap" if build.head?
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
+ "--datadir=#{var}",
"--prefix=#{prefix}"
system "make", "install"
end
test do
- system "#{bin}/geoipupdate", "-V"
+ system "#{bin}/geoipupdate", "-v"
end
end