aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/hornetq.rb
blob: a7e87f1d04d27648377b3b95fa72ec443a0c822d (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
require 'formula'

class Hornetq < Formula
  homepage 'http://www.jboss.org/hornetq'
  url 'http://downloads.jboss.org/hornetq/hornetq-2.2.14.Final.tar.gz'
  sha1 'e02656a93ef9e3cb02cbb8b6e7953b591b59fa71'

  version '2.2.14'

  def wrapper_script target
    <<-EOS.undent
      #!/bin/bash
      cd #{libexec}/bin/
      ./#{target} "$@"
    EOS
  end

  def install
    libexec.install Dir['*']
    (bin+'hornet-start').write wrapper_script('run.sh')
    (bin+'hornet-stop').write wrapper_script('stop.sh')
  end

  def caveats; <<-EOF.undent
    HornetQ has been installed to:
      #{libexec}

    `run.sh` and `stop.sh` have been wrapped as`hornet-start` and `hornet-stop`
    to avoid naming conflicts.
    EOF
  end
end