homebrew-core/Formula/solr.rb

34 lines
692 B
Ruby
Raw Normal View History

2009-10-26 20:13:54 +00:00
require 'formula'
SOLR_START_SCRIPT = <<-end_script
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $ solr path/to/config/dir"
else
cd %s/example && java -Dsolr.solr.home=$1 -jar start.jar
fi
end_script
class Solr <Formula
2010-01-19 02:04:22 +00:00
url 'http://apache.deathculture.net/lucene/solr/1.4.0/apache-solr-1.4.0.tgz'
2009-10-26 20:13:54 +00:00
homepage 'http://lucene.apache.org/solr/'
2010-01-19 02:04:22 +00:00
md5 '1cc3783316aa1f95ba5e250a4c1d0451'
2009-10-26 20:13:54 +00:00
def install
prefix.mkpath
prefix.install Dir['*']
2009-10-26 20:13:54 +00:00
(bin+'solr').write(SOLR_START_SCRIPT % prefix)
end
def caveats
<<-END_CAVEATS
To start solr:
$ solr path/to/solr/config/dir
See the solr homepage for more setup information:
$ brew home solr
END_CAVEATS
end
end