aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rabbitmq-c.rb
blob: 37453ca2fd7ce75fc9e6c3470d7057f8ac62758d (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
29
30
31
32
33
34
35
36
37
38
39
40
41
require "formula"

class RabbitmqC < Formula
  homepage "https://github.com/alanxz/rabbitmq-c"
  url "https://github.com/alanxz/rabbitmq-c/archive/v0.5.1.tar.gz"
  sha1 "3a2fad69f65ef3a733fbfd9320717d2aedec5aa2"

  head "https://github.com/alanxz/rabbitmq-c.git"

  bottle do
    cellar :any
    sha1 "7637f895726ed8e597c02b616ba7f9a27109da91" => :mavericks
    sha1 "e9b5682c5fe0d5e5dfec55ce4c3f0957182755b1" => :mountain_lion
    sha1 "4ae0eb86504082c622c642f3c27f6361d0af4fad" => :lion
  end

  option :universal
  option "without-tools", "Build without command-line tools"

  depends_on "pkg-config" => :build
  depends_on "cmake" => :build
  depends_on "rabbitmq" => :recommended
  depends_on "popt" if build.with? "tools"

  def install
    ENV.universal_binary if build.universal?
    args = std_cmake_args
    args << "-DBUILD_EXAMPLES=OFF"
    args << "-DBUILD_TESTS=OFF"
    args << "-DBUILD_API_DOCS=OFF"

    args << if build.with? "tools"
      "-DBUILD_TOOLS=ON"
    else
      "-DBUILD_TOOLS=OFF"
    end

    system "cmake", ".", *args
    system "make", "install"
  end
end