diff --git a/dovecot.spec b/dovecot.spec index ce7524f..e8d06a5 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -37,7 +37,6 @@ BuildRequires: postgresql-devel BuildRequires: mysql-devel BuildRequires: openldap-devel BuildRequires: krb5-devel -BuildRequires: libcurl-devel expat-devel # gettext-devel is needed for running autoconf because of the # presence of AM_ICONV @@ -55,6 +54,13 @@ Requires(postun): initscripts %define ssldir %{_sysconfdir}/pki/%{name} +%if %{?fedora}00%{?rhel} < 6 +%define _initddir %{_initrddir} +BuildRequires: curl-devel expat-devel +%else +BuildRequires: libcurl-devel expat-devel +%endif + %description Dovecot is an IMAP server for Linux/UNIX-like systems, written with security primarily in mind. It also contains a small POP3 server. It supports mail @@ -154,6 +160,10 @@ mv $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} %{_builddir}/%{name}-%{version} install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/dovecot +%if %{?fedora}00%{?rhel} < 6 +sed -i 's|password-auth|system-auth|' %{SOURCE2} +%endif + install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/dovecot install -p -D -m 600 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/dovecot