homebrew-core/Formula/tika.rb
Rui Chen 1dda1e105c
tika 1.22
Closes #42684.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2019-08-09 23:52:27 +08:00

28 lines
875 B
Ruby

class Tika < Formula
desc "Content analysis toolkit"
homepage "https://tika.apache.org/"
url "https://www.apache.org/dyn/closer.cgi?path=tika/tika-app-1.22.jar"
sha256 "d7219709abc547136fa5fca17632a85fe1cd36dc08cb4031957e3c9a836543e2"
bottle :unneeded
depends_on :java => "1.7+"
resource "server" do
url "https://www.apache.org/dyn/closer.cgi?path=tika/tika-server-1.22.jar"
sha256 "9913c69e8481edd848f27a7fd912300acd6f0b29044f43fe705a959119e2f44b"
end
def install
libexec.install "tika-app-#{version}.jar"
bin.write_jar_script libexec/"tika-app-#{version}.jar", "tika"
libexec.install resource("server")
bin.write_jar_script libexec/"tika-server-#{version}.jar", "tika-rest-server"
end
test do
pdf = test_fixtures("test.pdf")
assert_equal "application/pdf\n", shell_output("#{bin}/tika --detect #{pdf}")
end
end