homebrew-core/Formula/plantuml.rb
Hana Dusíková ab27f1104b plantuml: shorten code and change libexec to share
Closes #6600.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-11-06 21:23:22 +00:00

24 lines
646 B
Ruby

class Plantuml < Formula
desc "Draw UML diagrams"
homepage "http://plantuml.sourceforge.net/"
url "https://downloads.sourceforge.net/project/plantuml/plantuml.8048.jar"
sha256 "e500ea94600ecade4af7262b32ea20a1c884de0013f4a3f07aeae02d594424ab"
bottle :unneeded
depends_on "graphviz"
def install
jar = "plantuml.jar"
libexec.install "plantuml.#{version}.jar" => jar
(bin/"plantuml").write <<-EOS.undent
#!/bin/bash
GRAPHVIZ_DOT="#{Formula["graphviz"].opt_bin}/dot" exec java -jar #{libexec}/#{jar} "$@"
EOS
chmod 0555, bin/"plantuml"
end
test do
system bin/"plantuml", "-testdot"
end
end