2015-05-28 16:50:29 +00:00
|
|
|
class Luyten < Formula
|
2015-06-02 15:53:34 +00:00
|
|
|
desc "Java decompiler GUI for Procyon"
|
2016-01-06 18:30:51 +00:00
|
|
|
homepage "https://deathmarine.github.io/Luyten/"
|
|
|
|
url "https://github.com/deathmarine/Luyten/releases/download/v0.4.5/luyten-0.4.5.jar", :using => :nounzip
|
|
|
|
sha256 "da2e656ee99cf6cba0e246d2f1ed58907dba0c3c472e60ec9bef4b7899a8955a"
|
2015-05-28 16:50:29 +00:00
|
|
|
|
|
|
|
head do
|
|
|
|
url "https://github.com/deathmarine/Luyten.git"
|
|
|
|
depends_on "maven" => :build
|
|
|
|
end
|
|
|
|
|
2016-01-06 18:30:51 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-05-28 16:50:29 +00:00
|
|
|
depends_on :java => "1.7+"
|
|
|
|
|
|
|
|
def install
|
|
|
|
if build.head?
|
2016-01-06 18:30:51 +00:00
|
|
|
ENV.java_cache
|
|
|
|
|
2015-05-28 16:50:29 +00:00
|
|
|
ver = `mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version`.split.grep(/^\d+\.\d+\.\d+/).uniq.first
|
|
|
|
system "mvn", "clean", "package"
|
|
|
|
libexec.install "target/luyten-#{ver}.jar"
|
|
|
|
else
|
|
|
|
ver = "#{version}"
|
|
|
|
libexec.install "luyten-#{ver}.jar"
|
|
|
|
end
|
|
|
|
bin.write_jar_script libexec/"luyten-#{ver}.jar", "luyten"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
io = IO.popen("luyten")
|
|
|
|
sleep 5
|
|
|
|
Process.kill("SIGINT", io.pid)
|
|
|
|
Process.wait(io.pid)
|
|
|
|
io.read !~ /Exception/
|
|
|
|
end
|
|
|
|
end
|