From d2d961533c7c258d4f32568eec6bfe345461374b Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 5 Jul 2020 20:59:05 +0200 Subject: [PATCH] Improve compatibility with new CMake macro Signed-off-by: Igor Raits --- woff2.spec | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/woff2.spec b/woff2.spec index e5a8147..99a0905 100644 --- a/woff2.spec +++ b/woff2.spec @@ -1,3 +1,5 @@ +%undefine __cmake_in_source_build + Name: woff2 Version: 1.0.2 Release: 8%{?dist} @@ -36,23 +38,20 @@ Development files and utils for %{name} %autosetup -n %{name}-%{version} %build -mkdir -p %{_target_platform} -pushd %{_target_platform} -%cmake .. \ +%cmake \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DCMAKE_INSTALL_LIBDIR="%{_libdir}" -popd - -make %{?_smp_mflags} -C %{_target_platform} +%cmake_build %install -%make_install -C %{_target_platform} -pushd %{_target_platform} -mkdir -p %{buildroot}%{_bindir}/ +%cmake_install +mkdir -p %{buildroot}%{_bindir}/ + +cd %{_target_platform} install -m 755 woff2_decompress %{buildroot}%{_bindir}/ install -m 755 woff2_compress %{buildroot}%{_bindir}/ install -m 755 woff2_info %{buildroot}%{_bindir}/ -popd +cd - %files %license LICENSE