Skip to content

Instantly share code, notes, and snippets.

@halcyon
Forked from owenthereal/tmux-iterm2.rb
Last active December 11, 2015 16:18
Show Gist options
  • Save halcyon/4626953 to your computer and use it in GitHub Desktop.
Save halcyon/4626953 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