homebrew-core/Formula/jena.rb

38 lines
943 B
Ruby

class Jena < Formula
desc "Framework for building semantic web and linked data apps"
homepage "https://jena.apache.org/"
url "https://www.apache.org/dyn/closer.lua?path=jena/binaries/apache-jena-3.16.0.tar.gz"
mirror "https://archive.apache.org/dist/jena/binaries/apache-jena-3.16.0.tar.gz"
sha256 "6ef65ab3e24948f6f8fa97281a936276d74a8732fb4a14c624c1aa9fa93adb30"
license "Apache-2.0"
livecheck do
url :stable
end
bottle :unneeded
def shim_script(target)
<<~EOS
#!/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