diff --git a/dovecot.spec b/dovecot.spec index 39e32ee..77e2836 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -36,7 +36,6 @@ BuildRequires: postgresql-devel BuildRequires: mysql-devel BuildRequires: openldap-devel BuildRequires: krb5-devel -BuildRequires: clucene-core-devel # gettext-devel is needed for running autoconf because of the # presence of AM_ICONV @@ -57,6 +56,11 @@ Requires(preun): chkconfig initscripts Requires(postun): initscripts %endif +%if %{?fedora}0 > 150 || %{?rhel}0 >60 +#clucene in fedora <=15 and rhel<=6 is too old +BuildRequires: clucene-core-devel +%endif + %define ssldir %{_sysconfdir}/pki/%{name} %if %{?fedora}00%{?rhel} < 6 @@ -132,7 +136,9 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" --with-sqlite \ --with-zlib \ --with-libcap \ +%if %{?fedora}0 > 150 || %{?rhel}0 >60 --with-lucene \ +%endif --with-ssl=openssl \ --with-ssldir=%{ssldir} \ --with-solr \