cask "prince" do version "15.4.1" sha256 "08c5e76694bcc5914351a7d87d4aa9dde786c88d1fe8d2594c46d7b5fc66f626" url "https://www.princexml.com/download/prince-#{version}-macos.zip" name "Prince" desc "Convert HTML to PDF" homepage "https://www.princexml.com/" livecheck do url "https://www.princexml.com/download/" regex(/>Prince v?(\d+(?:\.\d+)+)/i) end # shim script (https://github.com/Homebrew/homebrew-cask/issues/18809) shimscript = "#{staged_path}/prince-#{version}-macos/prince.wrapper.sh" binary shimscript, target: "prince" preflight do File.write shimscript, <<~EOS #!/bin/sh exec '#{staged_path}/prince-#{version}-macos/lib/prince/bin/prince' --prefix '#{staged_path}/prince-#{version}-macos/lib/prince' "$@" EOS end # No zap stanza required end