aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorBjörn Albers2012-08-31 06:40:16 +0200
committerAdam Vandenberg2012-09-30 12:29:07 -0700
commit9bf9bab4b4e68e889686da6f63da268bd1bd8bdc (patch)
tree1ae23d593152d8713914b80d4b675c8cb1b64099 /Library
parent74490c4d1d13d87a4d83f4d55249f45a5e477bc2 (diff)
downloadhomebrew-9bf9bab4b4e68e889686da6f63da268bd1bd8bdc.tar.bz2
Zabbix 2.0.2
Closes #14587. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/zabbix.rb65
1 files changed, 65 insertions, 0 deletions
diff --git a/Library/Formula/zabbix.rb b/Library/Formula/zabbix.rb
new file mode 100644
index 000000000..fc4607cd7
--- /dev/null
+++ b/Library/Formula/zabbix.rb
@@ -0,0 +1,65 @@
+require 'formula'
+
+class MySqlInstalled < Requirement
+ def message; <<-EOS.undent
+ MySQL is required to install.
+
+ You can install this with Homebrew using:
+ brew install mysql-connector-c
+ For MySQL client libraries only.
+
+ brew install mysql
+ For MySQL server.
+
+ Or you can use an official installer from:
+ http://dev.mysql.com/downloads/mysql/
+ EOS
+ end
+
+ def satisfied?
+ which 'mysql_config'
+ end
+
+ def fatal?
+ true
+ end
+end
+
+class Zabbix < Formula
+ homepage 'http://www.zabbix.com/'
+ url 'http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.2/zabbix-2.0.2.tar.gz'
+ sha1 'aaa678bc6abc6cb2b174e599108ad19f187047c9'
+
+ depends_on MySqlInstalled.new
+ depends_on 'fping'
+ depends_on 'libssh2'
+
+ def install
+ which_mysql = which('mysql_config') || "#{HOMEBREW_PREFIX}/bin/mysql_config"
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--enable-server",
+ "--enable-agent",
+ "--with-mysql=#{which_mysql}",
+ "--enable-ipv6",
+ "--with-net-snmp",
+ "--with-libcurl",
+ "--with-ssh2"
+
+ system "make install"
+ (share/'zabbix').install 'frontends/php', 'database/mysql'
+ end
+
+ def caveats; <<-EOS.undent
+ Please read the fine manual for post-install instructions:
+ http://www.zabbix.com/documentation/2.0/manual
+
+ Or just use Puppet:
+ https://github.com/bjoernalbers/puppet-zabbix_osx
+ EOS
+ end
+
+ def test
+ system "#{sbin}/zabbix_agent", "--print"
+ end
+end