aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSteffen Matthischke2014-01-29 16:48:10 +0100
committerAdam Vandenberg2014-03-10 19:22:05 -0700
commit464616c61c5a99971f6851909bb487f18a68bf69 (patch)
tree08e2888b85098be0fc0b523cbfd64d198914c3a2 /Library
parentdb3b8dc177e1bba256618de106fa881e0e537597 (diff)
downloadhomebrew-464616c61c5a99971f6851909bb487f18a68bf69.tar.bz2
zmap 1.2.0
Closes #26251. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/zmap.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/zmap.rb b/Library/Formula/zmap.rb
new file mode 100644
index 000000000..d37661534
--- /dev/null
+++ b/Library/Formula/zmap.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class Zmap < Formula
+ homepage 'https://zmap.io'
+ url 'https://github.com/zmap/zmap/archive/v1.2.0.tar.gz'
+ sha1 'c3efb59c6433c790570aca5964f5d98f3464d330'
+
+ head 'https://github.com/zmap/zmap.git'
+
+ depends_on 'cmake' => :build
+ depends_on 'gengetopt' => :build
+ depends_on 'byacc' => :build
+ depends_on 'gmp'
+ depends_on 'libdnet'
+ depends_on 'json-c' => :optional
+ depends_on 'hiredis' => :optional
+
+ def install
+ inreplace ['conf/zmap.conf','src/zmap.c','src/zopt.ggo'], '/etc', etc
+
+ args = std_cmake_args
+ args << '-DRESPECT_INSTALL_PREFIX_CONFIG=ON'
+ args << '-DWITH_JSON=ON' if build.with? 'json-c'
+ args << '-DWITH_REDIS=ON' if build.with? 'hiredis'
+
+ system "cmake", ".", *args
+ system "make", "install"
+ end
+
+ test do
+ system "#{sbin}/zmap", "--version"
+ assert_match /json/, `#{sbin}/zmap --list-output-modules` if build.with? 'json-c'
+ assert_match /redis/, `#{sbin}/zmap --list-output-modules` if build.with? 'hiredis'
+ end
+end