-
Notifications
You must be signed in to change notification settings - Fork 31
/
panamax.rb
29 lines (24 loc) · 935 Bytes
/
panamax.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
require "formula"
class Panamax < Formula
homepage "http://www.panamax.io"
url "http://download.panamax.io/installer/panamax-0.6.5.tar.gz"
sha1 "de267b69776d81204d15a64c67c8d097279373c6"
def install
system "./configure", "--prefix=#{prefix}", "--var=#{var}/panamax"
system "make", "install"
resource("additional_files").stage { bin.install "panamaxcli-darwin" }
mv bin/"panamaxcli-darwin",bin/"pmxcli"
end
def caveats
"If upgrading the Panamax Installer, be sure to run 'panamax reinstall' to ensure compatibility with other Panamax components."
end
resource "additional_files" do
url "http://download.panamax.io/panamaxcli/panamaxcli-darwin"
sha1 "e01531c41cc9a2d24a2dafb0d130a358e34c885d"
end
test do
assert File.exist?("#{prefix}/.panamax")
assert File.exist?("#{var}/panamax")
assert_match "#{version}", shell_output("#{prefix}/.panamax/panamax -v").strip
end
end