homebrew-core/Formula/basex.rb

35 lines
952 B
Ruby

class Basex < Formula
desc "Light-weight XML database and XPath/XQuery processor"
homepage "https://basex.org"
url "https://files.basex.org/releases/10.1/BaseX101.zip"
version "10.1"
sha256 "775d64ab0b0bb07a29162ef0fb04c35b1f61f9454ced9e6463bbca5ec06bbeea"
license "BSD-3-Clause"
livecheck do
url "https://files.basex.org/releases/"
regex(%r{href=.*?v?(\d+(?:\.\d+)+)/?["' >]}i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "b4fc19910b4eb043b518467e4030223ae1beb6787c93f3b9ecab71d71ab5dfc6"
end
depends_on "openjdk"
def install
rm Dir["bin/*.bat"]
rm_rf "repo"
rm_rf "data"
rm_rf "etc"
prefix.install_metafiles
libexec.install Dir["*"]
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix
end
test do
assert_equal "1\n2\n3\n4\n5\n6\n7\n8\n9\n10", shell_output("#{bin}/basex '1 to 10'")
end
end