homebrew-core/Formula/orientdb.rb
2015-04-24 18:24:59 +01:00

43 lines
1.5 KiB
Ruby

require 'formula'
class Orientdb < Formula
homepage 'http://www.orientdb.org/index.htm'
url 'http://www.orientechnologies.com/download.php?email=unknown@unknown.com&file=orientdb-community-2.0.8.tar.gz&os=mac'
version '2.0.8'
sha1 '0203939c6c3c96ba3ee9328705bff509fc1f01bd'
bottle do
cellar :any
sha256 "648ab7db1ac6683c269cf2ef47b6d546a374255c93951c209ae5d34698669dbb" => :yosemite
sha256 "de6997bdaf27015bdfcc14742bae62a42a4e479d9478213110d315444ccd975b" => :mavericks
sha256 "b01a3cb4af7da5848bb6f790092a6b77e1659471d26db67468e77f9480bea662" => :mountain_lion
end
# Fixing OrientDB init scripts
patch do
url "https://gist.githubusercontent.com/maggiolo00/84835e0b82a94fe9970a/raw/1ed577806db4411fd8b24cd90e516580218b2d53/orientdbsh"
sha1 "280284f3a8b6e280e46078b746f8250aa5648979"
end
def install
rm_rf Dir['{bin,benchmarks}/*.{bat,exe}']
inreplace %W[bin/orientdb.sh bin/console.sh bin/gremlin.sh],
'"YOUR_ORIENTDB_INSTALLATION_PATH"', libexec
chmod 0755, Dir["bin/*"]
libexec.install Dir['*']
mkpath "#{libexec}/log"
touch "#{libexec}/log/orientdb.err"
touch "#{libexec}/log/orientdb.log"
bin.install_symlink "#{libexec}/bin/orientdb.sh" => 'orientdb'
bin.install_symlink "#{libexec}/bin/console.sh" => 'orientdb-console'
bin.install_symlink "#{libexec}/bin/gremlin.sh" => 'orientdb-gremlin'
end
def caveats
"Use `orientdb <start | stop | status>`, `orientdb-console` and `orientdb-gremlin`."
end
end