2011-05-17 17:29:08 +00:00
|
|
|
class Amap < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Perform application protocol detection"
|
2014-11-07 23:51:00 +00:00
|
|
|
homepage "https://www.thc.org/thc-amap/"
|
|
|
|
url "https://www.thc.org/releases/amap-5.4.tar.gz"
|
2015-10-05 03:32:36 +00:00
|
|
|
sha256 "a75ea58de75034de6b10b0de0065ec88e32f9e9af11c7d69edbffc4da9a5b059"
|
2016-09-06 01:12:37 +00:00
|
|
|
revision 2
|
2014-11-07 23:51:00 +00:00
|
|
|
|
2014-11-08 01:55:11 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-09-26 11:39:43 +00:00
|
|
|
sha256 "81ff7d4c48a2bb6e0ba15ef0dbcbf31f98f1a1410d65bd53cd60ffc0e8d8c9d1" => :sierra
|
2016-09-06 01:48:20 +00:00
|
|
|
sha256 "c90c8fb7641960727299f576812dd38d88f836f9d3b99a21fdf652d2032acb52" => :el_capitan
|
|
|
|
sha256 "0ab42765f948fe016bc38c8d6005e66a86e93b4e93b073615baaf0fa0f0e95dc" => :yosemite
|
|
|
|
sha256 "18d4464b634e7aec9fefc45079dd97d0867b956ee71f189dc7f0393e77f7dba7" => :mavericks
|
2014-11-08 01:55:11 +00:00
|
|
|
end
|
|
|
|
|
2014-11-07 23:51:00 +00:00
|
|
|
depends_on "openssl"
|
2011-05-17 17:29:08 +00:00
|
|
|
|
|
|
|
def install
|
2016-09-06 01:12:37 +00:00
|
|
|
# Last release was 2011 & there's nowhere supported to report this.
|
|
|
|
openssl = Formula["openssl"]
|
|
|
|
inreplace "configure" do |s|
|
|
|
|
s.gsub! 'SSL_IPATH=""', "SSL_IPATH=\"#{openssl.opt_include}/openssl\""
|
|
|
|
s.gsub! 'SSL_PATH=""', "SSL_PATH=\"#{openssl.opt_lib}\""
|
|
|
|
s.gsub! 'CRYPTO_PATH=""', "CRYPTO_PATH=\"#{openssl.opt_lib}\""
|
|
|
|
end
|
|
|
|
|
2011-05-17 17:29:08 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
|
|
|
|
# --prefix doesn't work as we want it to so install manually
|
2012-02-13 05:09:41 +00:00
|
|
|
bin.install "amap", "amap6", "amapcrap"
|
2016-09-06 01:12:37 +00:00
|
|
|
etc.install "appdefs.resp", "appdefs.rpc", "appdefs.trig"
|
2011-05-17 17:29:08 +00:00
|
|
|
man1.install "amap.1"
|
|
|
|
end
|
2016-09-06 01:12:37 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
output = shell_output("otool -L #{bin}/amap")
|
|
|
|
assert_match Formula["openssl"].opt_lib.to_s, output
|
|
|
|
# We can do more than this, but unsure how polite it is to port-scan
|
|
|
|
# someone's domain every time this goes through CI.
|
|
|
|
assert_match version.to_s, shell_output("#{bin}/amap", 255)
|
|
|
|
end
|
2011-05-17 17:29:08 +00:00
|
|
|
end
|