3 %bcond_with agent # with ssh agent forwarding patch
6 %if "%{pld_release}" == "ac"
7 # add suffix, but allow ccache, etc in ~/.rpmmacros
8 %{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
9 %{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
10 %{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
13 %include /usr/lib/rpm/macros.perl
14 Summary: Mosh mobile shell
19 Group: X11/Applications
20 Source0: http://mosh.mit.edu/%{name}-%{version}.tar.gz
21 # Source0-md5: 05511759169785ddfb4a6d48a893c9ab
22 Patch0: https://github.com/keithw/mosh/pull/583.patch
23 # Patch0-md5: 7eb14665ef06072591e5bcd80780c0e4
24 URL: http://mosh.mit.edu/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 BuildRequires: binutils >= 2.20.51.0.2
28 BuildRequires: libstdc++-devel >= 5:4.0
29 BuildRequires: libtool
30 BuildRequires: libutempter-devel
31 BuildRequires: ncurses-devel
32 BuildRequires: openssl-devel
33 BuildRequires: patchutils
34 BuildRequires: pkgconfig
35 BuildRequires: protobuf
36 BuildRequires: protobuf-devel
37 BuildRequires: rpm-perlprov >= 4.1-13
38 BuildRequires: sed >= 4.0
39 BuildRequires: zlib-devel
40 # gcc4 might be installed, but not current __cc
41 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0"
42 BuildRequires: __cc >= 4.0
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 # PLD stack protector flags are weaker than upstream, filter them out
47 # https://github.com/keithw/mosh/issues/203
48 %define _ssp_cflags %{nil}
50 %define specflags -Wno-error=non-virtual-dtor
53 Remote terminal application that allows roaming, supports intermittent
54 connectivity, and provides intelligent local echo and line editing of
57 Mosh is a replacement for SSH. It's more robust and responsive,
58 especially over Wi-Fi, cellular, and long-distance links.
61 %setup -qn %{name}-release-%{version}
65 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh.pl
74 --disable-silent-rules \
75 --enable-compile-warnings=error
79 rm -rf $RPM_BUILD_ROOT
81 DESTDIR=$RPM_BUILD_ROOT
84 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc AUTHORS ChangeLog NEWS THANKS
89 %attr(755,root,root) %{_bindir}/%{name}
90 %attr(755,root,root) %{_bindir}/%{name}-client
91 %attr(755,root,root) %{_bindir}/%{name}-server
92 %{_mandir}/man1/%{name}.1*
93 %{_mandir}/man1/%{name}-client.1*
94 %{_mandir}/man1/%{name}-server.1*