2011-03-10 05:11:03 +00:00
|
|
|
class Bazaar < Formula
|
2016-02-09 21:19:22 +00:00
|
|
|
desc "Friendly powerful distributed version control system"
|
2015-07-19 09:59:52 +00:00
|
|
|
homepage "http://bazaar.canonical.com/"
|
2016-02-09 21:19:22 +00:00
|
|
|
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
|
|
|
|
|
2009-11-19 03:49:34 +00:00
|
|
|
def install
|
2013-12-06 04:33:36 +00:00
|
|
|
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"
|
|
|
|
|
2013-12-06 04:33:36 +00:00
|
|
|
# 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"
|
|
|
|
|
2015-08-06 18:21:58 +00:00
|
|
|
(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
|
2010-01-19 14:41:25 +00:00
|
|
|
|
2015-07-19 09:59:52 +00:00
|
|
|
test do
|
2015-02-02 21:34:00 +00:00
|
|
|
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
|
2013-07-18 11:36:26 +00:00
|
|
|
end
|
2009-11-19 03:49:34 +00:00
|
|
|
end
|