2015-06-26 15:33:14 +00:00
|
|
|
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/"
|
2015-06-26 15:33:14 +00:00
|
|
|
url "https://github.com/ipfs/go-ipfs.git",
|
2016-01-19 09:30:57 +00:00
|
|
|
:tag => "v0.3.11",
|
|
|
|
:revision => "7070b4d878baad57dcc8da80080dd293aa46cabd"
|
2015-08-05 18:52:39 +00:00
|
|
|
head "https://github.com/ipfs/go-ipfs.git"
|
2015-06-26 15:33:14 +00:00
|
|
|
|
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
|
|
|
|
|
2015-06-26 15:33:14 +00:00
|
|
|
depends_on "go" => :build
|
2015-11-14 10:30:49 +00:00
|
|
|
depends_on "godep" => :build
|
2015-06-26 15:33:14 +00:00
|
|
|
|
|
|
|
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,
|
2015-11-02 12:02:07 +00:00
|
|
|
:revision => "d02228d1857b9f49cd0252788516ff5584266eb6"
|
2015-06-26 15:33:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
2016-02-18 18:47:20 +00:00
|
|
|
ENV["GO15VENDOREXPERIMENT"] = "0"
|
2015-06-26 15:33:14 +00:00
|
|
|
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
|