]> git.pld-linux.org Git - packages/mosh.git/blob - mosh.spec
build with branch diff changes, up to c6cd99b
[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:        3
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 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
40 %endif
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
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}
46
47 %description
48 Remote terminal application that allows roaming, supports intermittent
49 connectivity, and provides intelligent local echo and line editing of
50 user keystrokes.
51
52 Mosh is a replacement for SSH. It's more robust and responsive,
53 especially over Wi-Fi, cellular, and long-distance links.
54
55 %prep
56 %setup -q
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
61
62 %build
63 %{__libtoolize}
64 %{__aclocal}
65 %{__autoconf}
66 %{__automake}
67 CPPFLAGS="-I/usr/include/ncurses"
68 %configure \
69         --disable-silent-rules \
70         --enable-compile-warnings=error
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 %{__make} install \
76         DESTDIR=$RPM_BUILD_ROOT
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files
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*
This page took 0.053438 seconds and 4 git commands to generate.