homebrew-core/Formula/mercurial.rb
2015-01-09 21:55:05 +00:00

35 lines
1.2 KiB
Ruby

# No head build supported; if you need head builds of Mercurial, do so outside
# of Homebrew.
class Mercurial < Formula
homepage "http://mercurial.selenic.com/"
url "http://mercurial.selenic.com/release/mercurial-3.2.4.tar.gz"
sha1 "6adc45a99f036a3fe3433a4d24e5641c91acb693"
bottle do
cellar :any
sha1 "70793c59ab9c56e13df2dfc08af7d386794ea0e6" => :yosemite
sha1 "466d3dceb99256119196e06effd8bb18ea8accea" => :mavericks
sha1 "5adc409dc7655f094c19f1ec1026efbde4775109" => :mountain_lion
end
def install
ENV.minimal_optimization if MacOS.version <= :snow_leopard
system "make", "PREFIX=#{prefix}", "install-bin"
# Install man pages, which come pre-built in source releases
man1.install "doc/hg.1"
man5.install "doc/hgignore.5", "doc/hgrc.5"
# install the completion scripts
bash_completion.install "contrib/bash_completion" => "hg-completion.bash"
zsh_completion.install "contrib/zsh_completion" => "_hg"
# install the merge tool default configs
# http://mercurial.selenic.com/wiki/Packaging#Things_to_note
(etc/"mercurial"/"hgrc.d").install "contrib/mergetools.hgrc" => "mergetools.rc"
end
test do
system "#{bin}/hg", "init"
end
end