homebrew-core/Formula/igv.rb

36 lines
1.2 KiB
Ruby

class Igv < Formula
desc "Interactive Genomics Viewer"
homepage "https://www.broadinstitute.org/software/igv"
url "https://data.broadinstitute.org/igv/projects/downloads/2.11/IGV_2.11.1.zip"
sha256 "71e9dc22d161b1747262a77c5053a224e2d279b2bbe4a0bdd64ab3a095fc88c7"
license "MIT"
livecheck do
url "https://software.broadinstitute.org/software/igv/download"
regex(/href=.*?IGV[._-]v?(\d+(?:\.\d+)+)\.zip/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "6f0eab595383822a3038d2e5d3e96e09765b74ad5d72e27c99c01d58136a514a"
end
depends_on "openjdk"
def install
inreplace ["igv.sh", "igvtools"], /^prefix=.*/, "prefix=#{libexec}"
bin.install "igv.sh" => "igv"
bin.install "igvtools"
libexec.install "igv.args", "lib"
bin.env_script_all_files libexec, Language::Java.overridable_java_home_env
end
test do
assert_match "Usage:", shell_output("#{bin}/igvtools")
assert_match "org/broad/igv/ui/IGV.class", shell_output("#{Formula["openjdk"].bin}/jar tf #{libexec}/lib/igv.jar")
ENV.append "_JAVA_OPTIONS", "-Duser.home=#{testpath}"
(testpath/"script").write "exit"
assert_match "Version", shell_output("#{bin}/igv -b script")
end
end