aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/znc.rb
blob: 73cf8a743061057436fee43deb9265a1126cb4c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'

class Znc < Formula
  homepage 'http://wiki.znc.in/ZNC'
  url 'http://znc.in/releases/archive/znc-1.0.tar.gz'
  sha1 '50e6e3aacb67cf0a63d77f5031d4b75264cee294'

  head do
    url 'https://github.com/znc/znc.git'

    depends_on :autoconf
    depends_on :automake
    depends_on :libtool
  end

  option 'enable-debug', "Compile ZNC with --enable-debug"

  depends_on 'pkg-config' => :build

  def install
    args = ["--prefix=#{prefix}"]
    args << "--enable-debug" if build.include? 'enable-debug'

    system "./autogen.sh" if build.head?
    system "./configure", *args
    system "make install"
  end
end