2010-04-28 11:47:13 +00:00
|
|
|
require 'formula'
|
2011-06-11 14:18:40 +00:00
|
|
|
require 'find'
|
2010-04-28 11:47:13 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Scalate < Formula
|
2011-11-19 13:08:04 +00:00
|
|
|
url 'http://repo.fusesource.com/nexus/content/repositories/public/org/fusesource/scalate/scalate-distro/1.5.3/scalate-distro-1.5.3-unix-bin.tar.gz'
|
|
|
|
version '1.5.3'
|
2010-04-28 11:47:13 +00:00
|
|
|
homepage 'http://scalate.fusesource.org/'
|
2011-11-19 13:08:04 +00:00
|
|
|
md5 '5114f611836957f479c1f2060b20beb3'
|
2010-04-28 11:47:13 +00:00
|
|
|
|
|
|
|
def startup_script
|
|
|
|
<<-EOS.undent
|
2010-04-07 05:58:35 +00:00
|
|
|
#!/bin/bash
|
2010-04-28 11:47:13 +00:00
|
|
|
# This startup script for Scalate calls the real startup script installed
|
|
|
|
# to Homebrew's cellar. This avoids issues with local vs. absolute symlinks.
|
|
|
|
|
|
|
|
#{libexec}/bin/scalate $*
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
|
2011-06-11 14:18:40 +00:00
|
|
|
# Recursively fix the permissions of extracted regular files excluding the bin directory contents.
|
|
|
|
%w{ archetypes docs lib samples license.txt readme.html }.each do |name|
|
|
|
|
Find.find(name) do |path|
|
|
|
|
if File.file?(path)
|
|
|
|
File.chmod(0644, path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
prefix.install %w{ license.txt readme.html }
|
2010-04-28 11:47:13 +00:00
|
|
|
libexec.install Dir['*']
|
|
|
|
|
|
|
|
(bin+'scalate').write startup_script
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
Software was installed to:
|
|
|
|
#{libexec}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|