homebrew-core/Formula/lastpass-cli.rb
2019-04-15 20:46:49 +02:00

40 lines
1.5 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"
head "https://github.com/lastpass/lastpass-cli.git"
bottle do
cellar :any
sha256 "fb251aa806ac098b7dc523c7413b50fc55cc2aa13d9747d942e6aed40e000b90" => :mojave
sha256 "0aa0e9e694373b61d12f5988b732ff3594faf93f2ba6c794c5dd6345afd84a8f" => :high_sierra
sha256 "7c044b0a4c1aa82eed05d5ad277ffb1209a041660f432e5aacdfd1096b260342" => :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"
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