%bcond_without ldap # disable LDAP support for saslauthd
%bcond_without gssapi # do not enable GSSAPI support for saslauthd and build gssapi plugin
%bcond_without mysql # don't build MySQL plugin
+%bcond_without nagios # do not enable Nagios plugin
%bcond_without ntlm # do not build NTLM plugin
%bcond_without pgsql # do not build PostgreSQL plugin
%bcond_without sqlite # do not enable sqlite 2 plugin
Summary(ru.UTF-8): Библиотека Cyrus SASL
Summary(uk.UTF-8): Бібліотека Cyrus SASL
Name: cyrus-sasl
-Version: 2.1.27
-Release: 1
+Version: 2.1.28
+Release: 2
License: distributable
Group: Libraries
-Source0: ftp://ftp.cyrusimap.org/cyrus-sasl/%{name}-%{version}.tar.gz
-# Source0-md5: a33820c66e0622222c5aefafa1581083
+#Source0Download: https://github.com/cyrusimap/cyrus-sasl/releases
+Source0: https://github.com/cyrusimap/cyrus-sasl/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 6f228a692516f5318a64505b46966cfa
Source1: saslauthd.init
Source2: saslauthd.sysconfig
Source3: %{name}.pam
Patch9: %{name}-sizes.patch
Patch10: %{name}-nagios-plugin.patch
Patch12: %{name}-gssapi-detect.patch
-Patch13: %{name}-saslauthd-httpform-urlescape.patch
Patch14: %{name}-ac-libs.patch
Patch20: %{name}-auxprop.patch
Patch21: 0030-dont_use_la_files_for_opening_plugins.patch
-URL: http://asg.web.cmu.edu/sasl/
+URL: https://www.cyrusimap.org/sasl/
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.11
%{?with_authlib:BuildRequires: courier-authlib-devel}
BuildRequires: pam-devel
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: sphinx-pdg-3
%{?with_sqlite:BuildRequires: sqlite-devel}
%{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
Requires: pam >= 0.79.0
%endif
%patch7 -p1
%patch9 -p1
-%patch10 -p1
+%{?with_nagios:%patch10 -p1}
%patch12 -p1
-%patch13 -p0
%patch14 -p1
%patch20 -p1
%patch21 -p1
s,/etc/saslauthd.conf,%{_sysconfdir}/saslauthd.conf,g
s,/var/run/saslauthd/mux,/var/lib/sasl2/mux,g
s,/var/state/saslauthd,/var/lib/sasl2,g
-' saslauthd/saslauthd.8 saslauthd/saslauthd.mdoc saslauthd/LDAP_SASLAUTHD doc/legacy/sysadmin.html
+' saslauthd/saslauthd.mdoc saslauthd/LDAP_SASLAUTHD doc/legacy/sysadmin.html
%build
%{__libtoolize}
%{__autoheader}
%{__automake}
%configure \
+ SPHINX_BUILD=/usr/bin/sphinx-build-3 \
%{?with_cryptedpw: LDFLAGS=-lcrypt} \
%{!?with_gssapi:--disable-gssapi} \
%{?with_gssapi:--enable-gssapi --with-gss_impl=heimdal} \
# package for ghost
touch $RPM_BUILD_ROOT/var/lib/sasl2/{cache.flock,cache.mmap,mux,mux.accept,saslauthd.pid}
+%if %{with nagios}
install -d $RPM_BUILD_ROOT/etc/nagios/plugins
%{__sed} -e 's,@plugindir@,%{_libdir}/nagios/plugins,' %{SOURCE4} > $RPM_BUILD_ROOT/etc/nagios/plugins/check_saslauthd.cfg
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%ghost /var/lib/sasl2/mux.accept
%ghost /var/lib/sasl2/saslauthd.pid
%{_mandir}/man8/saslauthd.8*
+%{_mandir}/man8/testsaslauthd.8*
+%if %{with nagios}
%files -n nagios-plugin-check_saslauthd
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) /etc/nagios/plugins/check_saslauthd.cfg
%attr(755,root,root) %{_libdir}/nagios/plugins/check_saslauthd
+%endif