homebrew-core/Formula/go.rb
Chris Schepman 9f5eb9f047 go: install AUTHORS to prevent test failure
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-06 11:08:02 -07:00

32 lines
819 B
Ruby

require 'formula'
require 'hardware'
class Go < Formula
if ARGV.include? "--use-git-head"
head 'https://github.com/tav/go.git', :tag => 'release'
else
head 'http://go.googlecode.com/hg/', :revision => 'release'
end
homepage 'http://golang.org'
def options
[["--use-git-head", "Use git mirror instead of official hg repository"]]
end
skip_clean 'bin'
def install
ENV.j1 # https://github.com/mxcl/homebrew/issues/#issue/237
prefix.install %w[src include test doc misc lib favicon.ico AUTHORS]
Dir.chdir prefix
mkdir %w[pkg bin]
Dir.chdir 'src' do
system "./all.bash"
end
# Keep the makefiles - https://github.com/mxcl/homebrew/issues/issue/1404
Dir['src/*'].each{|f| rm_rf f unless f.match(/^src\/(pkg|Make)/) }
rm_rf %w[include test]
end
end