Add macOS CI build, RPM, and Nix packaging
- GitHub Actions workflow builds DMGs for both Intel and Apple Silicon - Update .pro file: macOS 11+ target, Homebrew paths instead of MacPorts - Add RPM spec + build script for Fedora/RHEL/openSUSE - Add Nix derivation with autoPatchelfHook - Update Homebrew formula to support macOS (Intel + ARM64) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,16 +4,30 @@ class Triangles < Formula
|
||||
license "MIT"
|
||||
version "5.1.4"
|
||||
|
||||
on_macos do
|
||||
if Hardware::CPU.intel?
|
||||
url "https://github.com/SamiAhmed7777/triangles_v5/releases/download/v5.1.4/Cryptographic-Triangles-v5.1.4-macos-x64.dmg"
|
||||
sha256 "PLACEHOLDER_X64_HASH"
|
||||
else
|
||||
url "https://github.com/SamiAhmed7777/triangles_v5/releases/download/v5.1.4/Cryptographic-Triangles-v5.1.4-macos-arm64.dmg"
|
||||
sha256 "PLACEHOLDER_ARM64_HASH"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
url "https://github.com/SamiAhmed7777/triangles_v5/releases/download/v5.1.4/trianglesd-linux"
|
||||
sha256 "6f5c19d34a2e1f6cdadee095d9e11b25d18b41a0d1602a163ffca7ec80b3da37"
|
||||
end
|
||||
|
||||
depends_on "openssl@3"
|
||||
depends_on :linux
|
||||
|
||||
def install
|
||||
bin.install "trianglesd-linux" => "trianglesd"
|
||||
if OS.mac?
|
||||
prefix.install "Triangles-Qt.app"
|
||||
bin.write_exec_script prefix/"Triangles-Qt.app/Contents/MacOS/Triangles-Qt"
|
||||
else
|
||||
bin.install "trianglesd-linux" => "trianglesd"
|
||||
end
|
||||
end
|
||||
|
||||
service do
|
||||
@@ -23,6 +37,10 @@ class Triangles < Formula
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/trianglesd", "-version"
|
||||
if OS.mac?
|
||||
assert_predicate prefix/"Triangles-Qt.app", :exist?
|
||||
else
|
||||
system "#{bin}/trianglesd", "-version"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user