homebrew-core/Formula/ffsend.rb

38 lines
1.3 KiB
Ruby
Raw Normal View History

class Ffsend < Formula
desc "Fully featured Firefox Send client"
homepage "https://gitlab.com/timvisee/ffsend"
url "https://github.com/timvisee/ffsend/archive/v0.2.52.tar.gz"
sha256 "b5fd937604eeccd85d7b30d8510784d95497c2412da29c586430275db55043ef"
2019-03-21 00:00:20 +00:00
bottle do
cellar :any
2019-10-04 04:26:48 +00:00
sha256 "2648c957876a524b24c21517412a527f4db5d49b83920bd478cbc102ae86c99c" => :catalina
sha256 "1de65c841a42d009553325db5b44da81f627d93305aef023306acd88a0589b09" => :mojave
sha256 "88573bde2de8745093c57d7fa13c0bd148210b2a607210bee0bf281a9527c625" => :high_sierra
2019-03-21 00:00:20 +00:00
end
depends_on "rust" => :build
2019-09-04 13:41:22 +00:00
depends_on "openssl@1.1"
def install
# Ensure that the `openssl` crate picks up the intended library.
# https://docs.rs/openssl/0.10.19/openssl/#manual
2019-09-04 13:41:22 +00:00
ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix
system "cargo", "install", "--root", prefix, "--path", "."
bash_completion.install "contrib/completions/ffsend.bash"
fish_completion.install "contrib/completions/ffsend.fish"
zsh_completion.install "contrib/completions/_ffsend"
end
test do
system "#{bin}/ffsend", "help"
(testpath/"file.txt").write("test")
url = shell_output("#{bin}/ffsend upload -Iq #{testpath}/file.txt").strip
output = shell_output("#{bin}/ffsend del -I #{url} 2>&1")
assert_match "File deleted", output
end
end