2021-05-02 23:10:46 +08:00
|
|
|
require_relative "../require/macfuse"
|
|
|
|
|
|
|
|
|
|
class GocryptfsMac < Formula
|
|
|
|
|
desc "Encrypted overlay filesystem written in Go"
|
|
|
|
|
homepage "https://nuetzlich.net/gocryptfs/"
|
2025-02-10 21:35:58 +08:00
|
|
|
url "https://github.com/rfjakob/gocryptfs/releases/download/v2.5.1/gocryptfs_v2.5.1_src-deps.tar.gz"
|
|
|
|
|
sha256 "80c3771c9f7e65af9326b107ddb7a30e9c3c7bf8823412b9615b7f77352cdde7"
|
2021-05-02 23:10:46 +08:00
|
|
|
license "MIT"
|
|
|
|
|
|
|
|
|
|
bottle do
|
2025-02-10 16:31:53 +00:00
|
|
|
root_url "https://ghcr.io/v2/gromgit/fuse"
|
|
|
|
|
sha256 cellar: :any, arm64_sonoma: "5e46fef0657f37ac1990b1b83f4d8d1af06bf66735faa89983026bd115b00de1"
|
|
|
|
|
sha256 cellar: :any, ventura: "b5afded46b2a7493da7923de46fe8ee7a7c2bca2f73047a466e9f861ffa40769"
|
2021-05-02 23:10:46 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
depends_on "go" => :build
|
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
|
depends_on MacfuseRequirement
|
|
|
|
|
depends_on :macos
|
2025-02-10 21:35:58 +08:00
|
|
|
depends_on "openssl@3"
|
2021-05-02 23:10:46 +08:00
|
|
|
|
|
|
|
|
def install
|
2021-07-04 00:27:00 +08:00
|
|
|
setup_fuse
|
2025-02-10 21:35:58 +08:00
|
|
|
system "./build.bash"
|
|
|
|
|
bin.install "gocryptfs", "gocryptfs-xray/gocryptfs-xray"
|
|
|
|
|
man1.install "Documentation/gocryptfs.1", "Documentation/gocryptfs-xray.1"
|
2021-05-02 23:10:46 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
test do
|
|
|
|
|
(testpath/"encdir").mkpath
|
|
|
|
|
pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0)
|
2025-02-10 21:35:58 +08:00
|
|
|
assert_path_exists testpath/"encdir/gocryptfs.conf"
|
2021-05-02 23:10:46 +08:00
|
|
|
end
|
|
|
|
|
end
|