Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New formula for LucidDB (www.luciddb.org).

Quoting the web site:
LucidDB is the first and only open-source RDBMS purpose-built entirely
for data warehousing and business intelligence.
It is based on architectural cornerstones such as column-store,
bitmap indexing, hash join/aggregation, and page-level multiversioning.

It is an alternative to MonetDB, which is already in Homebrew.
  • Loading branch information...
commit ca3707ef27a25f4826a81dae8e8465537093c2a9 1 parent 4050d63
@lifepillar authored
Showing with 78 additions and 0 deletions.
  1. +78 −0 Library/Formula/luciddb.rb
View
78 Library/Formula/luciddb.rb
@@ -0,0 +1,78 @@
+require 'formula'
+
+class Luciddb < Formula
+ homepage 'http://www.luciddb.org/'
+ url 'http://sourceforge.net/projects/luciddb/files/luciddb/luciddb-0.9.4/luciddb-bin-macos32-0.9.4.tar.bz2'
+ md5 '1ae215275425b3b8dfa02355bac3c047'
+
+ def shim_script target
+ <<-EOS.undent
+ #!/bin/bash
+ JAVA_HOME=`/usr/libexec/java_home`
+ exec "#{libexec}/bin/#{target}" "$@"
+ EOS
+ end
+
+ def install
+ java_home = `/usr/libexec/java_home`.chomp!
+ libexec.install Dir['*']
+ cd libexec+'install' do
+ # install.sh just sets Java classpaths and writes them to bin/classpath.gen.
+ # This is why we run it /after/ copying all the files to #{libexec}.
+ system "export JAVA_HOME=#{java_home} && ./install.sh"
+ end
+ bin.mkpath
+ Dir["#{libexec}/bin/*"].each do |b|
+ next if b =~ /classpath.gen/ or b =~ /defineFarragoRuntime/
+ n = Pathname.new(b).basename
+ (bin+n).write shim_script(n)
+ end
+ (prefix+'homebrew.mxcl.luciddb.plist').write luciddb_startup_plist(java_home)
+ end
+
+ def luciddb_startup_plist(java_home); <<-EOPLIST.undent
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>homebrew.mxcl.luciddb</string>
+ <key>EnvironmentVariables</key>
+ <dict>
+ <key>JAVA_HOME</key>
+ <string>#{java_home}</string>
+ </dict>
+ <key>ProgramArguments</key>
+ <array>
+ <string>#{libexec}/bin/lucidDbServer</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>WorkingDirectory</key>
+ <string>#{libexec}</string>
+ <key>StandardOutPath</key>
+ <string>/dev/null</string>
+ </dict>
+ </plist>
+ EOPLIST
+ end
+
+ def caveats; <<-EOS
+If this is your first install:
@adamv
adamv added a note

Use undent on the heredoc and look at other formulae with plists to see the plist vars to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ mkdir -p ~/Library/LaunchAgents
+ cp #{prefix}/homebrew.mxcl.luciddb.plist ~/Library/LaunchAgents/
+ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.luciddb.plist
+
+If this is an upgrade and you already have the homebrew.mxcl.luciddb.plist loaded:
+ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.luciddb.plist
+ cp #{prefix}/homebrew.mxcl.luciddb.plist ~/Library/LaunchAgents/
+ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.luciddb.plist
+
+Or start it manually by typing:
+ lucidDbServer
+ EOS
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.