49 lines
1.4 KiB
Ruby
49 lines
1.4 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.19",
|
|
:revision => "83d3f7672b82ccb03e4c106d93e9dadc6427f246"
|
|
head "https://github.com/ipfs/go-ipfs.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "76bf9fcba53fe32bf6d858e5b5d7c7d6987eaf18284d6db6ee70e88f2b052aab" => :mojave
|
|
sha256 "d4fd3569b3947e978a997d05c7ffec4afde680ed40905578ecbb7a96a3c511d9" => :high_sierra
|
|
sha256 "ab5a73f05d99d58f4748c29808cfdcb77916d85292fb57c16b0ec4e831a7fe3e" => :sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
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
|
|
assert_match "initializing IPFS node", shell_output(bin/"ipfs init")
|
|
end
|
|
end
|