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
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, autoPatchelfHook
|
||||
, qt5
|
||||
, openssl
|
||||
, boost
|
||||
, db
|
||||
, leveldb
|
||||
, libevent
|
||||
, miniupnpc
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
}:
|
||||
|
||||
let
|
||||
version = "5.1.4";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "triangles-qt";
|
||||
desktopName = "Cryptographic Triangles";
|
||||
genericName = "TRI Wallet";
|
||||
comment = "Cryptographic Triangles cryptocurrency wallet";
|
||||
exec = "triangles-qt %u";
|
||||
icon = "triangles";
|
||||
categories = [ "Finance" "Network" "P2P" "Qt" ];
|
||||
mimeTypes = [ "x-scheme-handler/triangles" ];
|
||||
startupNotify = true;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "triangles";
|
||||
inherit version;
|
||||
|
||||
srcs = [
|
||||
(fetchurl {
|
||||
url = "https://github.com/SamiAhmed7777/triangles_v5/releases/download/v${version}/triangles-qt-linux";
|
||||
sha256 = "19eaadfdf18b899ce8434fe714e690e2db0546597e36037de37a29854fc23aeb";
|
||||
name = "triangles-qt-linux";
|
||||
})
|
||||
(fetchurl {
|
||||
url = "https://github.com/SamiAhmed7777/triangles_v5/releases/download/v${version}/trianglesd-linux";
|
||||
sha256 = "6f5c19d34a2e1f6cdadee095d9e11b25d18b41a0d1602a163ffca7ec80b3da37";
|
||||
name = "trianglesd-linux";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
qt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qt5.qtbase
|
||||
openssl
|
||||
boost
|
||||
db
|
||||
leveldb
|
||||
libevent
|
||||
miniupnpc
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 ${builtins.elemAt srcs 0} $out/bin/triangles-qt
|
||||
install -Dm755 ${builtins.elemAt srcs 1} $out/bin/trianglesd
|
||||
install -Dm644 ${desktopItem}/share/applications/* $out/share/applications/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cryptographic Triangles (TRI) cryptocurrency wallet";
|
||||
longDescription = ''
|
||||
Privacy-focused cryptocurrency featuring Proof-of-Stake consensus
|
||||
with 33% annual staking rewards, Tor v3 onion routing, and built-in
|
||||
encrypted peer-to-peer messaging. Originally launched in July 2014,
|
||||
featuring the unique Hash9 algorithm (13-step hash cascade).
|
||||
'';
|
||||
homepage = "https://cryptographic-triangles.org";
|
||||
license = licenses.mit;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "triangles-qt";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Build RPM package for Cryptographic Triangles
|
||||
# Run on a Fedora/RHEL/openSUSE system with rpmbuild installed
|
||||
# Install build tools: sudo dnf install rpm-build rpmdevtools
|
||||
set -e
|
||||
|
||||
VERSION="5.1.4"
|
||||
RELEASE_URL="https://github.com/SamiAhmed7777/triangles_v5/releases/download/v${VERSION}"
|
||||
|
||||
echo "Building RPM for Triangles v${VERSION}..."
|
||||
|
||||
# Set up rpmbuild directory structure
|
||||
rpmdev-setuptree
|
||||
|
||||
# Download sources into SOURCES
|
||||
echo "Downloading binaries..."
|
||||
curl -L -o ~/rpmbuild/SOURCES/triangles-qt-linux "${RELEASE_URL}/triangles-qt-linux"
|
||||
curl -L -o ~/rpmbuild/SOURCES/trianglesd-linux "${RELEASE_URL}/trianglesd-linux"
|
||||
cp triangles-qt.desktop ~/rpmbuild/SOURCES/
|
||||
|
||||
# Copy spec file
|
||||
cp triangles.spec ~/rpmbuild/SPECS/
|
||||
|
||||
# Build the RPM (binary only, no source compilation needed)
|
||||
rpmbuild -bb ~/rpmbuild/SPECS/triangles.spec
|
||||
|
||||
echo "RPM built in ~/rpmbuild/RPMS/x86_64/"
|
||||
echo "Install with: sudo dnf install ~/rpmbuild/RPMS/x86_64/triangles-${VERSION}-1.*.x86_64.rpm"
|
||||
@@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Cryptographic Triangles
|
||||
GenericName=TRI Wallet
|
||||
Comment=Cryptographic Triangles cryptocurrency wallet
|
||||
Exec=triangles-qt %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=triangles
|
||||
MimeType=x-scheme-handler/triangles;
|
||||
Categories=Finance;Network;P2P;Qt;
|
||||
StartupNotify=true
|
||||
@@ -0,0 +1,44 @@
|
||||
Name: triangles
|
||||
Version: 5.1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: Cryptographic Triangles (TRI) cryptocurrency wallet
|
||||
License: MIT
|
||||
URL: https://cryptographic-triangles.org
|
||||
Source0: https://github.com/SamiAhmed7777/triangles_v5/releases/download/v%{version}/triangles-qt-linux
|
||||
Source1: https://github.com/SamiAhmed7777/triangles_v5/releases/download/v%{version}/trianglesd-linux
|
||||
Source2: triangles-qt.desktop
|
||||
|
||||
BuildArch: x86_64
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
Requires: qt5-qtbase
|
||||
Requires: qt5-qtbase-gui
|
||||
Requires: openssl-libs
|
||||
Requires: boost-system
|
||||
Requires: boost-filesystem
|
||||
Requires: boost-program-options
|
||||
Requires: boost-thread
|
||||
Requires: boost-chrono
|
||||
Requires: libevent
|
||||
Requires: miniupnpc-libs
|
||||
Requires: libdb-cxx
|
||||
Recommends: tor
|
||||
|
||||
%description
|
||||
Privacy-focused cryptocurrency featuring Proof-of-Stake consensus
|
||||
with 33% annual staking rewards, Tor v3 onion routing, and built-in
|
||||
encrypted peer-to-peer messaging. Originally launched in July 2014,
|
||||
featuring the unique Hash9 algorithm (13-step hash cascade).
|
||||
|
||||
This package contains the Qt GUI wallet (triangles-qt) and the
|
||||
headless daemon (trianglesd).
|
||||
|
||||
%install
|
||||
install -Dm755 %{SOURCE0} %{buildroot}%{_bindir}/triangles-qt
|
||||
install -Dm755 %{SOURCE1} %{buildroot}%{_bindir}/trianglesd
|
||||
install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/applications/triangles-qt.desktop
|
||||
|
||||
%files
|
||||
%{_bindir}/triangles-qt
|
||||
%{_bindir}/trianglesd
|
||||
%{_datadir}/applications/triangles-qt.desktop
|
||||
Reference in New Issue
Block a user