Created
November 27, 2012 12:38
-
-
Save joost/4154029 to your computer and use it in GitHub Desktop.
Solr 4.0 brew recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Solr < Formula | |
url 'http://www.apache.org/dyn/closer.cgi?path=lucene/solr/4.0.0/apache-solr-4.0.0.tgz' | |
homepage 'http://lucene.apache.org/solr/' | |
sha1 '0cb61d9572516fc627785201b79b3a85e95f877d' | |
def script; <<-EOS.undent | |
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Usage: $ solr path/to/config/dir" | |
else | |
cd #{libexec}/example && java -Dsolr.solr.home=$1 -jar start.jar | |
fi | |
EOS | |
end | |
def install | |
libexec.install Dir['*'] | |
(bin+'solr').write script | |
end | |
def caveats; <<-EOS.undent | |
To start solr: | |
solr path/to/solr/config/dir | |
See the solr homepage for more setup information: | |
brew home solr | |
EOS | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment