require 'formula' class OpenTyrianData '9ddcd06e48' homepage 'http://code.google.com/p/opentyrian/' version 'trunk' depends_on 'sdl' depends_on 'sdl_net' def install d = libexec OpenTyrianData.new.brew { d.install Dir['*'] } system "make release" libexec.install "opentyrian" # Use a startup script to find the game data (bin+'opentyrian').write startup_script end def startup_script return <<-END #!/bin/bash #{libexec}/opentyrian --data=#{libexec} $* END end def caveats "Save games will be put in ~/.opentyrian" end end