75ff1b86d2
Closes #17837. Signed-off-by: Andrew Janke <andrew@apjanke.net>
31 lines
794 B
Ruby
31 lines
794 B
Ruby
class Jena < Formula
|
|
desc "Framework for building semantic web and linked data apps"
|
|
homepage "https://jena.apache.org/"
|
|
url "https://archive.apache.org/dist/jena/binaries/apache-jena-3.4.0.tar.gz"
|
|
sha256 "35b1eb88d20ea7908e3971825340bed3856e2aa94f3edd1643f811c019d0bf8e"
|
|
|
|
bottle :unneeded
|
|
|
|
def shim_script(target)
|
|
<<-EOS.undent
|
|
#!/usr/bin/env bash
|
|
export JENA_HOME="#{libexec}"
|
|
"$JENA_HOME/bin/#{target}" "$@"
|
|
EOS
|
|
end
|
|
|
|
def install
|
|
rm_rf "bat" # Remove Windows scripts
|
|
|
|
prefix.install %w[LICENSE NOTICE README]
|
|
libexec.install Dir["*"]
|
|
Dir.glob("#{libexec}/bin/*") do |path|
|
|
bin_name = File.basename(path)
|
|
(bin/bin_name).write shim_script(bin_name)
|
|
end
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/sparql", "--version"
|
|
end
|
|
end
|