2012-09-18 20:25:19 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class IrcdHybrid < Formula
|
|
|
|
homepage 'http://www.ircd-hybrid.org/'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/ircd-hybrid/ircd-hybrid/ircd-hybrid-8.1.1/ircd-hybrid-8.1.1.tgz'
|
2013-06-14 20:18:26 +00:00
|
|
|
sha1 'efdafab2ec56e9e1854df5bd0e01bf5f5afca00e'
|
2012-09-18 20:25:19 +00:00
|
|
|
|
|
|
|
# ircd-hybrid needs the .la files
|
2012-10-21 20:06:40 +00:00
|
|
|
skip_clean :la
|
2012-09-18 20:25:19 +00:00
|
|
|
|
2013-02-01 15:57:45 +00:00
|
|
|
# system openssl fails with undefined symbols: "_SSL_CTX_clear_options"
|
|
|
|
depends_on 'openssl' if MacOS.version < :lion
|
|
|
|
|
2012-09-18 20:25:19 +00:00
|
|
|
def install
|
2013-02-01 15:57:45 +00:00
|
|
|
ENV.j1 # build system trips over itself
|
|
|
|
|
2012-09-18 20:25:19 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2012-09-19 00:12:01 +00:00
|
|
|
"--localstatedir=#{var}",
|
2013-04-16 17:29:52 +00:00
|
|
|
"--sysconfdir=#{etc}",
|
2012-09-19 00:12:01 +00:00
|
|
|
# there's no config setting for this so set it to something generous
|
|
|
|
"--with-nicklen=30"
|
2012-09-18 20:25:19 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2013-02-01 15:57:45 +00:00
|
|
|
system "#{sbin}/ircd", "-version"
|
2012-09-18 20:25:19 +00:00
|
|
|
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
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "ircd"
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<false/>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_prefix}/sbin/ircd</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
|
|
<key>StandardErrorPath</key>
|
|
|
|
<string>#{var}/ircd.log</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
2012-09-18 20:25:19 +00:00
|
|
|
end
|
|
|
|
end
|