2021-04-27 14:49:33 +08:00
|
|
|
require_relative "../require/macfuse"
|
|
|
|
|
|
|
|
|
|
class BtfsMac < Formula
|
|
|
|
|
desc "BitTorrent filesystem based on FUSE"
|
|
|
|
|
homepage "https://github.com/johang/btfs"
|
2025-02-10 20:21:16 +08:00
|
|
|
url "https://github.com/johang/btfs/archive/refs/tags/v2.24.tar.gz"
|
2021-04-27 14:49:33 +08:00
|
|
|
sha256 "d71ddefe3c572e05362542a0d9fd0240d8d4e1578ace55a8b3245176e7fd8935"
|
|
|
|
|
license "GPL-3.0-only"
|
2025-02-12 20:05:46 +08:00
|
|
|
revision 1
|
|
|
|
|
head "https://github.com/johang/btfs.git", branch: "master"
|
2021-04-27 14:49:33 +08:00
|
|
|
|
|
|
|
|
bottle do
|
2025-02-12 12:24:40 +00:00
|
|
|
root_url "https://ghcr.io/v2/gromgit/fuse"
|
|
|
|
|
sha256 cellar: :any, arm64_sonoma: "71e05be0beb418720d313a63f10cfea741d648bf78630b497eb2c51a5003d319"
|
|
|
|
|
sha256 cellar: :any, ventura: "388cc358e3c9372768469b6b1021f43d8def07f372aaef6e3f5d2d80bc93be48"
|
2021-04-27 14:49:33 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
|
depends_on "automake" => :build
|
2025-02-12 20:05:46 +08:00
|
|
|
depends_on "pkgconf" => :build
|
2021-04-27 14:49:33 +08:00
|
|
|
depends_on "libtorrent-rasterbar"
|
|
|
|
|
depends_on MacfuseRequirement
|
|
|
|
|
depends_on :macos
|
|
|
|
|
|
|
|
|
|
def install
|
2021-07-04 00:27:00 +08:00
|
|
|
setup_fuse
|
2022-11-25 17:44:29 +08:00
|
|
|
system "autoreconf", "--force", "--install", "--verbose"
|
|
|
|
|
system "./configure", *std_configure_args, "--disable-silent-rules"
|
2021-04-27 14:49:33 +08:00
|
|
|
system "make", "install"
|
|
|
|
|
end
|
|
|
|
|
|
2025-02-12 20:05:46 +08:00
|
|
|
def caveats
|
|
|
|
|
<<~EOS
|
|
|
|
|
Mounting a torrent is fairly quick, but unmounting takes a long time.
|
|
|
|
|
Be patient.
|
|
|
|
|
EOS
|
|
|
|
|
end
|
|
|
|
|
|
2021-04-27 14:49:33 +08:00
|
|
|
test do
|
2025-02-12 20:05:46 +08:00
|
|
|
assert_match version.to_s, shell_output("#{bin}/btfs --version 2>&1")
|
2021-04-27 14:49:33 +08:00
|
|
|
end
|
|
|
|
|
end
|