blob: a3b8c6d3be05da9a2e1b951e6881bca3c76a779f (
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
  | 
require 'formula'
class Tmux < Formula
  homepage 'http://tmux.sourceforge.net'
  url 'http://sourceforge.net/projects/tmux/files/tmux/tmux-1.6/tmux-1.6.tar.gz'
  sha1 '8756f6bcecb18102b87e5d6f5952ba2541f68ed3'
  head 'https://tmux.svn.sourceforge.net/svnroot/tmux/trunk'
  depends_on 'libevent'
  if ARGV.build_head? and MacOS.xcode_version >= "4.3"
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end
  def install
    system "sh", "autogen.sh" if ARGV.build_head?
    ENV.append "LDFLAGS", '-lresolv'
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--sysconfdir=#{etc}"
    system "make install"
    # Install bash completion scripts for use with bash-completion
    (prefix+'etc/bash_completion.d').install "examples/bash_completion_tmux.sh" => 'tmux'
    # Install addtional meta file
    prefix.install 'NOTES'
  end
  def caveats; <<-EOS.undent
    Additional information can be found in:
      #{prefix}/NOTES
    Bash completion script was installed to:
      #{etc}/bash_completion.d/tmux
    EOS
  end
  def test
    system "#{bin}/tmux", "-V"
  end
end
  |