2013-08-04 06:46:11 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Voltdb < Formula
|
|
|
|
homepage 'https://github.com/VoltDB/voltdb'
|
|
|
|
head 'https://github.com/VoltDB/voltdb.git'
|
2013-08-17 02:25:30 +00:00
|
|
|
url 'https://github.com/VoltDB/voltdb/archive/voltdb-3.5.0.1.tar.gz'
|
|
|
|
sha1 'ce4d890967c6f3f8772dd66e65d5a3aeb85cd5f3'
|
2013-08-04 06:46:11 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system 'ant'
|
|
|
|
|
2013-08-17 16:12:43 +00:00
|
|
|
Dir['bin/*'].each do |f|
|
|
|
|
next if ['bin/voltadmin'].include? f
|
|
|
|
inreplace f, /VOLTDB_LIB=\$VOLTDB_HOME\/lib/, 'VOLTDB_LIB=$VOLTDB_HOME/lib/voltdb'
|
|
|
|
end
|
2013-08-04 06:46:11 +00:00
|
|
|
|
2013-08-17 16:12:43 +00:00
|
|
|
(lib/'voltdb').install Dir['lib/*']
|
2013-08-04 06:46:11 +00:00
|
|
|
ln_s lib/'voltdb/python', lib/'python'
|
|
|
|
prefix.install 'bin', 'tools', 'voltdb', 'version.txt', 'doc'
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2013-08-17 02:25:30 +00:00
|
|
|
assert_equal "3.5.0.1\n", File.read("#{prefix}/version.txt")
|
2013-08-04 06:46:11 +00:00
|
|
|
end
|
|
|
|
end
|