homebrew-core/Formula/mosh.rb

44 lines
1.4 KiB
Ruby

class Mosh < Formula
desc "Remote terminal application"
homepage "https://mosh.org"
url "https://mosh.org/mosh-1.3.2.tar.gz"
sha256 "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216"
revision 2
bottle do
sha256 "a6978eda44965301af1ca77cec8cdcbda2ccb123ae43959ecb9a143fb745b0cd" => :high_sierra
sha256 "6a1a87842665366e6dddb88426ae43fd5508b595a72a561f5c6b4a892d373f57" => :sierra
sha256 "996904520d84a4d00557f399888e934fe4011719009e5662d49749ab0b83c89e" => :el_capitan
end
head do
url "https://github.com/mobile-shell/mosh.git", :shallow => false
depends_on "autoconf" => :build
depends_on "automake" => :build
end
option "with-test", "Run build-time tests"
deprecated_option "without-check" => "without-test"
depends_on "pkg-config" => :build
depends_on "protobuf"
depends_on "tmux" => :build if build.with?("test") || build.bottle?
def install
# teach mosh to locate mosh-client without referring
# PATH to support launching outside shell e.g. via launcher
inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client"
system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}", "--enable-completion"
system "make", "check" if build.with?("test") || build.bottle?
system "make", "install"
end
test do
system bin/"mosh-client", "-c"
end
end