aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/juju.rb
blob: c677117e7b6cf966e07c7b4f12da9ff1c1f6f7d6 (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
require 'formula'

class Juju < Formula
  homepage 'https://juju.ubuntu.com'
  url 'https://launchpad.net/juju-core/1.20/1.20.10/+download/juju-core_1.20.10.tar.gz'
  sha1 '0f59ba487382136f923d9be992d705db3da3e418'

  bottle do
    sha1 "683e051827f984024d87a8d9e55611103c862180" => :mavericks
    sha1 "9dc22987b545b65a787bcebcce55e456b2a1ad2a" => :mountain_lion
    sha1 "bd25350f412c097d907998a5e921c8e1cd233fa0" => :lion
  end

  depends_on 'go' => :build

  def install
    ENV["GOPATH"] = buildpath
    system "go", "build", "github.com/juju/juju/cmd/juju"
    system "go", "build", "github.com/juju/juju/cmd/plugins/juju-metadata"
    bin.install "juju", "juju-metadata"
    bash_completion.install "src/github.com/juju/juju/etc/bash_completion.d/juju-core"
  end

  test do
    system "#{bin}/juju", "version"
  end
end