aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/p0f.rb
blob: dc0530feb18e078d7069582c35d562023111a4bd (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
require "formula"

class P0f < Formula
  homepage "http://lcamtuf.coredump.cx/p0f3/"
  url "http://lcamtuf.coredump.cx/p0f3/releases/p0f-3.07b.tgz"
  sha1 "ae2c4fbcddf2a5ced33abd81992405b93207e7c8"

  bottle do
    cellar :any
    sha1 "eceeb864d78eb22bd5808690f1ce818f196b0c9b" => :mavericks
    sha1 "261610220600d44a55fd31c2ca68849cc9e4db4f" => :mountain_lion
    sha1 "47e0e995504b87ea470c5ebb6583bd67cd447f95" => :lion
  end

  def install
    inreplace "config.h", "p0f.fp", "#{etc}/p0f/p0f.fp"
    system "./build.sh"
    sbin.install "p0f"
    (etc+"p0f").install "p0f.fp"
  end

  test do
    system "#{sbin}/p0f", "-r", test_fixtures("test.pcap")
  end
end