-%{__gtkdocize}
-%{__intltoolize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-
-# Set LIBS so that configure will be able to link with static LDAP libraries,
-# which depend on Cyrus SASL and OpenSSL.
-if pkg-config openssl ; then
- LIBS="-lsasl2 `pkg-config --libs openssl`"
-else
- LIBS="-lsasl2 -lssl -lcrypto"
-fi
-export LIBS
-
-%configure \
- %{?with_kerberos5:--with-krb5=%{_prefix} --with-krb5-libs=%{_libdir}} \
- %{!?with_kerberos5:--with-krb5=no} \
- %{?with_ldap:--with-openldap=%{_libdir}/evolution-openldap} \
- %{?with_ldap:--with-static-ldap=yes} \
- %{!?with_ldap:--with-openldap=no} \
- --enable-smime \
- --enable-ipv6 \
- %{__enable_disable apidocs gtk-doc} \
- %{__enable_disable static_libs static} \
- %{__enable_disable vala vala-bindings} \
- %{!?with_uoa:--disable-uoa} \
- --with-libdb=%{_libdir} \
- --with-html-dir=%{_gtkdocdir} \
- --disable-silent-rules
+%cmake \
+ -DLIBEXEC_INSTALL_DIR=%{_libexecdir} \
+ %{?with_kerberos5:-DWITH_KRB5=%{_prefix} -DWITH_KRB5_LIBS=%{_libdir}} \
+ %{!?with_kerberos5:-DWITH_KRB5=OFF} \
+ %{!?with_ldap:-DWITH_OPENLDAP=OFF} \
+ %{?with_apidocs:-DENABLE_GTK_DOC=ON} \
+ %{?with_vala:-DENABLE_VALA_BINDINGS=ON} \
+ %{!?with_uoa:-DENABLE_UOA=OFF} \
+ -DENABLE_SCHEMAS_COMPILE=OFF \
+ -DENABLE_INTROSPECTION=ON