cask 'nomachine' do version '5.3.9_7' sha256 'cc9bffba27d511dc74da7421500eb0362a5b5f1d9fe88dba8871c666ffe18ef8' url "http://download.nomachine.com/download/#{version.major_minor}/MacOSX/nomachine_#{version}.dmg" name 'NoMachine' homepage 'https://www.nomachine.com/' pkg 'NoMachine.pkg' # a launchctl job ordinarily manages uninstall once the app bundle is removed uninstall delete: '/Applications/NoMachine.app' # however, we duplicate the uninstall process manually in the zap stanza just in case zap early_script: { executable: '/bin/rm', args: ['-f', '--', '/Library/Application Support/NoMachine/nxuninstall.sh'], }, quit: 'com.nomachine.nxdock', kext: [ 'com.nomachine.driver.nxau', 'com.nomachine.driver.nxtun', 'com.nomachine.kext.nxfs', ], pkgutil: 'com.nomachine.nomachine.NoMachine.*', launchctl: 'com.nomachine.uninstall' end