aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/goaccess.rb
blob: 1c992f47d040a862dd9fb22ca749d435a94da1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'formula'

class Goaccess < Formula
  url 'http://downloads.sourceforge.net/project/goaccess/0.4.2/goaccess-0.4.2.tar.gz'
  homepage 'http://goaccess.prosoftcorp.com/'
  md5 '7d7707c294c949d612e451da2f003c37'
  head 'git://goaccess.git.sourceforge.net/gitroot/goaccess/goaccess'

  depends_on 'pkg-config' => :build
  depends_on 'glib'
  depends_on 'geoip' if ARGV.include? "--enable-geoip"

  def options
    [['--enable-geoip', "Enable IP location information using GeoIP"]]
  end

  def install
    args = ["--prefix=#{prefix}",
            "--disable-debug",
            "--disable-dependency-tracking"]

    args << "--enable-geoip" if ARGV.include? '--enable-geoip'

    system "./configure", *args
    system "make install"
  end
end