# basically just a copy of the upstream soundfly.rb, but with the dependency removed
# intended for internal use only etc etc

cask 'soundfly-latest-karen_internal' do
  version :latest
  sha256 :no_check

  # abyssoft seems to have stopped existing
  url 'https://developer.angelxwind.net/macOS/soundfly.zip'
  name 'Soundfly'
  homepage 'http://abyssoft.com/software/soundfly/'
  license :gratis

  pkg 'Soundfly.pkg', allow_untrusted: true

  postflight do
    system '/usr/bin/sudo', '-E', '--',
           '/sbin/kextload', '-b', 'com.Cycling74.driver.Soundflower'
  end

  uninstall pkgutil: 'com.abyssoft.soundfly.*'
end
