From d04cfd64680571733f9c371e171227b37693dabd Mon Sep 17 00:00:00 2001 From: Tommaso Gragnato Date: Sat, 7 Sep 2024 13:11:40 +0200 Subject: [PATCH] feat(magnetico): add `tgragnato/magnetico` version 1.61.2 --- .github/workflows/tests.yml | 2 ++ Formula/magnetico.rb | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Formula/magnetico.rb diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4828fed..10613f9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,3 +40,5 @@ jobs: - run: brew test-bot --only-tap-syntax - run: brew test-bot --only-formulae --root-url=https://ghcr.io/v2/tgragnato/tap amule + + - run: brew test-bot --only-formulae --root-url=https://ghcr.io/v2/tgragnato/tap magnetico diff --git a/Formula/magnetico.rb b/Formula/magnetico.rb new file mode 100644 index 0000000..adbf2f5 --- /dev/null +++ b/Formula/magnetico.rb @@ -0,0 +1,22 @@ +class Magnetico < Formula + desc "Autonomous (self-hosted) BitTorrent DHT search engine suite" + homepage "https://github.com/tgragnato/magnetico/" + url "https://github.com/tgragnato/magnetico.git", + tag: "v1.61.2", + revision: "5ed053c9c2d38c6650bc6ba22935326dc6d3b378" + license "AGPL-3.0-only" + + depends_on "go" => :build + depends_on "czmq" => :build + + def install + ENV["CGO_ENABLED"] = "1" + ENV["GOPATH"] = buildpath + system "go", "build", *std_go_args, "-o", bin/"magnetico", "." + end + + test do + system "go", "test", "./..." + system "#{bin}/magnetico", "--version" + end +end