2011-03-10 05:11:03 +00:00
|
|
|
class Bazaar < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
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"
|
2015-08-06 18:21:58 +00:00
|
|
|
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
|
|
|
|
|
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
|