diff options
| -rw-r--r-- | spdlog.spec | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/spdlog.spec b/spdlog.spec index f247974..655d050 100644 --- a/spdlog.spec +++ b/spdlog.spec @@ -31,11 +31,15 @@ Header files, CMake configuration files and development libraries for %{name}. %autosetup -p1 -n %{name}-%{version} %build -# openEuler's cmake package ships an old-style in-source %cmake macro (no -B), -# while cmake-rpm-macros provides new-style %cmake_build/%cmake_install that -# operate on %_vpath_builddir. Align them: configure into %_vpath_builddir so -# %cmake_build finds the build directory it expects. -%cmake -B %{_vpath_builddir} \ +# openEuler 24.03 ships an old-style parametrized %cmake macro (cmake pkg) +# whose expansion breaks when given -B (unbalanced '(' -> shell syntax error). +# Abandon %cmake/%cmake_build/%cmake_install macros entirely and do an +# explicit out-of-tree build with plain cmake + make. +mkdir build +cd build +cmake .. \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=Release \ -DSPDLOG_BUILD_SHARED=ON \ -DSPDLOG_BUILD_TESTS=OFF \ -DSPDLOG_BUILD_TESTS_HO=OFF \ @@ -46,10 +50,11 @@ Header files, CMake configuration files and development libraries for %{name}. -DSPDLOG_FMT_EXTERNAL=OFF \ -DSPDLOG_FMT_EXTERNAL_HO=OFF \ -DSPDLOG_INSTALL=ON -%cmake_build +make %{?_smp_mflags} %install -%cmake_install +cd build +make install DESTDIR=%{buildroot} %files %license LICENSE |
