homebrew-core/Formula/ncdc.rb
Vikrant Varma 9deb5d4a91 ncdd: use :shallow => false on HEAD
ncdc depends on `git describe` to set its version. This breaks[0] on a
shallow clone, so use :shallow => false.

[0] http://dev.yorhel.nl/ncdc/bug/76

Closes Homebrew/homebrew#38826.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-20 14:00:01 +08:00

40 lines
864 B
Ruby

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
head do
url "git://g.blicky.net/ncdc.git", :shallow => false
depends_on "autoconf" => :build
depends_on "automake" => :build
end
def install
system "autoreconf", "-ivf" if build.head?
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