aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/cdpr.rb
blob: 2cbaf5bb854b58357173cd50aa1a3289bf5eb18b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'formula'

class Cdpr < Formula
  homepage 'http://www.monkeymental.com/'
  url 'http://downloads.sourceforge.net/project/cdpr/cdpr/2.4/cdpr-2.4.tgz'
  sha1 '45cc185ad0eb16178a795a46e676fa698eedb832'

  def install
    # Makefile hardcodes gcc and other atrocities
    system "#{ENV.cc} #{ENV.cflags} cdpr.c cdprs.c conffile.c #{ENV.ldflags} -lpcap -o cdpr"
    bin.install "cdpr"
  end

  def caveats
    "run cdpr sudo'd in order to avoid the error: 'No interfaces found! Make sure pcap is installed.'"
  end
end