]> git.pld-linux.org Git - packages/mosh.git/blob - mosh.spec
build with ssh-agent forwarding
[packages/mosh.git] / mosh.spec
1
2 # force gcc4 for ac
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,')}
8 %endif
9
10 %include        /usr/lib/rpm/macros.perl
11 Summary:        Mosh mobile shell
12 Name:           mosh
13 Version:        1.2.4
14 Release:        4
15 License:        GPL v3+
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 Patch0:         https://github.com/keithw/mosh/pull/583.patch
22 # Patch0-md5:   7eb14665ef06072591e5bcd80780c0e4
23 URL:            http://mosh.mit.edu/
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 BuildRequires:  binutils >= 2.20.51.0.2
27 BuildRequires:  libstdc++-devel >= 5:4.0
28 BuildRequires:  libtool
29 BuildRequires:  libutempter-devel
30 BuildRequires:  ncurses-devel
31 BuildRequires:  openssl-devel
32 BuildRequires:  patchutils
33 BuildRequires:  pkgconfig
34 BuildRequires:  protobuf
35 BuildRequires:  protobuf-devel
36 BuildRequires:  rpm-perlprov >= 4.1-13
37 BuildRequires:  sed >= 4.0
38 BuildRequires:  zlib-devel
39 # gcc4 might be installed, but not current __cc
40 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "4.0"
41 BuildRequires:  __cc >= 4.0
42 %endif
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 # PLD stack protector flags are weaker than upstream, filter them out
46 # https://github.com/keithw/mosh/issues/203
47 %define         _ssp_cflags     %{nil}
48
49 %define         specflags       -Wno-error=non-virtual-dtor
50
51 %description
52 Remote terminal application that allows roaming, supports intermittent
53 connectivity, and provides intelligent local echo and line editing of
54 user keystrokes.
55
56 Mosh is a replacement for SSH. It's more robust and responsive,
57 especially over Wi-Fi, cellular, and long-distance links.
58
59 %prep
60 %setup -q
61 filterdiff -p1 -x 'debian/*' -x 'fedora/*' -x 'macosx/*' %{PATCH100} > branch.diff
62 sed -i -e '/^diff /d' branch.diff
63 %{__patch} -p1 < branch.diff
64 %patch0 -p1
65 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh
66
67 %build
68 %{__libtoolize}
69 %{__aclocal}
70 %{__autoconf}
71 %{__automake}
72 CPPFLAGS="-I/usr/include/ncurses"
73 %configure \
74         --disable-silent-rules \
75         --enable-compile-warnings=error
76 %{__make}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc AUTHORS ChangeLog NEWS THANKS
89 %attr(755,root,root) %{_bindir}/%{name}
90 %attr(755,root,root) %{_bindir}/%{name}-client
91 %attr(755,root,root) %{_bindir}/%{name}-server
92 %{_mandir}/man1/%{name}.1*
93 %{_mandir}/man1/%{name}-client.1*
94 %{_mandir}/man1/%{name}-server.1*
This page took 0.043693 seconds and 4 git commands to generate.