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-03-20 22:11:36 +08:00
|
|
|
url "https://github.com/rfjakob/gocryptfs/releases/download/v2.5.2/gocryptfs_v2.5.2_src-deps.tar.gz"
|
|
|
|
|
sha256 "cc45bdc774592d392c4625c242529c2632bcf1e55ed16d8e81b142fc58616a60"
|
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"
|
2025-03-20 14:19:29 +00:00
|
|
|
sha256 cellar: :any, arm64_sonoma: "4abd9d34815e2858278ff38ff2eb30b7ddc1b12b94452d5294ad6b0e4be5f3e8"
|
|
|
|
|
sha256 cellar: :any, ventura: "75331c2d30f380316d4817dcf0c5a667de2d9337239eb0a6c8a8a9ee6378270e"
|
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
|