2010-12-22 23:39:28 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Groovyserv < Formula
|
2010-12-22 23:39:28 +00:00
|
|
|
homepage 'http://kobo.github.com/groovyserv/'
|
2011-03-18 13:33:17 +00:00
|
|
|
url 'https://github.com/downloads/kobo/groovyserv/groovyserv-0.6-src.zip'
|
|
|
|
sha1 '5a812e9dfaa1aa0d6a769bd5c6ccbcefb970f135'
|
|
|
|
head 'http://github.com/kobo/groovyserv.git', :using => :git
|
2010-12-22 23:39:28 +00:00
|
|
|
|
|
|
|
depends_on 'groovy'
|
2011-03-22 00:52:13 +00:00
|
|
|
depends_on 'maven'
|
2010-12-22 23:39:28 +00:00
|
|
|
|
|
|
|
def install
|
2011-03-22 00:52:13 +00:00
|
|
|
# Build
|
2010-12-22 23:39:28 +00:00
|
|
|
system 'mvn package -Dmaven.test.skip=true'
|
2011-03-22 00:52:13 +00:00
|
|
|
|
|
|
|
# Install executables in libexec to avoid conflicts
|
2010-12-22 23:39:28 +00:00
|
|
|
Dir::chdir Dir['target/groovyserv-*/groovyserv-*/'].first do
|
|
|
|
libexec.install %w{bin lib}
|
|
|
|
end
|
2011-03-22 00:52:13 +00:00
|
|
|
prefix.install %w{LICENSE.txt README.txt NOTICE.txt}
|
2010-12-22 23:39:28 +00:00
|
|
|
|
2011-03-22 00:52:13 +00:00
|
|
|
# Remove windows files
|
2010-12-22 23:39:28 +00:00
|
|
|
rm_f Dir["#{libexec}/bin/*.bat"]
|
2011-03-22 00:52:13 +00:00
|
|
|
|
|
|
|
# Symlink binaries
|
2010-12-22 23:39:28 +00:00
|
|
|
bin.mkpath
|
|
|
|
Dir["#{libexec}/bin/*"].each do |f|
|
|
|
|
ln_s f, bin + File.basename(f)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|