From 07c502cbdfbc2a55c753bd14ae4d01d206edda97 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 7 Feb 2014 18:23:17 +0100 Subject: ircd-irc2 2.11.2p3 Closes #26498. Signed-off-by: Adam Vandenberg --- Library/Formula/ircd-irc2.rb | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Library/Formula/ircd-irc2.rb (limited to 'Library') diff --git a/Library/Formula/ircd-irc2.rb b/Library/Formula/ircd-irc2.rb new file mode 100644 index 000000000..c2f36952c --- /dev/null +++ b/Library/Formula/ircd-irc2.rb @@ -0,0 +1,73 @@ +require 'formula' + +class IrcdIrc2 < Formula + homepage 'http://www.irc.org/' + url 'http://www.irc.org/ftp/irc/server/irc2.11.2p3.tgz' + sha1 '1ab317daeac324cc3f10fe939588de04d52e47c5' + version '2.11.2p3' + + def default_ircd_conf + <<-EOS.undent + # M-Line + M:irc.localhost::Darwin ircd default configuration::000A + + # A-Line + A:This is Darwin's default ircd configurations:Please edit your /usr/local/etc/ircd.conf file:Contact for questions::ExampleNet + + # Y-Lines + Y:1:90::100:512000:5.5:100.100 + Y:2:90::300:512000:5.5:250.250 + + # I-Line + I:*:::0:1 + I:127.0.0.1/32:::0:1 + + # P-Line + P::::6667: + EOS + end + + def install + system "./configure", "--prefix=#{prefix}", + "--localstatedir=#{var}", + "--sysconfdir=#{etc}", + "--mandir=#{man}", + "CFLAGS=-DRLIMIT_FDMAX=0" + + # The directory is something like `i686-apple-darwin13.0.2' + system "make", "install", "-C", `./support/config.guess`.chomp + + (etc/"ircd.conf").write default_ircd_conf + end + + plist_options :manual => "ircd" + + def plist; <<-EOS.undent + + + + + KeepAlive + + Label + #{plist_name} + ProgramArguments + + #{opt_prefix}/sbin/ircd + -t + + RunAtLoad + + WorkingDirectory + #{HOMEBREW_PREFIX} + StandardErrorPath + #{var}/ircd.log + + + EOS + end + + test do + system "#{sbin}/ircd", "-version" + end +end -- cgit v1.2.3