-%{__intltoolize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-# ac_cv_libiconv=no to look iconv in libc (configure has inverted logic)
-%configure \
- BOGOFILTER="/usr/bin/bogofilter" \
- HIGHLIGHT="/usr/bin/highlight" \
- SPAMASSASSIN="/usr/bin/spamassassin" \
- SA_LEARN="/usr/bin/sa-learn" \
- SPAMC="/usr/bin/spamc" \
- SPAMD="/usr/bin/spamd" \
- ac_cv_libiconv=no \
- %{!?with_autoar:--disable-autoar} \
- --enable-canberra \
- %{?with_contact_maps:--enable-contact-maps} \
- --enable-gtk-doc \
- --enable-nss \
- %{__with_without ldap openldap} \
- --enable-plugins=all \
- --enable-pst-import \
- --disable-silent-rules \
- --enable-smime \
- --enable-static \
- --enable-weather \
- %{?with_glade:--with-glade-catalog} \
- --with-html-dir=%{_gtkdocdir} \
- --with-nspr-includes="%{_includedir}/nspr" \
- --with-nspr-libs="%{_libdir}" \
- --with-nss-includes="%{_includedir}/nss" \
- --with-nss-libs="%{_libdir}" \
- --without-static-ldap \
- --with-sub-version=" PLD Linux"
+export BOGOFILTER="/usr/bin/bogofilter"
+export HIGHLIGHT="/usr/bin/highlight"
+export SPAMASSASSIN="/usr/bin/spamassassin"
+export SA_LEARN="/usr/bin/sa-learn"
+export SPAMC="/usr/bin/spamc"
+export SPAMD="/usr/bin/spamd"
+%cmake \
+ -DLIBEXEC_INSTALL_DIR=%{_libdir} \
+ %{!?with_autoar:-DENABLE_AUTOAR=OFF} \
+ %{?with_contact_maps:-DENABLE_CONTACT_MAPS=ON} \
+ -DENABLE_GTK_DOC=ON \
+ -DENABLE_SCHEMAS_COMPILE=OFF \
+ -DGTK_UPDATE_ICON_CACHE=/bin/true \
+ -DWITH_OPENLDAP=%{?with_ldap:ON}%{!?with_ldap:OFF} \
+ -DWITH_STATIC_LDAP=OFF \
+ -DWITH_GLADE_CATALOG=%{?with_glade:ON} \
+ -DVERSION_SUBSTRING=" PLD Linux"