2012-08-16 15:52:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class TikaRestServer < Formula
|
2013-01-24 20:28:28 +00:00
|
|
|
url 'http://repo1.maven.org/maven2/org/apache/tika/tika-server/1.3/tika-server-1.3.jar'
|
|
|
|
sha1 '8d96bc0fa171c48018ebdce62f1204cb79de250b'
|
2012-08-16 15:52:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Tika < Formula
|
|
|
|
homepage 'http://tika.apache.org/'
|
2013-01-24 20:28:28 +00:00
|
|
|
url 'http://www.apache.org/dyn/closer.cgi?path=tika/tika-app-1.3.jar'
|
|
|
|
sha1 'fb5786dfe4fa19a651c9f6d9417336127b34ddc2'
|
2012-08-16 15:52:02 +00:00
|
|
|
|
|
|
|
def install
|
2013-01-24 20:28:28 +00:00
|
|
|
libexec.install "tika-app-#{version}.jar"
|
|
|
|
bin.write_jar_script libexec/"tika-app-1.3.jar", "tika"
|
|
|
|
TikaRestServer.new.brew do
|
|
|
|
libexec.install "tika-server-1.3.jar"
|
|
|
|
bin.write_jar_script libexec/"tika-server-1.3.jar", "tika-rest-server"
|
|
|
|
end
|
2012-08-16 15:52:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To run Tika:
|
|
|
|
tika
|
|
|
|
|
|
|
|
To run Tika's REST server:
|
|
|
|
tika-rest-server
|
|
|
|
|
|
|
|
See the Tika homepage for more documentation:
|
|
|
|
brew home tika
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|