Skip to content

Instantly share code, notes, and snippets.

@owenthereal
Last active December 10, 2015 11:48
Show Gist options
  • Save owenthereal/4429420 to your computer and use it in GitHub Desktop.
Save owenthereal/4429420 to your computer and use it in GitHub Desktop.
Homebrew custom build script for Tmux and Iterm2.
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20121224.zip'
sha1 'a2ea1cb72f3cef193d929c1580ef82710bc7345b'
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-20121224.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