homebrew-core/Formula/dita-ot.rb

29 lines
842 B
Ruby

class DitaOt < Formula
desc "DITA Open Toolkit is an implementation of the OASIS DITA specification"
homepage "https://www.dita-ot.org/"
url "https://github.com/dita-ot/dita-ot/releases/download/3.5.3/dita-ot-3.5.3.zip"
sha256 "dffe64576fd78c14cd011b6cabcd022a2fe900a415c7fbe1e6f4f8fd921607b4"
license "Apache-2.0"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle :unneeded
depends_on "openjdk"
def install
rm_f Dir["bin/*.bat", "config/env.bat", "startcmd.*"]
libexec.install Dir["*"]
(bin/"dita").write_env_script libexec/"bin/dita", JAVA_HOME: Formula["openjdk"].opt_prefix
end
test do
system bin/"dita", "--input=#{libexec}/docsrc/site.ditamap",
"--format=html5", "--output=#{testpath}/out"
assert_predicate testpath/"out/index.html", :exist?
end
end