diff --git a/double-conversion.spec b/double-conversion.spec index d57ce23..8d9bcf3 100644 --- a/double-conversion.spec +++ b/double-conversion.spec @@ -1,3 +1,4 @@ +%undefine __cmake_in_source_build %bcond_without static_libs # don't build static libraries Summary: Library providing binary-decimal and decimal-binary routines for IEEE doubles @@ -39,35 +40,27 @@ Static %{name} library. %setup -q %build -mkdir -p build-shared -pushd build-shared - %cmake -DBUILD_TESTING=ON .. - make %{_smp_mflags} -popd +%global _vpath_builddir build-shared +%cmake -DBUILD_TESTING=ON +%cmake_build %if %{with static_libs} -mkdir -p build-static -pushd build-static - CXXFLAGS="%{optflags} -fPIC" %cmake -DBUILD_SHARED_LIBS=NO .. - make %{_smp_mflags} -popd +%global _vpath_builddir build-static +CXXFLAGS="%{optflags} -fPIC" %cmake -DBUILD_SHARED_LIBS=NO +%cmake_build %endif %install %if %{with static_libs} -pushd build-static - make install DESTDIR=%{buildroot} -popd +%global _vpath_builddir build-static +%cmake_install %endif -pushd build-shared - make install DESTDIR=%{buildroot} -popd +%global _vpath_builddir build-shared +%cmake_install %check -pushd build-shared - ctest -V -popd +%ctest %ldconfig_scriptlets