File dropbear.spec of Package dropbear

# spec file for package dropbear
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

Name:           dropbear
Version:        2020.81
Release:        0
Summary:        A relatively small SSH 2 server and client
License:        MIT
Group:          Productivity/Networking/SSH
Source2:        %{name}.keyring
Source3:        dropbear.service
Source4:        dropbear-keygen.service
Source5:        dropbear.sysconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  zlib-devel
Requires(pre):	%fillup_prereq

Dropbear is a SSH 2 server and client designed to be small enough to be used in small memory environments, while still being functional and secure enough for general use.

It implements most required features of the SSH 2 protocol, and other features such as X11 and authentication agent forwarding.

%setup -q

make %{?_smp_mflags}

make install DESTDIR=%{buildroot}
install -d %{buildroot}%{_sysconfdir}/%{name}
%if 0%{?suse_version} >= 1500
  install -D -m 0644 %{SOURCE5} "%{buildroot}%{_fillupdir}/sysconfig.%{name}"
  install -D -m 0644 %{SOURCE5} "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
install -d %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-keygen.service
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}-keygen

%service_add_pre %{name}.service
%service_add_pre %{name}-keygen.service

%service_add_post %{name}.service
%service_add_post %{name}-keygen.service

%service_del_preun %{name}.service
%service_del_preun %{name}-keygen.service

%service_del_postun %{name}.service
%service_del_postun %{name}-keygen.service

%dir %{_sysconfdir}/%{name}
%if  0%{?suse_version} >= 1500

openSUSE Build Service is sponsored by