aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tika.rb
blob: 7ecdb13b5de6b44589ac2b467c2dd11ae98459a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'formula'

class TikaRestServer < Formula
  url 'http://repo1.maven.org/maven2/org/apache/tika/tika-server/1.2/tika-server-1.2.jar'
  sha1 '1343e490a61f9223832c66ff384a35f73dbc719c'
end

class Tika < Formula
  homepage 'http://tika.apache.org/'
  url 'http://www.apache.org/dyn/closer.cgi/tika/tika-app-1.2.jar'
  sha1 '22c7110997d8ec114c6713cca1aadbbab6472c07'

  def install
    libexec.install 'tika-app-1.2.jar'
    bin.write_jar_script libexec/'tika-app-1.2.jar', 'tika'
    TikaRestServer.new.brew {
      libexec.install 'tika-server-1.2.jar'
      bin.write_jar_script libexec/'tika-server-1.2.jar', 'tika-rest-server'
    }
  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