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.8",
|
|
:revision => "8e7484ed794d1aecb3e773e9003ae64c7b78bb87"
|
|
head "https://github.com/ipfs/go-ipfs.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "224c3c9f0d172d734410800cd42d73ab95087323dce6d7827169c875a4a71204" => :sierra
|
|
sha256 "49c6258ae0403a4be33daef5f24b1d678a2eb5d3d3e201fd833c7eb2e2993678" => :el_capitan
|
|
sha256 "490912c4efcee5870cdcf6bc3e56473851142e9bc722801aaa4e3e926d723aa0" => :yosemite
|
|
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"
|
|
|
|
def plist; <<-EOS.undent
|
|
<?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
|