-# merge cacert root certificate
-cd kio/kssl/kssl
-./mergelocal
-cd -
-
-cp /usr/share/automake/config.sub admin
-export kde_htmldir=%{_kdedocdir}
-export kde_libs_htmldir=%{_kdedocdir}
-if [ ! -f configure ]; then
- %{__make} -f admin/Makefile.common cvs
-fi
-
-export path_sudo=/usr/bin/sudo
-%configure \
- --%{?debug:en}%{!?debug:dis}able-debug%{?debug:=full} \
- %{!?debug:--disable-rpath} \
- --disable-final \
- %{?with_hidden_visibility:--enable-gcc-hidden-visibility} \
-%if "%{_lib}" == "lib64"
- --enable-libsuffix=64 \
-%endif
- --enable-mitshm \
- --with%{!?with_alsa:out}-alsa \
- --with%{!?with_arts:out}-arts \
- --with-distribution="PLD Linux Distribution" \
- --with-ldap=no \
- --with-lua-includes=%{_includedir}/lua50 \
- --with-qt-libraries=%{_libdir} \
- --with-sudo-kdesu-backend
+export QTDIR=%{_prefix}
+
+install -d build
+cd build
+
+%cmake \
+ -DWITH_ALL_OPTIONS=ON \
+ -DWITH_ARTS=O%{!?with_arts:FF}%{?with_arts:N} \
+ %{?with_alsa:-DWITH_ALSA=ON} \
+ -DWITH_LIBART=ON \
+ -DWITH_LIBIDN=ON \
+ -DWITH_SSL=ON \
+ -DWITH_CUPS=ON \
+ -DWITH_LUA=OFF \
+ -DWITH_TIFF=ON \
+ -DWITH_SUDO_KDESU_BACKEND=ON \
+ %{?with_jasper:-DWITH_JASPER=ON} \
+ %{?with_openexr:-DWITH_OPENEXR=ON} \
+ -DWITH_UTEMPTER=O%{!?with_utempter:FF}%{?with_utempter:N} \
+ %{?with_avahi:-DWITH_AVAHI=ON} \
+ %{!?with_pcre:-DWITH_PCRE=OFF} \
+ %{!?with_inotify:-DWITH_INOTIFY=OFF} \
+ %{!?with_gamin:-DWITH_GAMIN=OFF} \
+ -DWITH_SUDO_KDESU_BACKEND=OFF \
+ %{!?with_lzma:-DWITH_LZMA=OFF} \
+ -DWITH_ASPELL=O%{!?with_aspell:FF}%{?with_aspell:N} \
+ %{!?with_hspell:-DWITH_HSPELL=OFF} \
+ ..