2017-03-12 07:34:02 +00:00
|
|
|
class Blazegraph < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Graph database supporting RDF data model, Sesame, and Blueprint APIs"
|
2017-03-12 07:34:02 +00:00
|
|
|
homepage "https://www.blazegraph.com/"
|
|
|
|
url "https://downloads.sourceforge.net/project/bigdata/bigdata/2.1.4/blazegraph.jar"
|
|
|
|
sha256 "b175d2b4aa9e2f65fcbf4d6f75f8dd12ef75022f82fb94df1fbd0bac5230af2a"
|
2014-04-30 15:32:21 +00:00
|
|
|
|
2015-10-23 08:32:21 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.7+"
|
2014-04-30 15:32:21 +00:00
|
|
|
|
2015-04-17 21:20:32 +00:00
|
|
|
def install
|
2017-03-12 07:34:02 +00:00
|
|
|
libexec.install "blazegraph.jar"
|
|
|
|
bin.write_jar_script libexec/"blazegraph.jar", "blazegraph"
|
2014-04-30 15:32:21 +00:00
|
|
|
end
|
|
|
|
|
2017-03-12 07:34:02 +00:00
|
|
|
plist_options :startup => "true", :manual => "blazegraph start"
|
2014-04-30 15:32:21 +00:00
|
|
|
|
|
|
|
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>Program</key>
|
2017-03-12 07:34:02 +00:00
|
|
|
<string>#{opt_bin}/blazegraph</string>
|
2014-04-30 15:32:21 +00:00
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{prefix}</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2015-04-17 21:20:32 +00:00
|
|
|
test do
|
|
|
|
server = fork do
|
2017-03-12 07:34:02 +00:00
|
|
|
exec bin/"blazegraph"
|
2015-04-17 21:20:32 +00:00
|
|
|
end
|
|
|
|
sleep 5
|
|
|
|
Process.kill("TERM", server)
|
2017-03-12 07:34:02 +00:00
|
|
|
File.exist? "blazegraph.jnl"
|
2015-04-17 21:20:32 +00:00
|
|
|
File.exist? "rules.log"
|
|
|
|
end
|
2014-04-30 15:32:21 +00:00
|
|
|
end
|