homebrew-core/Formula/neo4j.rb
Dan Murphy 0b661e3a0a neo4j 3.0.0
* Change the JDK dependency to 1.8.
* Set NEO4J_HOME env in executables.

Closes #648.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-04-27 15:58:09 +01:00

40 lines
1.3 KiB
Ruby

class Neo4j < Formula
desc "Robust (fully ACID) transactional property graph database"
homepage "http://neo4j.com"
url "http://dist.neo4j.org/neo4j-community-3.0.0-unix.tar.gz"
version "3.0.0"
sha256 "1f1aeb3c748d5b05c263b7dab8b195df788507f59228e80534ed8e506a80c517"
bottle :unneeded
depends_on :java => "1.8+"
def install
ENV["NEO4J_HOME"] = libexec
# Remove windows files
rm_f Dir["bin/*.bat"]
# Install jars in libexec to avoid conflicts
libexec.install Dir["*"]
# Symlink binaries
bin.install Dir["#{libexec}/bin/neo4j{,-shell,-import,-shared.sh, -admin}"]
bin.env_script_all_files(libexec/"bin", :NEO4J_HOME => ENV["NEO4J_HOME"])
# Adjust UDC props
# Suppress the empty, focus-stealing java gui.
(libexec/"conf/neo4j-wrapper.conf").append_lines <<-EOS.undent
wrapper.java.additional=-Djava.awt.headless=true
wrapper.java.additional.4=-Dneo4j.ext.udc.source=homebrew
EOS
end
test do
ENV["NEO4J_HOME"] = libexec
ENV.java_cache
ENV["NEO4J_LOG"] = testpath/"libexec/data/log/neo4j.log"
ENV["NEO4J_PIDFILE"] = testpath/"libexec/data/neo4j-service.pid"
mkpath testpath/"libexec/data/log"
assert_match /Neo4j .*is not running/i, shell_output("#{bin}/neo4j status", 3)
end
end