btfs: update build process

Closes #88.

Signed-off-by: Adrian Ho <215702+gromgit@users.noreply.github.com>
This commit is contained in:
Adrian Ho 2025-02-12 20:05:46 +08:00 committed by Adrian Ho
parent f5967d475e
commit 3b325811ee

View file

@ -6,7 +6,8 @@ class BtfsMac < Formula
url "https://github.com/johang/btfs/archive/refs/tags/v2.24.tar.gz" url "https://github.com/johang/btfs/archive/refs/tags/v2.24.tar.gz"
sha256 "d71ddefe3c572e05362542a0d9fd0240d8d4e1578ace55a8b3245176e7fd8935" sha256 "d71ddefe3c572e05362542a0d9fd0240d8d4e1578ace55a8b3245176e7fd8935"
license "GPL-3.0-only" license "GPL-3.0-only"
head "https://github.com/johang/btfs.git" revision 1
head "https://github.com/johang/btfs.git", branch: "master"
bottle do bottle do
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/btfs-mac-2.24" root_url "https://github.com/gromgit/homebrew-fuse/releases/download/btfs-mac-2.24"
@ -19,21 +20,26 @@ class BtfsMac < Formula
depends_on "autoconf" => :build depends_on "autoconf" => :build
depends_on "automake" => :build depends_on "automake" => :build
depends_on "pkg-config" => :build depends_on "pkgconf" => :build
depends_on "libtorrent-rasterbar" depends_on "libtorrent-rasterbar"
depends_on MacfuseRequirement depends_on MacfuseRequirement
depends_on :macos depends_on :macos
def install def install
setup_fuse setup_fuse
ENV.cxx11
inreplace "configure.ac", "fuse >= 2.8.0", "fuse >= 2.7.3"
system "autoreconf", "--force", "--install", "--verbose" system "autoreconf", "--force", "--install", "--verbose"
system "./configure", *std_configure_args, "--disable-silent-rules" system "./configure", *std_configure_args, "--disable-silent-rules"
system "make", "install" system "make", "install"
end end
def caveats
<<~EOS
Mounting a torrent is fairly quick, but unmounting takes a long time.
Be patient.
EOS
end
test do test do
system "#{bin}/btfs", "--help" assert_match version.to_s, shell_output("#{bin}/btfs --version 2>&1")
end end
end end