homebrew-core/Formula/bazaar.rb

45 lines
1.5 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Bazaar < Formula
desc "Friendly powerful distributed version control system"
2015-07-19 09:59:52 +00:00
homepage "http://bazaar.canonical.com/"
url "https://launchpad.net/bzr/2.7/2.7.0/+download/bzr-2.7.0.tar.gz"
sha256 "0d451227b705a0dd21d8408353fe7e44d3a5069e6c4c26e5f146f1314b8fdab3"
2014-12-06 18:07:33 +00:00
bottle do
2015-09-21 18:49:28 +00:00
cellar :any_skip_relocation
2016-02-10 21:25:53 +00:00
sha256 "75e4a4aa57887371b783839667da3a142805c60f13197d599f6c8ef95c104707" => :el_capitan
sha256 "7919335ffdd76bd54a3b58da3e7d9499f8bc6dd895b1d117390bb19ceaf08818" => :yosemite
sha256 "51a058a4ff6b070a62ce30d01a673bba74d65d4eab6a13a9d53696f24cceb80d" => :mavericks
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