homebrew-core/Formula/ipfs.rb
Mike McQuaid 512758e6eb Rubocop 0.57.1 style fixes (#28754)
Realign trailing EOS.
2018-06-09 01:27:43 -07:00

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.15",
:revision => "7853e53860805e08a212d78c4baa5d59bff99ba8"
head "https://github.com/ipfs/go-ipfs.git"
bottle do
cellar :any_skip_relocation
sha256 "93256caf3062d307bd1fffe99c7dbb5dd5d454f36ec2611594be54c0a63ab7f2" => :high_sierra
sha256 "6112ae0ca442b1b664022c4d39d75b8fef1a1b86d3fb9d117422b8ee20c1a959" => :sierra
sha256 "88504f1f55c3a4e7a7253f1c9efa1e1b58e576ec79b308146c44cd9913eb8c74" => :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