diff options
Diffstat (limited to 'Library/Formula/couchdb-lucene.rb')
| -rw-r--r-- | Library/Formula/couchdb-lucene.rb | 92 | 
1 files changed, 40 insertions, 52 deletions
diff --git a/Library/Formula/couchdb-lucene.rb b/Library/Formula/couchdb-lucene.rb index 9799c9a34..edf548dfa 100644 --- a/Library/Formula/couchdb-lucene.rb +++ b/Library/Formula/couchdb-lucene.rb @@ -17,63 +17,51 @@ class CouchdbLucene < Formula      (etc + "couchdb/local.d/couchdb-lucene.ini").write ini_file    end -  def caveats; <<-EOS.undent -    You can enable couchdb-lucene to automatically load on login with: +  def ini_file; <<-EOS.undent +    [couchdb] +    os_process_timeout=60000 ; increase the timeout from 5 seconds. -      mkdir -p ~/Library/LaunchAgents -      cp "#{plist_path}" ~/Library/LaunchAgents/ -      launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename} +    [external] +    fti=#{which 'python'} #{prefix}/tools/couchdb-external-hook.py -    Or start it manually with: -      #{bin}/run +    [httpd_db_handlers] +    _fti = {couch_httpd_external, handle_external_req, <<"fti">>}      EOS    end -  def ini_file -    return <<-EOS -[couchdb] -os_process_timeout=60000 ; increase the timeout from 5 seconds. +  plist_options :manual => "#{HOMEBREW_PREFIX}/opt/couchdb-lucene/bin/run" -[external] -fti=#{which 'python'} #{prefix}/tools/couchdb-external-hook.py - -[httpd_db_handlers] -_fti = {couch_httpd_external, handle_external_req, <<"fti">>} -EOS -  end - -  def startup_plist -    return <<-EOS -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" -  "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -  <dict> -    <key>Label</key> -    <string>#{plist_name}</string> -    <key>EnvironmentVariables</key> -    <dict> -      <key>HOME</key> -      <string>~</string> -      <key>DYLD_LIBRARY_PATH</key> -      <string>/opt/local/lib:$DYLD_LIBRARY_PATH</string> -    </dict> -    <key>ProgramArguments</key> -    <array> -      <string>#{HOMEBREW_PREFIX}/bin/run</string> -    </array> -    <key>UserName</key> -    <string>#{`whoami`.chomp}</string> -    <key>StandardOutPath</key> -    <string>/dev/null</string> -    <key>StandardErrorPath</key> -    <string>/dev/null</string> -    <key>RunAtLoad</key> -    <true/> -    <key>KeepAlive</key> -    <true/> -  </dict> -</plist> -EOS +  def plist; <<-EOS.undent +    <?xml version="1.0" encoding="UTF-8"?> +    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" +      "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +    <plist version="1.0"> +      <dict> +        <key>Label</key> +        <string>#{plist_name}</string> +        <key>EnvironmentVariables</key> +        <dict> +          <key>HOME</key> +          <string>~</string> +          <key>DYLD_LIBRARY_PATH</key> +          <string>/opt/local/lib:$DYLD_LIBRARY_PATH</string> +        </dict> +        <key>ProgramArguments</key> +        <array> +          <string>#{opt_prefix}/bin/run</string> +        </array> +        <key>UserName</key> +        <string>#{`whoami`.chomp}</string> +        <key>StandardOutPath</key> +        <string>/dev/null</string> +        <key>StandardErrorPath</key> +        <string>/dev/null</string> +        <key>RunAtLoad</key> +        <true/> +        <key>KeepAlive</key> +        <true/> +      </dict> +    </plist> +    EOS    end  end  | 
