2013-02-22 23:13:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ncdc < Formula
|
|
|
|
homepage 'http://dev.yorhel.nl/ncdc'
|
2014-02-19 09:18:03 +00:00
|
|
|
url 'http://dev.yorhel.nl/download/ncdc-1.19.tar.gz'
|
|
|
|
sha1 '7f478b7daf09202586b40899cc6beabeb0d23178'
|
2014-03-06 03:54:59 +00:00
|
|
|
revision 1
|
2014-02-19 09:18:03 +00:00
|
|
|
|
|
|
|
option 'with-geoip', "Build with geoip support"
|
2013-02-22 23:13:50 +00:00
|
|
|
|
|
|
|
depends_on 'glib'
|
|
|
|
depends_on 'sqlite'
|
2014-02-19 09:18:03 +00:00
|
|
|
depends_on 'gnutls' => 'with-p11-kit'
|
2013-02-22 23:13:50 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2014-02-19 09:18:03 +00:00
|
|
|
depends_on 'geoip' => :optional
|
2013-02-22 23:13:50 +00:00
|
|
|
|
2015-04-10 08:39:46 +00:00
|
|
|
head do
|
|
|
|
url "git://g.blicky.net/ncdc.git"
|
|
|
|
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
end
|
|
|
|
|
2013-02-22 23:13:50 +00:00
|
|
|
def install
|
2015-04-10 08:39:46 +00:00
|
|
|
system "autoreconf", "-ivf" if build.head?
|
|
|
|
|
2014-02-19 09:18:03 +00:00
|
|
|
args = [
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
]
|
|
|
|
args << '--with-geoip' if build.with? 'geoip'
|
|
|
|
|
|
|
|
system "./configure", *args
|
2013-02-22 23:13:50 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2013-03-25 18:35:20 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/ncdc", "-v"
|
2013-02-22 23:13:50 +00:00
|
|
|
end
|
|
|
|
end
|