homebrew-fuse/Formula/gocryptfs-mac.rb

38 lines
1.2 KiB
Ruby
Raw Normal View History

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/"
2021-10-28 18:23:05 +08:00
url "https://github.com/rfjakob/gocryptfs/releases/download/v2.2.1/gocryptfs_v2.2.1_src-deps.tar.gz"
sha256 "8d3f66fe426de6b31dfd56122f26047cc8cda679d2fba7bc26d78448701da5e3"
2021-05-02 23:10:46 +08:00
license "MIT"
bottle do
2021-10-28 18:23:05 +08:00
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gocryptfs-mac-2.2.1"
sha256 cellar: :any, big_sur: "1c618b3a27524e560372f5d26d0718434f04a32ffe6cd0faa18b39f6019df13d"
2021-05-02 23:10:46 +08:00
end
depends_on "go" => :build
depends_on "pkg-config" => :build
depends_on MacfuseRequirement
depends_on :macos
2021-05-03 15:10:45 +08:00
depends_on "openssl@1.1"
2021-05-02 23:10:46 +08:00
def install
setup_fuse
2021-05-02 23:10:46 +08:00
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/rfjakob/gocryptfs").install buildpath.children
cd "src/github.com/rfjakob/gocryptfs" do
system "./build.bash"
bin.install "gocryptfs"
prefix.install_metafiles
end
end
test do
(testpath/"encdir").mkpath
pipe_output("#{bin}/gocryptfs -init #{testpath}/encdir", "password", 0)
assert_predicate testpath/"encdir/gocryptfs.conf", :exist?
end
end