From 552f8ded6c84da142285fec68d7004bfdf741411 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Aug 03 2020 15:43:43 +0000 Subject: Improve compatibility with new CMake macro Signed-off-by: Igor Raits --- diff --git a/trojita.spec b/trojita.spec index a224577..bafdaea 100644 --- a/trojita.spec +++ b/trojita.spec @@ -1,3 +1,5 @@ +%undefine __cmake_in_source_build + %bcond_with doxy %global gitdate 20191104 @@ -152,10 +154,8 @@ This application is heavily based on Qt and uses WebKit. %if %{without testsqtwebkit} export CXXFLAGS="%{optflags} -DSKIP_WEBKIT_TESTS" %endif -mkdir -p %{_target_platform} -pushd %{_target_platform} # change path for the library, https://bugs.kde.org/show_bug.cgi?id=332579 -%cmake_kf5 .. \ +%cmake_kf5 \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}/%{name} \ -DCMAKE_INSTALL_RPATH=%{_libdir}/%{name} \ -DBUILD_SHARED_LIBS:BOOL=OFF \ @@ -164,16 +164,14 @@ pushd %{_target_platform} -DWITH_GPGMEPP:BOOL=ON \ -DWITH_SONNET_PLUGIN:BOOL=ON \ -DWITH_RAGEL:BOOL=OFF -popd - -%make_build -C %{_target_platform} +%cmake_build %if %{with doxy} doxygen src/Doxyfile %endif %install -%make_install -C %{_target_platform} +%cmake_install %find_lang %{name}_common --with-qt # work around find_lang not supporting nds echo '%lang(nds) %{_datadir}/%{name}/locale/%{name}_common_nds.qm' \ @@ -189,7 +187,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*%{name}. %endif # do tests in some fake X #xvfb-run -a find %%{_target_platform} -name test_\* -print -exec '{}' \; -pushd %{_target_platform} xvfb-run -a %ctest