aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/glassfish.rb
blob: 53c55ccafdc18ab84b7d685aa12284be797f19a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class Glassfish < Formula
  homepage 'http://glassfish.java.net/'
  url 'http://download.java.net/glassfish/3.1.2.2/release/glassfish-3.1.2.2.zip'
  sha1 '627e67d7e7f06583beb284c56f76456913461722'

  # To keep empty folders around
  skip_clean 'libexec'

  def install
    rm_rf Dir['bin/*.bat']

    libexec.install Dir["*"]
    libexec.install Dir[".org.opensolaris,pkg"]
    bin.write_exec_script Dir["#{libexec}/bin/*"]

    inreplace "#{libexec}/bin/asadmin" do |s|
      s.change_make_var! 'AS_INSTALL', "#{libexec}/glassfish"
    end
  end
end