-
Notifications
You must be signed in to change notification settings - Fork 6
/
openethereum.rb
42 lines (37 loc) · 1.08 KB
/
openethereum.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'formula'
class Openethereum < Formula
homepage 'https://github.com/openethereum/openethereum'
version '3.2.5'
url 'https://openethereum-releases.gnosis.io/v3.2.5/macos/openethereum'
sha256 'f5f2d1cdfdadf4d6cbb273c733ef7ea3e1f667db769657a857ccc45727d21288'
def install
bin.install "openethereum"
end
test do
system "#{bin}/openethereum", "--version"
end
plist_options :manual => "openethereum"
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>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>300</integer>
<key>ProgramArguments</key>
<array>
<string>#{prefix}/bin/openethereum</string>
</array>
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
</dict>
</plist>
EOS
end
end