52 lines
1.6 KiB
Ruby
52 lines
1.6 KiB
Ruby
class ArchiSteamFarm < Formula
|
|
desc "Application for idling Steam cards from multiple accounts simultaneously"
|
|
homepage "https://github.com/JustArchiNET/ArchiSteamFarm"
|
|
url "https://github.com/JustArchiNET/ArchiSteamFarm.git",
|
|
tag: "5.1.5.3",
|
|
revision: "cc59875769dbc3e525e000a500da888b02785abb"
|
|
license "Apache-2.0"
|
|
head "https://github.com/JustArchiNET/ArchiSteamFarm.git", branch: "main"
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :github_latest
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, big_sur: "9176000d78de480ab4f7e9e5ff92b0806019ccffd56da61bb614f353afbef6c4"
|
|
sha256 cellar: :any_skip_relocation, catalina: "9176000d78de480ab4f7e9e5ff92b0806019ccffd56da61bb614f353afbef6c4"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "7fd2d66547817e45e8f13a9e54a12bfffd78736d1b077590a2dc664a8d143c5d"
|
|
end
|
|
|
|
depends_on "dotnet"
|
|
|
|
def install
|
|
system "dotnet", "publish", "ArchiSteamFarm",
|
|
"--configuration", "Release",
|
|
"--framework", "net#{Formula["dotnet"].version.major_minor}",
|
|
"--output", libexec
|
|
|
|
(bin/"asf").write <<~EOS
|
|
#!/bin/sh
|
|
exec "#{Formula["dotnet"].opt_bin}/dotnet" "#{libexec}/ArchiSteamFarm.dll" "$@"
|
|
EOS
|
|
|
|
etc.install libexec/"config" => "asf"
|
|
rm_rf libexec/"config"
|
|
libexec.install_symlink etc/"asf" => "config"
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Config: #{etc}/asf/
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
_, stdout, wait_thr = Open3.popen2("#{bin}/asf")
|
|
assert_match version.to_s, stdout.gets("\n")
|
|
ensure
|
|
Process.kill("TERM", wait_thr.pid)
|
|
end
|
|
end
|