Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-08 16:44:28 +02:00
parent 757c5efdf2
commit f5c569a098
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

View File

@ -40,28 +40,17 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -p1
%build
if test ! -e "obj"; then
mkdir obj
fi
pushd obj
%cmake \
-DUNIT_TESTING=ON \
%{_builddir}/%{name}-%{version}
make %{?_smp_mflags} VERBOSE=1
popd
-DUNIT_TESTING=ON
%cmake_build
%install
pushd obj
make DESTDIR=%{buildroot} install
popd
%cmake_install
%ldconfig_scriptlets
%check
pushd obj
make test || cat $(find Testing -name "*.log")
popd
%ctest
%files
%doc AUTHORS README.md ChangeLog