diff options
| author | Carlo Cabanilla | 2009-12-19 21:51:22 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2010-02-25 16:20:14 -0800 |
| commit | 1a3622f07e64e2afedfec7a2dece5b9bb27893b7 (patch) | |
| tree | 4fcea23b40c55694deeb554b5ecfbeecdf4eaa44 /Library | |
| parent | 22e08935d542a4f40cb115bf9296c7b06c87b479 (diff) | |
| download | homebrew-1a3622f07e64e2afedfec7a2dece5b9bb27893b7.tar.bz2 | |
adding couchdb-lucene formula
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
* Tweaked path concatenation a bit
* Tweaked writing out the config file a bit
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/couchdb-lucene.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Library/Formula/couchdb-lucene.rb b/Library/Formula/couchdb-lucene.rb new file mode 100644 index 000000000..93e4ed509 --- /dev/null +++ b/Library/Formula/couchdb-lucene.rb @@ -0,0 +1,42 @@ +require 'formula' + +class CouchdbLucene <Formula + version '0.4' + url 'http://github.com/rnewson/couchdb-lucene/tarball/v' + version + homepage 'http://github.com/rnewson/couchdb-lucene' + md5 'b0f3c7c942a0eb80e3f9bff061a0677a' + + depends_on 'couchdb' + depends_on 'maven' + + def install + # Skipping tests because the integration test assumes that couchdb-lucene + # has been integrated with a local couchdb instance. Not sure if there's a + # way to only disable the integration test. + system "mvn", "-DskipTests=true" + + lib_path = lib + "couchdb-lucene" + index_path = var + "lib/couchdb-lucene" + log_path = var + "log/couchdb-lucene" + couchdb_cfg_path = etc + "couchdb/local.d" + jar_name = "couchdb-lucene-#{version}-jar-with-dependencies.jar" + + [lib_path, index_path, log_path, couchdb_cfg_path].each {|p| p.mkpath} + + lib_path.install "target/#{jar_name}" + + (couchdb_cfg_path + "couchdb-lucene.ini").write <<-EOS +[couchdb] +os_process_timeout=60000 ; increase the timeout from 5 seconds. + +[external] +fti=/usr/bin/java -Dcouchdb.lucene.dir=#{index_path} -Dcouchdb.log.dir=#{log_path} -server -jar #{lib_path + jar_name} -search + +[update_notification] +indexer=/usr/bin/java -Dcouchdb.lucene.dir=#{index_path} -Dcouchdb.log.dir=#{log_path} -server -jar #{lib_path + jar_name} -index + +[httpd_db_handlers] +_fti = {couch_httpd_external, handle_external_req, <<"fti">>} + EOS + end +end |
