3 %bcond_without 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: c2d918f4d91fdc32546e2e089f9281b2
22 Patch100: https://github.com/keithw/mosh/compare/%{name}-1.2.4...c6cd99b.patch
23 # Patch100-md5: 3e8455f30b5fb6cd7b24a203c00a549c
24 Patch0: https://github.com/keithw/mosh/pull/583.patch
25 # Patch0-md5: 7eb14665ef06072591e5bcd80780c0e4
26 URL: http://mosh.mit.edu/
27 BuildRequires: autoconf
28 BuildRequires: automake
29 BuildRequires: binutils >= 2.20.51.0.2
30 BuildRequires: libstdc++-devel >= 5:4.0
31 BuildRequires: libtool
32 BuildRequires: libutempter-devel
33 BuildRequires: ncurses-devel
34 BuildRequires: openssl-devel
35 BuildRequires: patchutils
36 BuildRequires: pkgconfig
37 BuildRequires: protobuf
38 BuildRequires: protobuf-devel
39 BuildRequires: rpm-perlprov >= 4.1-13
40 BuildRequires: sed >= 4.0
41 BuildRequires: zlib-devel
42 # gcc4 might be installed, but not current __cc
43 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0"
44 BuildRequires: __cc >= 4.0
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 # PLD stack protector flags are weaker than upstream, filter them out
49 # https://github.com/keithw/mosh/issues/203
50 %define _ssp_cflags %{nil}
52 %define specflags -Wno-error=non-virtual-dtor
55 Remote terminal application that allows roaming, supports intermittent
56 connectivity, and provides intelligent local echo and line editing of
59 Mosh is a replacement for SSH. It's more robust and responsive,
60 especially over Wi-Fi, cellular, and long-distance links.
65 filterdiff -p1 -x 'debian/*' -x 'fedora/*' -x 'macosx/*' %{PATCH100} > branch.diff
66 sed -i -e '/^diff /d' branch.diff
67 %{__patch} -p1 < branch.diff
70 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh
79 --disable-silent-rules \
80 --enable-compile-warnings=error
84 rm -rf $RPM_BUILD_ROOT
86 DESTDIR=$RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
93 %doc AUTHORS ChangeLog NEWS THANKS
94 %attr(755,root,root) %{_bindir}/%{name}
95 %attr(755,root,root) %{_bindir}/%{name}-client
96 %attr(755,root,root) %{_bindir}/%{name}-server
97 %{_mandir}/man1/%{name}.1*
98 %{_mandir}/man1/%{name}-client.1*
99 %{_mandir}/man1/%{name}-server.1*