diff options
| author | Nicholas Sivo | 2013-11-24 18:02:54 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-11-28 10:13:12 +0000 |
| commit | c07c02a76869fbfb19e8946e9126d43f4a7f7cf9 (patch) | |
| tree | bd838e0bb66f3ee20bbf507bd452779d4fb9733c /Library/Formula | |
| parent | e7cda7f451614884dfd0b3b192ae2c71242e87ad (diff) | |
| download | homebrew-c07c02a76869fbfb19e8946e9126d43f4a7f7cf9.tar.bz2 | |
geoipupdate: fix data directory, make config useful.
geoip and geoipupdate need to share a data directory, which is
/usr/local/share/GeoIP by default. This doesn’t work with Homebrew,
since it can’t link into both cellar locations. I’ve manually specified
a reasonable location as the default.
The shipped configuration doesn’t do anything out of the box. Users who
pay will need to edit the file anyway to add their license keys, but
now it should just work for free users.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/geoipupdate.rb | 15 |
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 |
