homebrew-core/Formula/jena.rb
2018-07-02 14:03:29 +01:00

31 lines
787 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.8.0.tar.gz"
sha256 "4ae447e9fee14fc6834cbfb7dc61159849f18af4820f2bf36651c8d50732c0b8"
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