#
# Conditional build:
+%bcond_with gssapi # with GSSAPI support
%bcond_without ldap # without LDAP auth
%bcond_without mysql # without MySQL auth
%bcond_without pgsql # without PostgreSQL auth
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: 1.1.2
+Version: 1.1.6
Release: 2
Epoch: 1
License: MIT (libraries), LGPL v2.1 (the rest)
Group: Networking/Daemons
Source0: http://dovecot.org/releases/1.1/%{name}-%{version}.tar.gz
-# Source0-md5: fcebb6c099421049632b2f1f019f55cd
+# Source0-md5: ccbfcfcb5e6d19a3228885a2f7eae2dd
Source1: %{name}.pamd
Source2: %{name}.init
Source3: %{name}.sysconfig
Patch0: %{name}-config.patch
-Patch1: %{name}-fd.patch
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.0}
BuildRequires: gettext-devel
-#BuildRequires: krb5-devel
+%{?with_gssapi:BuildRequires: krb5-devel}
BuildRequires: libtool
%{?with_mysql:BuildRequires: mysql-devel}
%{?with_ldap:BuildRequires: openldap-devel >= 2.3.3}
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' dovecot-example.conf
%{?with_pgsql:--with-pgsql} \
%{?with_sasl:--with-cyrus-sasl2} \
%{?with_sqlite:--with-sqlite} \
- --with-gssapi \
+ %{?with_gssapi:--with-gssapi} \
--with-ssl=openssl \
--with-ssl-dir=/var/lib/openssl \
--sysconfdir=/etc/%{name}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,sysconfig,security}
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_bindir}}
install -d $RPM_BUILD_ROOT{/var/lib/dovecot,/var/run/dovecot/login}
%{__make} install \
done
mv $RPM_BUILD_ROOT%{_libdir}/%{name}/dovecot-config $RPM_BUILD_ROOT%{_libdir}/%{name}-devel
-rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}/wiki
+rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%groupremove dovecot
fi
+%triggerpostun -- dovecot < 1:1.1
+echo "Configuration change default_mail_env -> mail_location"
+%{__sed} -i -e "s/^default_mail_env/mail_location/" /etc/dovecot/dovecot.conf
+
%files
%defattr(644,root,root,755)
# COPYING contains some notes, not actual LGPL text