-# Conditional build:
+# Conditional build:
%bcond_without gssapi # without GSSAPI support
%bcond_without ldap # without LDAP auth
%bcond_without mysql # without MySQL auth
%bcond_without pgsql # without PostgreSQL auth
%bcond_without sqlite # without SQLite3 auth
%bcond_without sasl # without SASL auth
+%bcond_without tests # tests
Summary: IMAP and POP3 server written with security primarily in mind
Summary(pl.UTF-8): Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
Name: dovecot
-Version: 2.2.22
+Version: 2.2.23
Release: 1
Epoch: 1
License: MIT (libraries), LGPL v2.1 (the rest)
Group: Networking/Daemons
Source0: http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
-# Source0-md5: bc8057bd5bdfa0f8e80e2fef1082a241
+# Source0-md5: 0d2855c19b0603b417cd70613b4a9f36
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
Patch0: %{name}-config.patch
+Patch1: %{name}-rpath.patch
+Patch2: %{name}-disableSSLv3.patch
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bzip2-devel
+BuildRequires: clucene-core-devel >= 2.3.3.4
+BuildRequires: curl-devel
%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
-BuildRequires: gettext-devel
+BuildRequires: expat-devel
+BuildRequires: gettext-tools
%{?with_gssapi:BuildRequires: heimdal-devel}
BuildRequires: libcap-devel
+BuildRequires: libicu-devel
+BuildRequires: libstemmer-devel
+BuildRequires: libexttextcat-devel
BuildRequires: libtool
+BuildRequires: lz4-devel
%{?with_mysql:BuildRequires: mysql-devel}
%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pam-devel
BuildRequires: pkgconfig
%{?with_pgsql:BuildRequires: postgresql-devel}
+BuildRequires: rpmbuild(macros) >= 1.647
BuildRequires: sed >= 4.0
%{?with_sqlite:BuildRequires: sqlite3-devel}
+BuildRequires: xz-devel
BuildRequires: zlib-devel
Requires(post,preun): /sbin/chkconfig
Requires(postun): /usr/sbin/groupdel
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p2
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
%{__autoheader}
%{__automake}
%configure \
+ ac_cv_prog_VALGRIND=no \
+ CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" \
--disable-static \
%{?debug:--enable-debug} \
%{?with_ldap:--with-ldap=yes} \
%{?with_pgsql:--with-pgsql} \
%{?with_sqlite:--with-sqlite} \
%{?with_gssapi:--with-gssapi=plugin} \
+ --with-lucene \
+ --with-stemmer \
+ --with-solr \
--with-sql=plugin \
--with-pam \
--with-zlib \
--with-ssl=openssl \
--with-moduledir=%{_libdir}/%{name}/plugins \
--with-ssldir=/var/lib/openssl \
- --sysconfdir=%{_sysconfdir} \
- --with-systemdsystemunitdir=/lib/systemd/system
+ --sysconfdir=%{_sysconfdir}
%{__make}
+%{?with_tests:%{__make} check}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security} \
find $RPM_BUILD_ROOT%{_libdir}/%{name} -name '*.la' | xargs rm
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
-
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/README
%attr(755,root,root) %{_libdir}/%{name}/plugins/doveadm/*.so
%dir %{_libdir}/%{name}/plugins/stats
%attr(755,root,root) %{_libdir}/%{name}/plugins/stats/*.so
+%{_datadir}/dovecot
%dir /var/lib/dovecot
%dir /var/run/dovecot
%attr(750,root,dovenull) %dir /var/run/dovecot/login
%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so
-#%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ssl.so
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so
-%{_libdir}/%{name}-devel
+%{_libdir}/%{name}/%{name}-config
%{_includedir}/%{name}
%{_aclocaldir}/dovecot.m4
%files libs
%defattr(644,root,root,755)
%dir %{_libdir}/%{name}
+
%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0.0.0
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0.0.0
-#%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ssl.so.0.0.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0.0.0
# Note: we are in %{_libdir}/dovecot, ldconfig does not look into this
# directory. This is why the following files are not %ghost
%attr(755,root,root) %{_libdir}/%{name}/libdovecot.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-compression.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-dsync.so.0
+%attr(755,root,root) %{_libdir}/%{name}/libdovecot-fts.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-lda.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-login.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-sql.so.0
-#%attr(755,root,root) %{_libdir}/%{name}/libdovecot-ssl.so.0
%attr(755,root,root) %{_libdir}/%{name}/libdovecot-storage.so.0