2010-06-14 03:27:50 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Hping < Formula
|
2010-06-14 03:27:50 +00:00
|
|
|
homepage 'http://www.hping.org/'
|
2012-02-10 04:12:16 +00:00
|
|
|
url 'http://www.hping.org/hping3-20051105.tar.gz'
|
2010-07-27 15:55:13 +00:00
|
|
|
md5 'ca4ea4e34bcc2162aedf25df8b2d1747'
|
|
|
|
version '3.20051105'
|
|
|
|
|
|
|
|
def patches
|
|
|
|
{:p0 => [
|
|
|
|
# MacPorts patches: http://trac.macports.org/browser/trunk/dports/net/hping3
|
2012-01-23 01:09:28 +00:00
|
|
|
"https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-libpcap_stuff.c.diff",
|
|
|
|
"https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-ars.c.diff",
|
|
|
|
"https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-sendip.c.diff",
|
|
|
|
"https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-Makefile.in.diff",
|
|
|
|
"https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-bytesex.h.diff"
|
2010-07-27 15:55:13 +00:00
|
|
|
]}
|
|
|
|
end
|
2010-06-14 03:27:50 +00:00
|
|
|
|
|
|
|
def install
|
2010-07-27 15:55:13 +00:00
|
|
|
# Compile fails with tcl support; TCL on OS X is 32-bit only
|
|
|
|
system "./configure", "--no-tcl"
|
|
|
|
|
|
|
|
# Target folders need to exist before installing
|
|
|
|
sbin.mkpath
|
2010-04-07 05:58:35 +00:00
|
|
|
man8.mkpath
|
2012-02-10 04:12:16 +00:00
|
|
|
system "make", "CC=#{ENV.cc}",
|
|
|
|
"COMPILE_TIME=#{ENV.cflags}",
|
|
|
|
"INSTALL_PATH=#{prefix}",
|
|
|
|
"INSTALL_MANPATH=#{man}",
|
|
|
|
"install"
|
2010-06-14 03:27:50 +00:00
|
|
|
end
|
|
|
|
end
|