aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/yaf.rb
blob: c6a4f6167e6d4d9a113a0edbafae733ec21b1a2f (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
class Yaf < Formula
  homepage "https://tools.netsa.cert.org/yaf/"
  url "https://tools.netsa.cert.org/releases/yaf-2.6.0.tar.gz"
  sha1 "ac1ac70a8d1ed8b8dbbfd5ec803880a74fa2894b"

  bottle do
    sha1 "08cbd663f3673eef87f3c086ad149a289c24959b" => :yosemite
    sha1 "3f44f3792eb169334cbc8bfacabf6883fdc79b83" => :mavericks
    sha1 "75c573eef68f5e27bffcf04919974759ba73a471" => :mountain_lion
  end

  depends_on "pkg-config" => :build
  depends_on "glib"
  depends_on "libfixbuf"

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make"
    system "make", "install"
  end

  test do
    input = test_fixtures("test.pcap")
    output = `#{bin}/yaf --in #{input} | #{bin}/yafscii`
    expected = "2014-10-02 10:29:06.168 - 10:29:06.169 (0.001 sec) tcp 192.168.1.115:51613 => 192.168.1.118:80 71487608:98fc8ced S/APF:AS/APF (7/453 <-> 5/578) rtt 0 ms"
    assert_equal expected, output.strip
  end
end