# - enable pam, see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533525 (1-2 solvable, 3 needs code)
#
# Conditional build:
-%bcond_with pam # PAM authentication support
-%bcond_with system_libtom # use system libtommath/libtomcrypt
+%bcond_with pam # PAM authentication support (most likely incomplete)
+%bcond_without system_libtom # use system libtommath/libtomcrypt
Summary: Dropbear - a smallish ssh2 server
Summary(pl.UTF-8): Dropbear - mały serwer ssh2
Name: dropbear
-Version: 2014.66
-Release: 1
-License: MIT
+Version: 2018.76
+Release: 2
+License: MIT and BSD
Group: Applications/Networking
Source0: https://matt.ucc.asn.au/dropbear/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: c21a01111aa5015db038c6efdb85717d
-Patch0: system-libtom.patch
+# Source0-md5: c3912f7fcdcc57c99937e4a79480d2c2
URL: https://matt.ucc.asn.au/dropbear/dropbear.html
-BuildRequires: autoconf >= 2.50
+BuildRequires: autoconf >= 2.59
BuildRequires: automake
-%{?with_system_libtom:BuildRequires: libtomcrypt-devel}
-%{?with_system_libtom:BuildRequires: libtommath-devel}
+%{?with_system_libtom:BuildRequires: libtomcrypt-devel >= 1.17-2}
%{?with_pam:BuildRequires: pam-devel}
BuildRequires: zlib-devel
+%{?with_system_libtom:Requires: libtomcrypt >= 1.17-2}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q
-%patch0 -p1
%{?with_system_libtom:rm -r libtomcrypt libtommath}
%{__aclocal}
%{__autoconf}
%{__autoheader}
+export OLDCFLAGS=set # hack for configure to respect our optflags
%configure \
- %{?with_system_libtom:--disable-bundled-libtom} \
%{__enable_disable_not system_libtom bundled-libtom} \
%{?with_pam:--enable-pam}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/man8
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
%{__make} install \
+ INSTALL="install -p" \
DESTDIR=$RPM_BUILD_ROOT
%clean
%files
%defattr(644,root,root,755)
-%doc CHANGES README SMALL TODO
+%doc CHANGES LICENSE README SMALL
+%{_sysconfdir}/%{name}
%attr(755,root,root) %{_bindir}/dbclient
%attr(755,root,root) %{_bindir}/dropbearconvert
%attr(755,root,root) %{_bindir}/dropbearkey