homebrew-core/Formula/notmuch.rb

65 lines
1.9 KiB
Ruby

class Notmuch < Formula
desc "Thread-based email index, search, and tagging"
homepage "https://notmuchmail.org/"
url "https://notmuchmail.org/releases/notmuch-0.31.tar.xz"
sha256 "571fa0e1539c86612b1f2b2c80a398e08ecfef52e27ef7e48cf8e3b84fa18394"
revision 1
head "https://git.notmuchmail.org/git/notmuch", using: :git
livecheck do
url "https://notmuchmail.org/releases/"
regex(/href=.*?notmuch[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
cellar :any
sha256 "41a433bb148fed019ff8382df394d4139aa64ad4e36b40160dff83b5b12ee1dd" => :catalina
sha256 "7e149250a7ed2e0381557d1adbad16d4736c5d086aa27ca3fc0d9b03371d9ad8" => :mojave
sha256 "871dccce993147aa11750a7182b11ecee59404271022213c4553cd7888e4298a" => :high_sierra
end
depends_on "doxygen" => :build
depends_on "libgpg-error" => :build
depends_on "pkg-config" => :build
depends_on "sphinx-doc" => :build
depends_on "glib"
depends_on "gmime"
depends_on "python@3.9"
depends_on "talloc"
depends_on "xapian"
depends_on "zlib"
def install
args = %W[
--prefix=#{prefix}
--mandir=#{man}
--emacslispdir=#{elisp}
--emacsetcdir=#{elisp}
--bashcompletiondir=#{bash_completion}
--zshcompletiondir=#{zsh_completion}
--without-ruby
]
ENV.append_path "PYTHONPATH", Formula["sphinx-doc"].opt_libexec/"lib/python3.9/site-packages"
system "./configure", *args
system "make", "V=1", "install"
bash_completion.install "completion/notmuch-completion.bash"
(prefix/"vim/plugin").install "vim/notmuch.vim"
(prefix/"vim/doc").install "vim/notmuch.txt"
(prefix/"vim").install "vim/syntax"
cd "bindings/python" do
system Formula["python@3.9"].opt_bin/"python3", *Language::Python.setup_install_args(prefix)
end
end
test do
(testpath/".notmuch-config").write "[database]\npath=#{testpath}/Mail"
(testpath/"Mail").mkpath
assert_match "0 total", shell_output("#{bin}/notmuch new")
end
end