homebrew-core/Formula/tcpflow.rb
Mark A. Matienzo 75af114402 tcpflow: add head
Closes Homebrew/homebrew#18840.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-03-30 14:28:37 -05:00

32 lines
1,010 B
Ruby

require 'formula'
class Tcpflow < Formula
homepage 'https://github.com/simsong/tcpflow'
url 'https://github.com/downloads/simsong/tcpflow/tcpflow-1.3.0.tar.gz'
sha1 'fccd0a451bf138e340fc3b55dfc07924c0a811d8'
head 'https://github.com/simsong/tcpflow.git'
depends_on :libtool
depends_on :automake if build.head?
def copy_libtool_files!
if not MacOS::Xcode.provides_autotools?
s = Formula.factory('libtool').share
d = "#{s}/libtool/config"
cp ["#{d}/config.guess", "#{d}/config.sub"], "."
elsif MacOS.version == :leopard
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config.*"], "."
else
cp Dir["#{MacOS::Xcode.prefix}/usr/share/libtool/config/config.*"], "."
end
end
def install
copy_libtool_files!
system "bash", "./bootstrap.sh" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"
system "make install"
end
end