cask "pdf-reader-pro" do version "4.6.4" sha256 "69f4040fa55bdc0479544e38afa30704874aeafaf063e56d3244f44bb3524461" url "https://www.pdfreaderpro.com/downloads/PDFReaderPro_v#{version.major_minor_patch}.dmg" name "PDF Reader Pro" desc "Read, annotate, edit, convert, create, OCR, fill forms and sign PDFs" homepage "https://www.pdfreaderpro.com/" livecheck do url "https://www.pdfreaderpro.com/downloads/pdfreaderprocast.xml" regex(/PDFReaderPro[._-]v?(\d+(?:\.\d+)+)\.dmg/i) strategy :sparkle do |items, regex| items.map { |item| item.url[regex, 1] } end end depends_on macos: ">= :high_sierra" app "PDF Reader Pro.app" zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.brother.pdfreaderprofree.mac.sfl*", "~/Library/Application Support/com.brother.pdfreaderprofree.mac", "~/Library/Caches/com.brother.pdfreaderprofree.mac", "~/Library/Preferences/com.brother.pdfreaderprofree.mac.bookmarks.plist", "~/Library/Preferences/com.brother.pdfreaderprofree.mac.plist", ] end