-
Notifications
You must be signed in to change notification settings - Fork 0
/
qf.rb
82 lines (71 loc) · 2.11 KB
/
qf.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Qf < Formula
desc "Example QuickFIX/Go Applications."
homepage "https://github.com/quickfixgo/examples"
version "2.0.26"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/quickfixgo/examples/releases/download/v2.0.26/qf_2.0.26_Darwin_arm64.tar.gz"
sha256 "a40e5f09ccb4a737b88e9b7039977bcf013a79ab4299cfcdf9cb18c06e254871"
def install
bin.install "qf"
end
end
if Hardware::CPU.intel?
url "https://github.com/quickfixgo/examples/releases/download/v2.0.26/qf_2.0.26_Darwin_x86_64.tar.gz"
sha256 "5afaec9956a7c30eaba3796a439751bf0236cc3a944baa8049e9f5f7f2cf91fc"
def install
bin.install "qf"
end
end
end
on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/quickfixgo/examples/releases/download/v2.0.26/qf_2.0.26_Linux_arm64.tar.gz"
sha256 "ee9b985a87d49c186753b3f745f86e119703272b3f6ddf690a87094d0a4dae52"
def install
bin.install "qf"
end
end
if Hardware::CPU.intel?
url "https://github.com/quickfixgo/examples/releases/download/v2.0.26/qf_2.0.26_Linux_x86_64.tar.gz"
sha256 "6445e427dab3fab00292a708c6e3d74d18472e56d90cac662ef397cbbd02bcee"
def install
bin.install "qf"
end
end
end
def caveats
<<~EOS
Thanks for installing the Quickfix/Go examples
EOS
end
plist_options startup: false
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>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/qf.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/qf.log</string>
</dict>
</plist>
EOS
end
end