homebrew-core/Formula/lastpass-cli.rb

44 lines
1.6 KiB
Ruby

class LastpassCli < Formula
desc "LastPass command-line interface tool"
homepage "https://github.com/lastpass/lastpass-cli"
url "https://github.com/lastpass/lastpass-cli/releases/download/v1.3.3/lastpass-cli-1.3.3.tar.gz"
sha256 "b94f591627e06c9fed3bc38007b1adc6ea77127e17c7175c85d497096768671b"
revision 1
head "https://github.com/lastpass/lastpass-cli.git"
bottle do
cellar :any
rebuild 1
sha256 "58009ea3abc56153d7ef9036454858ca6e40f8bbf21c729ce89b5893ddd3c1dd" => :catalina
sha256 "a24ff2d326dd4f445f492c788d7d8a28d3b3a853be9454c6418f340ed85505d8" => :mojave
sha256 "34fa4da7396fd076d9b0c02b1ea092701c3a2fe09447f818718eb66bb4c389d9" => :high_sierra
sha256 "508c481d28158c3e2f2f7aa69cc8b4048d56417a157d990208f2393297b60dc7" => :sierra
end
depends_on "asciidoc" => :build
depends_on "cmake" => :build
depends_on "docbook-xsl" => :build
depends_on "pkg-config" => :build
# Avoid crashes on Mojave's version of libcurl (https://github.com/lastpass/lastpass-cli/issues/427)
depends_on "curl" if MacOS.version >= :mojave
depends_on "openssl@1.1"
depends_on "pinentry"
def install
ENV["XML_CATALOG_FILES"] = etc/"xml/catalog"
mkdir "build" do
system "cmake", "..", *std_cmake_args, "-DCMAKE_INSTALL_MANDIR:PATH=#{man}"
system "make", "all", "lpass-test", "test", "install", "install-doc"
end
bash_completion.install "contrib/lpass_bash_completion"
zsh_completion.install "contrib/lpass_zsh_completion" => "_lpass"
fish_completion.install "contrib/completions-lpass.fish"
end
test do
system "#{bin}/lpass", "--version"
end
end