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