Use cmake macros to fix build

This commit is contained in:
Ankur Sinha (Ankur Sinha Gmail) 2020-09-13 16:46:40 +01:00
parent a28d02e57a
commit b5fb2b24a0
No known key found for this signature in database
GPG Key ID: F8D8C0BEBAC898BD
1 changed files with 9 additions and 10 deletions

View File

@ -1,9 +1,9 @@
# Enabled by default
%bcond_with tests
%bcond_without tests
Name: gdcm
Version: 3.0.7
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files
License: BSD
URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page
@ -134,9 +134,6 @@ rm -rf Utilities/wxWidgets
#rm -rf Utilities/gdcmmd5
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake .. \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DGDCM_INSTALL_PACKAGE_DIR=%{_libdir}/cmake/%{name} \
@ -173,12 +170,10 @@ pushd %{_target_platform}
# -DGDCM_VTK_JAVA_JAR:PATH=/usr/share/java/vtk.jar no found!
# yum provides */vtk.jar -> No results found
popd
%make_build -C %{_target_platform}
%cmake_build
%install
%make_install -C %{_target_platform}
%cmake_install
install -d $RPM_BUILD_ROOT%{python3_sitearch}
# Install examples
@ -189,7 +184,7 @@ cp -rv ./Examples/* $RPM_BUILD_ROOT/%{_datadir}/%{name}/Examples/
%check
# Making the tests informative only for now. Several failing tests (27/228):
# 11,40,48,49,107-109,111-114,130-135,146,149,,151-154,157,194,216,219
make test -C %{_target_platform} || exit 0
make test -C %{__cmake_builddir} || exit 0
%endif
%files
@ -266,6 +261,10 @@ make test -C %{_target_platform} || exit 0
%{python3_sitearch}/__pycache__/%{name}*
%changelog
* Sun Sep 13 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.0.7-4
- use cmake macros and fix build
- Enable tests
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild