aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ncdc.rb
blob: 845e9379124712c7713b17d953013f57cec4ce6d (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
28
29
30
31
require 'formula'

class Ncdc < Formula
  homepage 'http://dev.yorhel.nl/ncdc'
  url 'http://dev.yorhel.nl/download/ncdc-1.19.tar.gz'
  sha1 '7f478b7daf09202586b40899cc6beabeb0d23178'
  revision 1

  option 'with-geoip', "Build with geoip support"

  depends_on 'glib'
  depends_on 'sqlite'
  depends_on 'gnutls' => 'with-p11-kit'
  depends_on 'pkg-config' => :build
  depends_on 'geoip' => :optional

  def install
    args = [
      "--disable-dependency-tracking",
      "--prefix=#{prefix}",
    ]
    args << '--with-geoip' if build.with? 'geoip'

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

  test do
    system "#{bin}/ncdc", "-v"
  end
end