aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/elasticsearch.rb
diff options
context:
space:
mode:
authorSusan Potter2011-11-16 18:09:36 -0600
committerAdam Vandenberg2011-11-17 21:58:36 -0800
commit7bdac443cdbc2117279f6ae515007e095726dfb4 (patch)
treede22c0ee2b73694ff2bc481022d244eda6ba1f1c /Library/Formula/elasticsearch.rb
parent6605cb00e6bd42760d142635d8522d278fdbf72e (diff)
downloadhomebrew-7bdac443cdbc2117279f6ae515007e095726dfb4.tar.bz2
elasticsearch 0.18.3
* Update formula's install to move JARs to libexec as preferred * Update scripts use prefix for ES_HOME and update ES_CLASSPATH paths to use libexec instead of lib Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/elasticsearch.rb')
-rw-r--r--Library/Formula/elasticsearch.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb
index 0fa2d5008..5d908514c 100644
--- a/Library/Formula/elasticsearch.rb
+++ b/Library/Formula/elasticsearch.rb
@@ -1,9 +1,9 @@
require 'formula'
class Elasticsearch < Formula
- url 'https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.1.tar.gz'
+ url 'https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.3.tar.gz'
homepage 'http://www.elasticsearch.org'
- md5 '490c7959e02b885535e08e3cca2ffda8'
+ md5 '56a56fe47402de2c8e19d14d5f53efa4'
def cluster_name
"elasticsearch_#{ENV['USER']}"
@@ -12,6 +12,9 @@ class Elasticsearch < Formula
def install
# Remove Windows files
rm_f Dir["bin/*.bat"]
+ # Move JARs from lib to libexec according to homebrew conventions
+ libexec.install Dir['lib/*.jar']
+ (libexec+'sigar').install Dir['lib/sigar/*.jar']
# Install everything directly into folder
prefix.install Dir['*']
@@ -27,6 +30,16 @@ class Elasticsearch < Formula
s.gsub! /#\s*path\.logs\: [^\n]+/, "path.logs: #{var}/log/elasticsearch/"
end
+ inreplace "#{prefix}/bin/elasticsearch.in.sh" do |s|
+ # Replace CLASSPATH paths to use libexec instead of lib
+ s.gsub! /ES_HOME\/lib\//, "ES_HOME/libexec/"
+ end
+
+ inreplace "#{prefix}/bin/elasticsearch" do |s|
+ # Set ES_HOME to prefix value
+ s.gsub! /^ES_HOME=.*$/, "ES_HOME=#{prefix}"
+ end
+
# Write .plist file for `launchd`
(prefix+'org.elasticsearch.plist').write startup_plist
(prefix+'org.elasticsearch.plist').chmod 0644