<commit_before>require 'formula'

class Zabbix < Formula
  homepage 'http://www.zabbix.com/'
  url 'http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.1/zabbix-2.2.1.tar.gz'
  sha1 '2f07bfa08123f341ff16df88590d154282ce704f'

  option 'with-mysql', 'Use Zabbix Server with MySQL library instead PostgreSQL.'
  option 'agent-only', 'Install only the Zabbix Agent without Server and Proxy.'

  unless build.include? 'agent-only'
    depends_on :mysql => :optional
    depends_on :postgresql unless build.with? 'mysql'
    depends_on 'fping'
    depends_on 'libssh2'
  end

  def brewed_or_shipped(db_config)
    brewed_db_config = "#{HOMEBREW_PREFIX}/bin/#{db_config}"
    (File.exist?(brewed_db_config) && brewed_db_config) || which(db_config)
  end

  def install
    args = %W{
      --disable-dependency-tracking
      --prefix=#{prefix}
      --enable-agent
    }

    unless build.include? 'agent-only'
      args += %W{
        --enable-server
        --enable-proxy
        --enable-ipv6
        --with-net-snmp<commit_msg>zabbix 2.2.2<commit_after>require 'formula'

class Zabbix < Formula
  homepage 'http://www.zabbix.com/'
  url 'http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz'
  sha1 '0be3f194a9ee6a9354d9f18e17b717289fe35a4f'

  option 'with-mysql', 'Use Zabbix Server with MySQL library instead PostgreSQL.'
  option 'agent-only', 'Install only the Zabbix Agent without Server and Proxy.'

  unless build.include? 'agent-only'
    depends_on :mysql => :optional
    depends_on :postgresql unless build.with? 'mysql'
    depends_on 'fping'
    depends_on 'libssh2'
  end

  def brewed_or_shipped(db_config)
    brewed_db_config = "#{HOMEBREW_PREFIX}/bin/#{db_config}"
    (File.exist?(brewed_db_config) && brewed_db_config) || which(db_config)
  end

  def install
    args = %W{
      --disable-dependency-tracking
      --prefix=#{prefix}
      --enable-agent
    }

    unless build.include? 'agent-only'
      args += %W{
        --enable-server
        --enable-proxy
        --enable-ipv6
        --with-net-snmp
{'fraction_non_alphanumeric': 0.12719506407214048, 'fraction_numerical': 0.03844328429046037, 'mean_word_length': 3.1496062992125986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2709263', 'n_tokens_mistral': 816, 'n_tokens_neox': 771, 'n_words': 144}