]> git.pld-linux.org Git - packages/mosh.git/blob - mosh.spec
spec cleanups
[packages/mosh.git] / mosh.spec
1 #
2 # Conditional build:
3 %bcond_without  agent           # with ssh agent forwarding patch
4
5 # force gcc4 for ac
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
13 %include        /usr/lib/rpm/macros.perl
14 Summary:        Mosh mobile shell
15 Name:           mosh
16 Version:        1.2.4
17 Release:        4
18 License:        GPL v3+
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
45 %endif
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
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}
51
52 %define         specflags       -Wno-error=non-virtual-dtor
53
54 %description
55 Remote terminal application that allows roaming, supports intermittent
56 connectivity, and provides intelligent local echo and line editing of
57 user keystrokes.
58
59 Mosh is a replacement for SSH. It's more robust and responsive,
60 especially over Wi-Fi, cellular, and long-distance links.
61
62 %prep
63 %setup -q
64 %if %{with agent}
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
68 %patch0 -p1
69 %endif
70 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' scripts/mosh
71
72 %build
73 %{__libtoolize}
74 %{__aclocal}
75 %{__autoconf}
76 %{__autoheader}
77 %{__automake}
78 %configure \
79         --disable-silent-rules \
80         --enable-compile-warnings=error
81 %{__make}
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 %{__make} install \
86         DESTDIR=$RPM_BUILD_ROOT
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
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*
This page took 0.106841 seconds and 4 git commands to generate.