homebrew-core/Formula/ipfs.rb

50 lines
1.4 KiB
Ruby
Raw Normal View History

require "language/go"
class Ipfs < Formula
desc "IPFS is The Permanent Web - A new peer-to-peer hypermedia protocol"
2015-10-16 14:18:09 +00:00
homepage "https://ipfs.io/"
url "https://github.com/ipfs/go-ipfs.git",
:tag => "v0.3.11",
:revision => "7070b4d878baad57dcc8da80080dd293aa46cabd"
head "https://github.com/ipfs/go-ipfs.git"
2015-07-01 23:25:38 +00:00
bottle do
2015-11-02 20:39:00 +00:00
cellar :any_skip_relocation
2016-02-18 19:24:32 +00:00
revision 1
sha256 "6744fb99a312598513e260adbd3b5895db82c0f0b6f447a58b0cc9084bf4b5cc" => :el_capitan
sha256 "3b641f107ec102859819afcea8ed5b8265e7b295fba1913af6b1b55593d5956e" => :yosemite
sha256 "dd9de372d81abb5e624b320fa4fb00f175c991bf3b6705b12423973b4cafaa97" => :mavericks
2015-07-01 23:25:38 +00:00
end
depends_on "go" => :build
2015-11-14 10:30:49 +00:00
depends_on "godep" => :build
go_resource "github.com/kr/fs" do
url "https://github.com/kr/fs.git",
:revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
end
go_resource "golang.org/x/tools" do
url "https://go.googlesource.com/tools",
:using => :git,
:revision => "d02228d1857b9f49cd0252788516ff5584266eb6"
end
def install
ENV["GOPATH"] = buildpath
2016-02-18 18:47:20 +00:00
ENV["GO15VENDOREXPERIMENT"] = "0"
mkdir_p buildpath/"src/github.com/ipfs/"
ln_sf buildpath, buildpath/"src/github.com/ipfs/go-ipfs"
Language::Go.stage_deps resources, buildpath/"src"
cd "cmd/ipfs" do
system "make", "build"
bin.install "ipfs"
end
end
test do
system "#{bin}/ipfs", "version"
end
end