Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-05 20:59:05 +02:00
parent d3d2dacc23
commit d2d961533c
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

View File

@ -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