homebrew-core/Formula/bazaar.rb

47 lines
1.6 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Bazaar < Formula
desc "Human-friendly source code management (or 'version control')"
2015-07-19 09:59:52 +00:00
homepage "http://bazaar.canonical.com/"
url "https://launchpad.net/bzr/2.6/2.6.0/+download/bzr-2.6.0.tar.gz"
sha256 "0994797182eb828867eee81cccc79480bd2946c99304266bc427b902cf91dab0"
revision 2
2014-12-06 18:07:33 +00:00
bottle do
2015-09-21 18:49:28 +00:00
cellar :any_skip_relocation
sha256 "ad25ac7aae3262bb674c9e2261415daecfaaf9b5d5f57ff14428be9409b895b8" => :el_capitan
2015-08-10 03:33:00 +00:00
sha256 "29ff8d9c8fe3eee3a2a2172d5247970a68fa8d24c7516ae06bed9b3849259f2c" => :yosemite
sha256 "cfda2b2e1b18687428c407155cb2e497563279d861120d0aa3f5a9e886cabf76" => :mavericks
sha256 "7aa76616196f64b7a979708bb67703d9e70d4fe74bae55f204c9c844dfe71611" => :mountain_lion
2014-12-06 18:07:33 +00:00
end
def install
ENV.j1 # Builds aren't parallel-safe
2011-01-21 04:38:53 +00:00
# Make and install man page first
2015-07-19 09:59:52 +00:00
system "make", "man1/bzr.1"
2011-01-21 04:38:53 +00:00
man1.install "man1/bzr.1"
# Put system Python first in path
ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin"
system "make"
inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python"
2015-07-19 09:59:52 +00:00
libexec.install "bzr", "bzrlib"
(bin/"bzr").write_env_script(libexec/"bzr", :BZR_PLUGIN_PATH => "+user:#{HOMEBREW_PREFIX}/share/bazaar/plugins")
2015-07-19 09:59:52 +00:00
end
2015-07-19 09:59:52 +00:00
test do
bzr = "#{bin}/bzr"
whoami = "Homebrew"
system bzr, "whoami", whoami
assert_match whoami, shell_output("#{bin}/bzr whoami")
system bzr, "init-repo", "sample"
system bzr, "init", "sample/trunk"
touch testpath/"sample/trunk/test.txt"
cd "sample/trunk" do
system bzr, "add", "test.txt"
system bzr, "commit", "-m", "test"
end
end
end