homebrew-core/Formula/exiftool.rb
2017-12-20 10:51:59 +01:00

42 lines
1.6 KiB
Ruby

class Exiftool < Formula
desc "Perl lib for reading and writing EXIF metadata"
homepage "https://www.sno.phy.queensu.ca/~phil/exiftool/index.html"
# Ensure release is tagged production before submitting.
# https://www.sno.phy.queensu.ca/~phil/exiftool/history.html
url "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-10.55.tar.gz"
mirror "https://downloads.sourceforge.net/project/exiftool/Image-ExifTool-10.55.tar.gz"
sha256 "029b81a43f423332c00b76b5402fd8f85dee975fad41a734b494faeda4e41f7d"
revision 1
bottle do
cellar :any_skip_relocation
sha256 "5039ab4f2bc31d2afc9b4cd1fab9ab5d6deec2bf2d1bba0a95f4d54e747dd117" => :high_sierra
sha256 "5039ab4f2bc31d2afc9b4cd1fab9ab5d6deec2bf2d1bba0a95f4d54e747dd117" => :sierra
sha256 "5039ab4f2bc31d2afc9b4cd1fab9ab5d6deec2bf2d1bba0a95f4d54e747dd117" => :el_capitan
end
devel do
url "https://sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-10.69.tar.gz"
mirror "https://downloads.sourceforge.net/project/exiftool/Image-ExifTool-10.69.tar.gz"
sha256 "c24c50380eeb648e2c932a869ebc0e31189bb49ea450c822fad00bf5e6072aea"
end
def install
# replace the hard-coded path to the lib directory
inreplace "exiftool", "$exeDir/lib", libexec/"lib"
system "perl", "Makefile.PL"
system "make", "all"
libexec.install "lib"
bin.install "exiftool"
doc.install Dir["html/*"]
man1.install "blib/man1/exiftool.1"
man3.install Dir["blib/man3/*"]
end
test do
test_image = test_fixtures("test.jpg")
assert_match %r{MIME Type\s+: image/jpeg},
shell_output("#{bin}/exiftool #{test_image}")
end
end