File mosh.spec of Package mosh
#
# spec file for package mosh
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Flavio Castelli.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: mosh
Version: 1.2.4
Release: 0
Summary: The mobile shell
License: GPL-3.0+
Group: Productivity/Networking/SSH
Url: http://mosh.mit.edu/
BuildRequires: gcc-c++
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: pkg-config
BuildRequires: protobuf-devel
BuildRequires: zlib-devel
Requires: openssh
Requires: perl-IO-Tty
Source0: http://mosh.mit.edu/%{name}-%{version}.tar.gz
Source1: %{name}.SuSEfirewall
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1020
%define with_susefirewall_config 1
%endif
%description
Remote terminal application that allows roaming, supports intermittent
connectivity, and provides intelligent local echo and line editing of user
keystrokes.
Mosh is a replacement for SSH. It's more robust and responsive, especially
over Wi-Fi, cellular, and long-distance links.
%prep
%setup -q
%build
# utempter requires libutempter not utempter itself and it is not yet
# packaged properly in openSUSE
%configure \
--enable-completion \
--enable-client \
--enable-server \
--disable-examples \
--enable-hardening \
--enable-ufw \
--without-utempter
make V=1 %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# copy susefirewall config file
%if 0%{?with_susefirewall_config}
%{__install} -D -m 0644 %{S:1} %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/mosh
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc %{_mandir}/man1/mosh.1.*
%doc %{_mandir}/man1/mosh-client.1.*
%doc %{_mandir}/man1/mosh-server.1.*
%if 0%{?with_susefirewall_config}
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mosh
%endif
%dir %{_sysconfdir}/ufw
%dir %{_sysconfdir}/ufw/applications.d
%config %{_sysconfdir}/ufw/applications.d/mosh
%{_bindir}/mosh
%{_bindir}/mosh-client
%{_bindir}/mosh-server
%config %{_sysconfdir}/bash_completion.d/mosh
%changelog