3 %if "%{pld_release}" == "ac"
4 # add suffix, but allow ccache, etc in ~/.rpmmacros
5 %{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
6 %{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
7 %{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
10 %include /usr/lib/rpm/macros.perl
11 Summary: Mosh mobile shell
16 Group: X11/Applications
17 Source0: https://github.com/mobile-shell/mosh/archive/lowbandwidth.tar.gz
18 # Source0-md5: e6f10f597a2f522209e744ad218f7f08
19 URL: http://mosh.mit.edu/
20 BuildRequires: binutils >= 2.20.51.0.2
21 BuildRequires: libstdc++-devel >= 5:4.0
22 BuildRequires: libutempter-devel
23 BuildRequires: ncurses-devel
24 BuildRequires: openssl-devel
25 BuildRequires: pkgconfig
26 BuildRequires: protobuf
27 BuildRequires: protobuf-devel
28 BuildRequires: rpm-perlprov >= 4.1-13
29 BuildRequires: sed >= 4.0
30 BuildRequires: zlib-devel
31 # gcc4 might be installed, but not current __cc
32 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0"
33 BuildRequires: __cc >= 4.0
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 # PLD stack protector flags are weaker than upstream, filter them out
38 # https://github.com/keithw/mosh/issues/203
39 %define _ssp_cflags %{nil}
42 Remote terminal application that allows roaming, supports intermittent
43 connectivity, and provides intelligent local echo and line editing of
46 Mosh is a replacement for SSH. It's more robust and responsive,
47 especially over Wi-Fi, cellular, and long-distance links.
52 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh
61 --disable-silent-rules \
62 --enable-compile-warnings=error
66 rm -rf $RPM_BUILD_ROOT
68 DESTDIR=$RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %doc AUTHORS ChangeLog NEWS THANKS
76 %attr(755,root,root) %{_bindir}/%{name}
77 %attr(755,root,root) %{_bindir}/%{name}-client
78 %attr(755,root,root) %{_bindir}/%{name}-server
79 %{_mandir}/man1/%{name}.1*
80 %{_mandir}/man1/%{name}-client.1*
81 %{_mandir}/man1/%{name}-server.1*