aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/uru.rb
blob: 3054dabc756dd55786c7291788d7e0b22de54704 (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
require "formula"

class Uru < Formula
  homepage "https://bitbucket.org/jonforums/uru"
  url "https://bitbucket.org/jonforums/uru/get/v0.7.6.tar.gz"
  sha1 "c1618f861c94318004cdede66946f31436b410e7"

  bottle do
    cellar :any
    sha1 "9476d70ca74e2074129067a8b820065ec7e7a86b" => :yosemite
    sha1 "61e905c6a60df009190c87afb830536e53419cdd" => :mavericks
    sha1 "6353400d611ed746f6f232a86c8ba8a18e89a06a" => :mountain_lion
  end

  depends_on "go" => :build

  def install
    ENV["GOPATH"] = buildpath
    (buildpath/"src/bitbucket.org/jonforums/uru").install Dir["*"]
    system "go", "build", "-ldflags", "-s", "bitbucket.org/jonforums/uru"
    bin.install "uru" => "uru_rt"
  end

  def caveats; <<-EOS.undent
    Append to ~/.profile on Ubuntu, or to ~/.zshrc on Zsh
    $ echo 'eval "$(uru_rt admin install)"' >> ~/.bash_profile
    EOS
  end

  test do
    system "#{bin}/uru_rt"
  end
end