aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/apache-activemq.rb
blob: 0a927e39d7e8d89fb7b07fcee692a8a52eb76435 (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
require 'formula'

class ApacheActivemq <Formula
  url 'http://www.gossipcheck.com/mirrors/apache/activemq/apache-activemq/5.3.0/apache-activemq-5.3.0-bin.tar.gz'
  homepage 'http://activemq.apache.org/'
  md5 'f4b88a2b4ffd21cb804cdbd4f2e0152f'
  
  def skip_clean? path
    path == libexec + 'webapps/admin/WEB-INF/jsp'
  end
  
  def startup_script
    <<-EOS.undent
    #!/usr/bin/env bash
    # This is a startup script for Apache ActiveMQ that calls the 
    # real startup script installed to Homebrew's cellar.
    
    pushd #{libexec}
    bin/activemq
    popd
    EOS
  end

  def install
    rm_rf 'bin/linux-x86-32'
    rm_rf 'bin/linux-x86-64'
    
    prefix.install %w{ LICENSE NOTICE README.txt }
    libexec.install Dir['*']
    
    (bin+'activemq').write startup_script
  end
  
  def caveats
    <<-EOS.undent
    Software was installed to:
      #{libexec}
    EOS
  end
end