PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/Formula/ngircd.rb

https://gitlab.com/jcsilkey/homebrew-core
Ruby | 57 lines | 44 code | 10 blank | 3 comment | 6 complexity | f96d0505973f808cf69751368a3854f9 MD5 | raw file
  1. class Ngircd < Formula
  2. desc "Next generation IRC daemon"
  3. homepage "http://ngircd.barton.de/"
  4. url "http://ngircd.barton.de/pub/ngircd/ngircd-23.tar.gz"
  5. mirror "https://ngircd.mirror.3rz.org/pub/ngircd/ngircd-23.tar.gz"
  6. sha256 "99b8b67a975a9ae9b81c96bdee02133a10f515c718825d34cedcb64f1fc95e73"
  7. bottle do
  8. sha256 "5ca03cd4c4b96553c0be0361311baad578ed5f33b0b70e510b2d503f2f5354b9" => :el_capitan
  9. sha256 "32286cf3a53887c07293cc0d712aadd5ed7dc567d2f90bc3c9768d247d09061a" => :yosemite
  10. sha256 "b8a848cce3bde15ed760b3c93065b5914dcd222cee5c11c4401e7901c929246e" => :mavericks
  11. end
  12. option "with-iconv", "Enable character conversion using libiconv."
  13. option "with-pam", "Enable user authentication using PAM."
  14. option "with-sniffer", "Enable IRC traffic sniffer (also enables additional debug output)."
  15. option "with-debug", "Enable additional debug output."
  16. # Older Formula used the next option by default, so keep it unless
  17. # deactivated by the user:
  18. option "without-ident", "Disable 'IDENT' ('AUTH') protocol support."
  19. depends_on "libident" if build.with? "ident"
  20. depends_on "openssl"
  21. def install
  22. args = %W[
  23. --disable-dependency-tracking
  24. --prefix=#{prefix}
  25. --sysconfdir=#{HOMEBREW_PREFIX}/etc
  26. --enable-ipv6
  27. --with-openssl
  28. ]
  29. args << "--with-iconv" if build.with? "iconv"
  30. args << "--with-ident" if build.with? "ident"
  31. args << "--with-pam" if build.with? "pam"
  32. args << "--enable-debug" if build.with? "debug"
  33. args << "--enable-sniffer" if build.with? "sniffer"
  34. system "./configure", *args
  35. system "make", "install"
  36. prefix.install "contrib/MacOSX/de.barton.ngircd.plist.tmpl" => "de.barton.ngircd.plist"
  37. (prefix+"de.barton.ngircd.plist").chmod 0644
  38. inreplace prefix+"de.barton.ngircd.plist" do |s|
  39. s.gsub! ":SBINDIR:", sbin
  40. s.gsub! "/Library/Logs/ngIRCd.log", var/"Logs/ngIRCd.log"
  41. end
  42. end
  43. test do
  44. # Exits non-zero, so test version and match Author's name supplied.
  45. assert_match /Alexander/, pipe_output("#{sbin}/ngircd -V 2>&1")
  46. end
  47. end