aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/grails.rb
blob: 77bd39b78d437139799f49282bc6ca8a4a545f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require 'formula'

class Grails < Formula
  url 'http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-1.3.7.zip'
  homepage 'http://grails.org'
  md5 'ea7cbfecdcf30c861f8faa8552ce3b46'

  def install
    rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"]
    prefix.install %w[LICENSE README]
    libexec.install Dir['*']
    bin.mkpath
    Dir["#{libexec}/bin/*"].each do |f|
      next unless File.extname(f).empty?
      ln_s f, bin+File.basename(f)
    end
  end

  def caveats
    <<-EOS.undent
    IMPORTANT!

    Notes On Upgrading #{name.capitalize} From Versions < 1.3.7

    The directory layout has been changed slightly for versions >= 1.3.7
    in order to conform with Homebrew conventions for installation of Java
    jar files.  Please note the following:

    Before upgrading -

      run 'brew unlink #{name}' (keeps old version in cellar)
      OR
      run 'brew rm #{name}' (deletes old version from cellar)
      THEN
      run 'brew prune'

    This is to ensure that #{HOMEBREW_PREFIX} is cleaned of references to the
    old version.

    The #{name.capitalize} home directory for versions < 1.3.7 was in the form:

      #{HOMEBREW_CELLAR}/#{name}/1.3.6

    For versions >= 1.3.7, the #{name.capitalize} home directory is in the form:

      #{libexec}

    If you set the GRAILS_HOME variable explicitly in your shell environment,
    change its value accordingly.
    EOS
  end

end