50 lines
1.5 KiB
Ruby
50 lines
1.5 KiB
Ruby
class Fuseki < Formula
|
|
desc "SPARQL server"
|
|
homepage "https://jena.apache.org/documentation/fuseki2/"
|
|
url "https://www.apache.org/dyn/closer.lua?path=jena/binaries/apache-jena-fuseki-4.3.1.tar.gz"
|
|
mirror "https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-4.3.1.tar.gz"
|
|
sha256 "dda62f8afc3f872a387e6f1b63f2bca8a35f7baf8674e785e09f96d28e721be4"
|
|
license "Apache-2.0"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "8f2dffe3554ce58f5a5090b865b0871c27ba265f7ac1b2427efc80912c8891e6"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
prefix.install "bin"
|
|
|
|
%w[fuseki-server fuseki].each do |exe|
|
|
libexec.install exe
|
|
(bin/exe).write_env_script(libexec/exe,
|
|
JAVA_HOME: Formula["openjdk"].opt_prefix,
|
|
FUSEKI_BASE: var/"fuseki",
|
|
FUSEKI_HOME: libexec,
|
|
FUSEKI_LOGS: var/"log/fuseki",
|
|
FUSEKI_RUN: var/"run")
|
|
(libexec/exe).chmod 0755
|
|
end
|
|
|
|
# Non-symlinked binaries and application files
|
|
libexec.install "fuseki-server.jar",
|
|
"fuseki.war",
|
|
"webapp"
|
|
end
|
|
|
|
def post_install
|
|
# Create a location for dataset and log files,
|
|
# in case we're being used in LaunchAgent mode
|
|
(var/"fuseki").mkpath
|
|
(var/"log/fuseki").mkpath
|
|
end
|
|
|
|
service do
|
|
run opt_bin/"fuseki-server"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/fuseki-server", "--version"
|
|
end
|
|
end
|