]>
Commit | Line | Data |
---|---|---|
0e141888 | 1 | # |
a81725ba | 2 | |
0e141888 ER |
3 | # Conditional build: |
4 | %bcond_without verbose # verbose build (V=1) | |
5 | ||
b0706f31 ER |
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,')} | |
11 | %endif | |
12 | ||
37060d63 | 13 | %include /usr/lib/rpm/macros.perl |
dc576455 CM |
14 | Summary: Mosh mobile shell |
15 | Name: mosh | |
7bc19f9c | 16 | Version: 1.2.4 |
a6dfe832 | 17 | Release: 3 |
dc576455 CM |
18 | License: GPL v3+ |
19 | Group: X11/Applications | |
7bc19f9c ER |
20 | Source0: http://mosh.mit.edu/%{name}-%{version}.tar.gz |
21 | # Source0-md5: c2d918f4d91fdc32546e2e089f9281b2 | |
dc576455 | 22 | URL: http://mosh.mit.edu/ |
b0706f31 | 23 | BuildRequires: binutils >= 2.20.51.0.2 |
246f59c7 | 24 | BuildRequires: libstdc++-devel >= 5:4.0 |
dc576455 CM |
25 | BuildRequires: libutempter-devel |
26 | BuildRequires: ncurses-devel | |
a81725ba | 27 | BuildRequires: openssl-devel |
23ab9f92 | 28 | BuildRequires: pkgconfig |
ab99cc95 | 29 | BuildRequires: protobuf |
dc576455 | 30 | BuildRequires: protobuf-devel |
37060d63 ER |
31 | BuildRequires: rpm-perlprov >= 4.1-13 |
32 | BuildRequires: sed >= 4.0 | |
dc576455 | 33 | BuildRequires: zlib-devel |
b0706f31 ER |
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 | |
37 | %endif | |
dc576455 CM |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
9eaea372 ER |
40 | # PLD stack protector flags are weaker than upstream, filter them out |
41 | # https://github.com/keithw/mosh/issues/203 | |
7bc19f9c | 42 | %define _ssp_cflags %{nil} |
9eaea372 | 43 | |
dc576455 CM |
44 | %description |
45 | Remote terminal application that allows roaming, supports intermittent | |
46 | connectivity, and provides intelligent local echo and line editing of | |
47 | user keystrokes. | |
48 | ||
49 | Mosh is a replacement for SSH. It's more robust and responsive, | |
50 | especially over Wi-Fi, cellular, and long-distance links. | |
51 | ||
52 | %prep | |
53 | %setup -q | |
37060d63 | 54 | %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh |
dc576455 CM |
55 | |
56 | %build | |
57 | %configure \ | |
349c173b | 58 | --enable-compile-warnings=error \ |
dc576455 | 59 | CPPFLAGS="-I/usr/include/ncurses" |
0e141888 ER |
60 | %{__make} \ |
61 | %{?with_verbose:V=1} | |
dc576455 CM |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
dc576455 CM |
65 | %{__make} install \ |
66 | DESTDIR=$RPM_BUILD_ROOT | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
73 | %doc AUTHORS ChangeLog NEWS THANKS | |
dc576455 CM |
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* |