Skip to content

Instantly share code, notes, and snippets.

@jimeh
Created May 13, 2016 13:32
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 jimeh/3c1dab418c022995893319809b5db525 to your computer and use it in GitHub Desktop.
Save jimeh/3c1dab418c022995893319809b5db525 to your computer and use it in GitHub Desktop.
Seemingly working Homebrew formula for Tmux 2.2.
class Tmux < Formula
desc "Terminal multiplexer"
homepage "https://tmux.github.io/"
stable do
url "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz"
sha256 "bc28541b64f99929fe8e3ae7a02291263f3c97730781201824c0f05d7c8e19e4"
end
head do
url "https://github.com/tmux/tmux.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "libevent"
def install
system "sh", "autogen.sh" if build.head?
ENV.append "LDFLAGS", "-lresolv"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}"
system "make", "install"
# if build.head?
# pkgshare.install "example_tmux.conf"
# else
# bash_completion.install "examples/bash_completion_tmux.sh" => "tmux"
# pkgshare.install "examples"
# end
end
def caveats; <<-EOS.undent
Example configuration has been installed to:
#{opt_pkgshare}
EOS
end
test do
system "#{bin}/tmux", "-V"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment