4 %bcond_without verbose # verbose build (V=1)
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: c2d918f4d91fdc32546e2e089f9281b2
22 URL: http://mosh.mit.edu/
23 BuildRequires: binutils >= 2.20.51.0.2
24 BuildRequires: libstdc++-devel >= 5:4.0
25 BuildRequires: libutempter-devel
26 BuildRequires: ncurses-devel
27 BuildRequires: openssl-devel
28 BuildRequires: pkgconfig
29 BuildRequires: protobuf
30 BuildRequires: protobuf-devel
31 BuildRequires: rpm-perlprov >= 4.1-13
32 BuildRequires: sed >= 4.0
33 BuildRequires: zlib-devel
34 # gcc4 might be installed, but not current __cc
35 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0"
36 BuildRequires: __cc >= 4.0
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 # PLD stack protector flags are weaker than upstream, filter them out
41 # https://github.com/keithw/mosh/issues/203
42 %define _ssp_cflags %{nil}
45 Remote terminal application that allows roaming, supports intermittent
46 connectivity, and provides intelligent local echo and line editing of
49 Mosh is a replacement for SSH. It's more robust and responsive,
50 especially over Wi-Fi, cellular, and long-distance links.
54 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh
58 --enable-compile-warnings=error \
59 CPPFLAGS="-I/usr/include/ncurses"
64 rm -rf $RPM_BUILD_ROOT
66 DESTDIR=$RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %doc AUTHORS ChangeLog NEWS THANKS
74 %attr(755,root,root) %{_bindir}/%{name}
75 %attr(755,root,root) %{_bindir}/%{name}-client
76 %attr(755,root,root) %{_bindir}/%{name}-server
77 %{_mandir}/man1/%{name}.1*
78 %{_mandir}/man1/%{name}-client.1*
79 %{_mandir}/man1/%{name}-server.1*