require 'formula' class IrcdHybrid < Formula homepage 'http://www.ircd-hybrid.org/' url 'http://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.1.7/ircd-hybrid-8.1.7.tgz' sha1 '8c18839d7cfa289117c49afeac045d282e23441c' # ircd-hybrid needs the .la files skip_clean :la # system openssl fails with undefined symbols: "_SSL_CTX_clear_options" depends_on 'openssl' if MacOS.version < :lion def install ENV.j1 # build system trips over itself system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}", # there's no config setting for this so set it to something generous "--with-nicklen=30" system "make install" end def test system "#{sbin}/ircd", "-version" end def caveats; <<-EOS.undent You'll more than likely need to edit the default settings in the config file: #{etc}/ircd.conf EOS end plist_options :manual => "ircd" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_prefix}/sbin/ircd RunAtLoad WorkingDirectory #{HOMEBREW_PREFIX} StandardErrorPath #{var}/ircd.log EOS end end