require 'formula' class Groovyserv :git homepage 'http://kobo.github.com/groovyserv/' depends_on 'groovy' def install system 'mvn package -Dmaven.test.skip=true' Dir::chdir Dir['target/groovyserv-*/groovyserv-*/'].first do prefix.install %w{LICENSE README} libexec.install %w{bin lib} end rm_f Dir["#{libexec}/bin/*.bat"] bin.mkpath Dir["#{libexec}/bin/*"].each do |f| ln_s f, bin + File.basename(f) end end end