2011-03-10 05:11:03 +00:00
|
|
|
class Fits < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "File Information Tool Set"
|
2015-07-10 20:54:51 +00:00
|
|
|
homepage "https://projects.iq.harvard.edu/fits"
|
2015-06-05 19:00:37 +00:00
|
|
|
url "https://projects.iq.harvard.edu/files/fits/files/fits-0.8.6_1.zip"
|
|
|
|
version "0.8.6-1"
|
|
|
|
sha256 "d45f67a2606aaa0fdcbbade576f70f1590916b043fec28dcfdef1a8242fd4040"
|
2014-08-30 19:42:57 +00:00
|
|
|
|
2015-04-19 12:44:26 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-07 22:49:34 +00:00
|
|
|
sha256 "cbd107b9147e58be56405d04b83e7b58b2a61210f8713f32ef0aa12cc0cb9192" => :yosemite
|
|
|
|
sha256 "81b380fb42b2f057f80842a723a30bee313ca6c7f70a9f007a206c63064ca665" => :mavericks
|
|
|
|
sha256 "be677363eb1d07b255dd6d931b372411011576d97269f75c52dbb72a716ea919" => :mountain_lion
|
2015-04-19 12:44:26 +00:00
|
|
|
end
|
|
|
|
|
2014-08-30 19:42:57 +00:00
|
|
|
# provided jars may not be compatible with installed java,
|
|
|
|
# but works when built from source
|
|
|
|
depends_on "ant" => :build
|
2015-06-05 19:00:37 +00:00
|
|
|
depends_on :java => "1.7+"
|
2010-09-22 01:41:42 +00:00
|
|
|
|
|
|
|
def install
|
2014-08-30 19:42:57 +00:00
|
|
|
system "ant"
|
|
|
|
|
2015-06-05 19:00:37 +00:00
|
|
|
inreplace "fits-env.sh" do |s|
|
|
|
|
s.gsub! "FITS_HOME=`echo \"$0\" | sed 's,/[^/]*$,,'`", "FITS_HOME=#{prefix}"
|
2010-09-22 01:41:42 +00:00
|
|
|
s.gsub! "${FITS_HOME}/lib", libexec
|
|
|
|
end
|
|
|
|
|
2015-06-05 19:00:37 +00:00
|
|
|
prefix.install %w[COPYING COPYING.LESSER tools xml]
|
|
|
|
prefix.install Dir["*.txt"]
|
|
|
|
libexec.install Dir["lib/*"]
|
2014-02-28 17:47:07 +00:00
|
|
|
|
|
|
|
# fits-env.sh is a helper script that sets up environment
|
|
|
|
# variables, so we want to tuck this away in libexec
|
2015-06-05 19:00:37 +00:00
|
|
|
libexec.install "fits-env.sh"
|
2014-09-29 19:42:12 +00:00
|
|
|
inreplace %w[fits.sh fits-ngserver.sh],
|
|
|
|
'"$(dirname $BASH_SOURCE)/fits-env.sh"', "'#{libexec}/fits-env.sh'"
|
2014-02-28 17:47:07 +00:00
|
|
|
|
2015-06-05 19:00:37 +00:00
|
|
|
bin.install "fits.sh" => "fits"
|
|
|
|
bin.install "fits-ngserver.sh" => "fits-ngserver"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match 'mimetype="audio/mpeg"',
|
|
|
|
shell_output("#{bin}/fits -i #{test_fixtures "test.mp3"} 2>&1")
|
2010-09-22 01:41:42 +00:00
|
|
|
end
|
|
|
|
end
|