-# TODO:
-# - use service macros
#
# Conditional build:
%bcond_without gssapi # without GSSAPI support
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.0.6
-Release: 2
+Version: 2.0.13
+Release: 3
Epoch: 1
License: MIT (libraries), LGPL v2.1 (the rest)
Group: Networking/Daemons
Source0: http://dovecot.org/releases/2.0/%{name}-%{version}.tar.gz
-# Source0-md5: 6226485f95def28ecb4ff8fc52915762
+# Source0-md5: fd8a0702275a61332db7353dadff0f92
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: pam >= 0.79.0
Provides: group(dovecot)
Provides: imapdaemon
%post
/sbin/chkconfig --add dovecot
-if [ -f /var/lock/subsys/dovecot ]; then
- /etc/rc.d/init.d/dovecot restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/dovecot start\" to start dovecot daemon."
-fi
+%service dovecot restart
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/dovecot ]; then
- /etc/rc.d/init.d/dovecot stop >&2
- fi
+ %service dovecot stop
/sbin/chkconfig --del dovecot
fi
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
+%triggerin -- pam
+# restart devocot if pam is upgraded
+# (dovecot is linked with old libpam but tries to open modules linked with new libpam)
+if [ "$2" != 1 ]; then
+ %service -q dovecot restart
+fi
+
%triggerpostun -- dovecot < 1:2.0.0
# upgrading dovecot < 1.1
echo "Configuration change default_mail_env -> mail_location"
%attr(755,root,root) %{_libdir}/%{name}/libdovecot.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-storage.so
%{_libdir}/%{name}-devel
%{_includedir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}/libdovecot.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-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-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-storage.so.0