Created
May 25, 2015 21:17
-
-
Save dwf/26a13e03009068b4299a to your computer and use it in GitHub Desktop.
Homebrew formula for a version of mosh with xterm mouse reporting fixed (i.e. works more than once per tmux session)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MobileShellMousefix < Formula | |
homepage "http://mosh.mit.edu/" | |
revision 2 | |
head do | |
url "https://github.com/lpkruger/mosh.git", :revision => "d5f75ec54a" | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
end | |
option "with-check", "Run build-time tests" | |
depends_on "openssl" | |
depends_on "pkg-config" => :build | |
depends_on "protobuf" | |
def install | |
system "./autogen.sh" if build.head? | |
# teach mosh to locate mosh-client without referring | |
# PATH to support launching outside shell e.g. via launcher | |
inreplace "scripts/mosh", "'mosh-client", "\'#{bin}/mosh-client" | |
# Upstream prefers O2: | |
# https://github.com/keithw/mosh/blob/master/README.md | |
ENV.O2 | |
system "./configure", "--prefix=#{prefix}", "--enable-completion" | |
system "make", "check" if build.with? "check" | |
system "make", "install" | |
end | |
test do | |
ENV["TERM"]="xterm" | |
system "#{bin}/mosh-client", "-c" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment