52 lines
1.5 KiB
Ruby
52 lines
1.5 KiB
Ruby
class Ipfs < Formula
|
|
desc "Peer-to-peer hypermedia protocol"
|
|
homepage "https://ipfs.io/"
|
|
url "https://github.com/ipfs/go-ipfs.git",
|
|
:tag => "v0.4.11",
|
|
:revision => "41102bdc4d14f106b14cffe2640dd8981f8b31ef"
|
|
head "https://github.com/ipfs/go-ipfs.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "23887d115776a9b2b21b4f3af4984fdcedd881243b8f68dc7603df5cd5e33638" => :high_sierra
|
|
sha256 "16edf3c90c7dbd10e878b542e6f6724ac22a0a31079d1784a142870808fafebe" => :sierra
|
|
sha256 "0e0c75fde0b4276205b038abb36dfbfc4332672e6cc40e4c752a54afb26606b5" => :el_capitan
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "godep" => :build
|
|
depends_on "gx"
|
|
depends_on "gx-go"
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
(buildpath/"src/github.com/ipfs/go-ipfs").install buildpath.children
|
|
cd("src/github.com/ipfs/go-ipfs") { system "make", "install" }
|
|
bin.install "bin/ipfs"
|
|
end
|
|
|
|
plist_options :manual => "ipfs daemon"
|
|
|
|
def plist; <<~EOS
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/ipfs</string>
|
|
<string>daemon</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system bin/"ipfs", "version"
|
|
end
|
|
end
|