homebrew-fuse/Formula/gocryptfs-mac.rb

41 lines
1.5 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"
2021-11-12 00:51:45 +08:00
sha256 cellar: :any, monterey: "e0c267b091391fc0d7af3d1411dc22d68a8325427b884d9a01273918704c09d2"
2021-10-28 18:28:16 +08:00
sha256 cellar: :any, big_sur: "1c618b3a27524e560372f5d26d0718434f04a32ffe6cd0faa18b39f6019df13d"
sha256 cellar: :any, catalina: "928575ec0f8aeeeae29a15bbc71d611338a17b672e42b2fdb512c7ee55ecf091"
2021-10-28 18:30:41 +08:00
sha256 cellar: :any, mojave: "22a05bc7c7d6c0d5b36261e3ff9f02d8e475b24efcaa82d4d650aa02348a9b0d"
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