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:
2026-03-15 02:59:33 -07:00
parent 322d227ec6
commit f64361fc11
7 changed files with 338 additions and 10 deletions
+21 -3
View File
@@ -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