diff --git a/Formula/geoipupdate.rb b/Formula/geoipupdate.rb index 02e2c1824b..5c12278902 100644 --- a/Formula/geoipupdate.rb +++ b/Formula/geoipupdate.rb @@ -1,8 +1,9 @@ class Geoipupdate < Formula desc "Automatic updates of GeoIP2 and GeoIP Legacy databases" homepage "https://github.com/maxmind/geoipupdate" - url "https://github.com/maxmind/geoipupdate/releases/download/v3.1.1/geoipupdate-3.1.1.tar.gz" - sha256 "3de22e3fe3282024288a00807bbea9a1ffa2d1e8fe9c611f4b14a5b4d8ebe08a" + url "https://github.com/maxmind/geoipupdate/archive/v4.0.2.tar.gz" + sha256 "76a2bd8e75fbe1d88cfdf0ab7f00e90cfea7c87b8757d6f5147a3d4d2d9773b3" + head "https://github.com/maxmind/geoipupdate.git" bottle do sha256 "9cf68c91a00193bed2bd55b3c2d8add1fa937433a429af7c01829b14a58eb7fa" => :mojave @@ -11,21 +12,21 @@ class Geoipupdate < Formula sha256 "a8fdd107eca63868f7ae9e216f3ecab4bb1c0ce635d9bda0fdb03d35f37d1380" => :el_capitan end - head do - url "https://github.com/maxmind/geoipupdate.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - end + depends_on "go" => :build + depends_on "pandoc" => :build def install - system "./bootstrap" if build.head? - system "./configure", "--disable-dependency-tracking", - "--disable-silent-rules", - "--datadir=#{var}", - "--prefix=#{prefix}", - "--sysconfdir=#{etc}" - system "make", "install" + ENV["GOPATH"] = buildpath + (buildpath/"src/github.com/maxmind/geoipupdate").install buildpath.children + + cd "src/github.com/maxmind/geoipupdate" do + system "make", "CONFFILE=#{etc}/GeoIP.conf", "DATADIR=#{var}/GeoIP" + + bin.install "build/geoipupdate" + etc.install "build/GeoIP.conf" + man1.install "build/geoipupdate.1" + man5.install "build/GeoIP.conf.5" + end end def post_install