Skip to content

Instantly share code, notes, and snippets.

@erickreutz
Forked from halcyon/tmux-iterm2.rb
Created March 20, 2013 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erickreutz/5203867 to your computer and use it in GitHub Desktop.
Save erickreutz/5203867 to your computer and use it in GitHub Desktop.
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130122.zip'
sha1 'a5f55b545500ebcb97e842f65ea9c90dd457f228'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
if build.head?
depends_on :automake
depends_on :libtool
end
def install
system "tar -xvf tmux-for-iTerm2-20130122.tar.gz"
Dir.chdir "tmux" do
system "sh", "autogen.sh" if 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-iterm2'
# Install addtional meta file
prefix.install 'NOTES'
end
end
def caveats; <<-EOS.undent
Additional information can be found in:
#{prefix}/NOTES
EOS
end
def test
system "#{bin}/tmux", "-V"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment