/
mobile-shell.rb
51 lines (41 loc) 路 1.73 KB
/
mobile-shell.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class MobileShell < Formula
desc "Remote terminal application"
homepage "https://mosh.org"
url "https://mosh.org/mosh-1.3.0.tar.gz"
sha256 "320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376"
revision 1
bottle do
sha256 "6ab4f7e7cf8e149f10931471658063356b485b0ca34037f44c93afaae34c1c0f" => :sierra
sha256 "86daec2c4d1517f4485989c69f989caf1a16fdc891cb2f4a949371bd5b4eeda0" => :el_capitan
sha256 "398f486fc155ba3e345bd26834b4bff6c16e0535237e196cb766cf472fc3811b" => :yosemite
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 :perl => "5.14" if MacOS.version <= :mountain_lion
depends_on "tmux" => :build if build.with?("test") || build.bottle?
def install
# Remove for > 1.3.0
# Upstream commit from 29 Apr 2017 "Disable unicode-later-combining.test for now"
# See https://github.com/mobile-shell/mosh/commit/df4dbe0d6c9c3ac7a6a102f315090c9b7aa75ad6
if build.stable?
inreplace "src/tests/Makefile.in", /^\tunicode-later-combining.test \\$\n/, ""
end
# 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