ipfs: add plist

Closes #10767.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
Silke 2017-03-08 11:40:57 +01:00 committed by Alex Dunn
parent ba5ddba4e2
commit 2d853f13ee

View file

@ -25,6 +25,27 @@ class Ipfs < Formula
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