# we don't want to provide private python extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } Name: gdcm Version: 2.4.2 Release: 1%{?dist} Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files Group: System Environment/Libraries License: BSD URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page Source0: http://sourceforge.net/projects/gdcm/files/gdcm%202.x/GDCM%20%{version}/%{name}-%{version}.tar.bz2 Source1: http://downloads.sourceforge.net/project/gdcm/gdcmData/gdcmData/gdcmData.tar.gz Patch1: gdcm-2.4.0-inplace-build.patch Patch2: gdcm-2.4.0-usecopyright.patch Patch3: gdcm-2.4.0-install2libarch.patch Patch4: gdcm-2.4.0-no-versioned-dir.patch # From http://public.kitware.com/pipermail/vtkusers/2013-February/127377.html Patch5: gdcm-0005-support-vtk6.patch Patch6: gdcm-2.4.0-find-python27.patch BuildRequires: CharLS-devel >= 1.0 BuildRequires: cmake BuildRequires: doxygen BuildRequires: expat-devel BuildRequires: fontconfig-devel BuildRequires: graphviz BuildRequires: gl2ps-devel BuildRequires: libogg-devel BuildRequires: libtheora-devel BuildRequires: libuuid-devel BuildRequires: mesa-libOSMesa-devel BuildRequires: mysql-libs BuildRequires: mysql-devel BuildRequires: openssl-devel BuildRequires: openjpeg-devel #BuildRequires: /usr/bin/pdflatex #BuildRequires: poppler-devel BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: postgresql-devel BuildRequires: swig #BuildRequires: texlive-ec #BuildRequires: vtk-devel %description GDCM implements the dicom base standard part 5 that concentrates on image file format. Hence GDCM supports the following formats: - ACR-NEMA version 1 and 2 (huffman compression is not supported), - DICOM version 3.0, including various encodings of JPEG - lossless & lossy-, RLE, J2K, deflated, JPEG-LS (very experimental) (MPEG2 compression is not supported) - Papyrus V2 and V3 file headers should be readable, %package doc Summary: Includes html documentation for gdcm Group: Documentation BuildArch: noarch %description doc You should install the gdcm-doc package if you would like to access upstream documentation for gdcm. %package devel Summary: Libraries and headers for GDCM Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel You should install the gdcm-devel package if you would like to compile applications based on gdcm %package examples Summary: CSharp, C++, Java, PHP and Python example programs for GDCM Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} %description examples GDCM examples %package python Summary: Python binding for GDCM Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description python You should install the gdcm-python package if you would like to used this library with python %package -n python3-gdcm Summary: Python binding for GDCM Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-gdcm You should install the python3-gdcm package if you would like to used this library with python %prep %setup -q %setup -T -D -a 1 %patch1 -p 1 %patch2 -p 1 %patch3 -p 1 %patch4 -p 1 %patch5 -p 1 # Remove bundled utilities (we use Fedora's ones) rm -rf Utilities/gdcmexpat rm -rf Utilities/gdcmopenjpeg rm -rf Utilities/gdcmzlib rm -rf Utilities/gdcmuuid rm -rf Utilities/gdcmcharls # Remove bundled utilities (we don't use them) rm -rf Utilities/getopt rm -rf Utilities/pvrg rm -rf Utilities/rle rm -rf Utilities/wxWidgets # Needed for testing: #rm -rf Utilities/gdcmmd5 # prepare python3 build rm -rf %{py3dir} cp -a . %{py3dir} # apply patch after copying files for python3 build %patch6 -p 1 %build # build python3 build pushd %{py3dir} mkdir -p %{_target_platform} pushd %{_target_platform} %cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DGDCM_BUILD_TESTING=OFF \ -DGDCM_DATA_ROOT=../gdcmData/ \ -DGDCM_BUILD_EXAMPLES:BOOL=OFF \ -DGDCM_DOCUMENTATION:BOOL=OFF \ -DGDCM_PDF_DOCUMENTATION:BOOL=OFF \ -DGDCM_WRAP_PYTHON:BOOL=ON \ -DPYTHON_EXECUTABLE=%{__python3} \ -DGDCM_INSTALL_PYTHONMODULE_DIR=%{python3_sitearch} \ -DGDCM_WRAP_JAVA=OFF \ -DGDCM_BUILD_SHARED_LIBS:BOOL=ON \ -DGDCM_BUILD_APPLICATIONS:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ -DGDCM_USE_VTK:BOOL=OFF \ -DGDCM_USE_SYSTEM_CHARLS=ON \ -DGDCM_USE_SYSTEM_EXPAT=ON \ -DGDCM_USE_SYSTEM_OPENJPEG=ON \ -DGDCM_USE_SYSTEM_ZLIB=ON \ -DGDCM_USE_SYSTEM_UUID=ON \ -DGDCM_USE_SYSTEM_LJPEG=OFF \ -DGDCM_USE_SYSTEM_OPENSSL=ON \ -DGDCM_USE_JPEGLS=ON \ -DGDCM_USE_SYSTEM_POPPLER=OFF popd make %{?_smp_mflags} -C %{_target_platform} popd # end python3 mkdir -p %{_target_platform} pushd %{_target_platform} %cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DGDCM_BUILD_TESTING=ON \ -DGDCM_DATA_ROOT=../gdcmData/ \ -DGDCM_BUILD_EXAMPLES:BOOL=ON \ -DGDCM_DOCUMENTATION:BOOL=ON \ -DGDCM_PDF_DOCUMENTATION:BOOL=OFF \ -DGDCM_WRAP_PYTHON:BOOL=ON \ -DPYTHON_EXECUTABLE=%{__python2} \ -DGDCM_INSTALL_PYTHONMODULE_DIR=%{python2_sitearch} \ -DGDCM_WRAP_JAVA=OFF \ -DGDCM_BUILD_SHARED_LIBS:BOOL=ON \ -DGDCM_BUILD_APPLICATIONS:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ -DGDCM_USE_VTK:BOOL=OFF \ -DGDCM_USE_SYSTEM_CHARLS=ON \ -DGDCM_USE_SYSTEM_EXPAT=ON \ -DGDCM_USE_SYSTEM_OPENJPEG=ON \ -DGDCM_USE_SYSTEM_ZLIB=ON \ -DGDCM_USE_SYSTEM_UUID=ON \ -DGDCM_USE_SYSTEM_LJPEG=OFF \ -DGDCM_USE_SYSTEM_OPENSSL=ON \ -DGDCM_USE_JPEGLS=ON \ -DGDCM_USE_SYSTEM_POPPLER=OFF #Cannot build wrap_java: # -DGDCM_VTK_JAVA_JAR:PATH=/usr/share/java/vtk.jar no found! # yum provides */vtk.jar -> No results found popd make %{?_smp_mflags} -C %{_target_platform} %install # install python3 build pushd %{py3dir} make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} install -d $RPM_BUILD_ROOT%{python3_sitearch} popd make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} ## Rearranging directory layout and removing version from dir mv $RPM_BUILD_ROOT%{_libdir}/%{name}/*.cmake $RPM_BUILD_ROOT%{_datadir}/%{name}/ rmdir $RPM_BUILD_ROOT%{_libdir}/%{name} # adding to installed docs in order to avoid using %%doc magic for f in AUTHORS Copyright.txt README.Copyright.txt README.txt ; do cp -p $f ${RPM_BUILD_ROOT}%{_docdir}/%{name}/${f} done ## Cleaning Example dir from cmake cache files + remove 0-length files find %{_builddir}/%{?buildsubdir}/Examples -depth -name CMakeFiles | xargs rm -rf find %{_builddir}/%{?buildsubdir}/Examples -depth -size 0 | xargs rm -rf ## Moving Example dir into _datadir cp -r %{_builddir}/%{?buildsubdir}/Examples $RPM_BUILD_ROOT%{_datadir}/%{name}/ %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 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %dir %{_docdir}/%{name} %{_docdir}/%{name}/Copyright.txt %{_mandir}/man1/*.1* %{_bindir}/* %{_libdir}/*.so.* %dir %{_datadir}/%{name} %{_datadir}/%{name}/XML/ %files doc %{_docdir}/%{name}/ %files devel %{_includedir}/%{name}/ %{_libdir}/*.so %{_datadir}/%{name}/*.cmake %files examples %{_datadir}/%{name}/Examples/ %files python %{python2_sitearch}/* %files -n python3-gdcm %{python3_sitearch}/* %changelog * Sat Apr 05 2014 Sebastian Pölsterl - 2.4.2-1 - Update to 2.4.2 * Sun Dec 15 2013 Michael Schwendt - 2.4.1-2 - Include license file and a few doc files in base package - Include directory /usr/share/gdcm in base package - Remove obsolete cleaning of buildroot - Add %%?_isa to base package deps - Remove empty lines at beginning of %%descriptions - Fix base package Group tag to "System Environment/Libraries" * Wed Dec 11 2013 Sebastian Pölsterl - 2.4.1-1 - Update to 2.4.1 * Wed Dec 11 2013 Mario Ceresa - 2.4.0-4 - Fixes #1001298 - Minor fixes on the spec * Tue Nov 19 2013 Sebastian Pölsterl - 2.4.0-3 - More duplicate documentation files fixes - Move examples to new subpackage * Tue Nov 19 2013 Sebastian Pölsterl - 2.4.0-2 - Fixed duplicate documentation files: https://bugzilla.redhat.com/show_bug.cgi?id=1001298 * Sun Oct 20 2013 Sebastian Pölsterl - 2.4.0-1 - Update to 2.4.0 - Added python3-gdcm package * Tue Aug 13 2013 Mario Ceresa - 2.2.4-5 - Still getting "vtkImageData has no member named 'GetWholeExtent" with vtk-devel - Added additional debug symbols - Enabled testing (for now informational only) - Enabled build of gdcmd5 because its needed by tests - Re-added graphviz BR * Mon Aug 05 2013 Mario Ceresa - 2.2.4-4 - Fixed doc generation - Disabled pdf generation util texlive problems are solved in Rawhide - Fixed bogus dates * Sat Aug 03 2013 Fedora Release Engineering - 2.2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Jul 16 2013 Mario Ceresa - 2.2.4-2 - Add support for vtk 6.0.0 * Fri Jul 12 2013 Orion Poplawski - 2.2.4-1 - Update to 2.2.4 - Rebuild for vtk 6.0.0 * Sun Jun 30 2013 Bruno Wolff III - 2.2.3-3 - Rebuild for poppler soname bump * Wed May 1 2013 Mario Ceresa - 2.2.3-1 - Upgrade to 2.2.3 - Drop upstreamed patches - Added doc package - Various fixes to spec file - Dropped pdf documentation because cmake scripts still search for pdfopt * Mon Feb 4 2013 Mario Ceresa - 2.0.18-8 - Added missing BR for pdflatex * Fri Jan 25 2013 Mario Ceresa - 2.0.18-7 - Rebuild (poppler-0.22.0) * Thu Jul 19 2012 Fedora Release Engineering - 2.0.18-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jul 2 2012 Marek Kasik - 2.0.18-5 - Rebuild (poppler-0.20.1) * Wed May 16 2012 Marek Kasik - 2.0.18-4 - Rebuild (poppler-0.20.0) * Thu Feb 09 2012 Rex Dieter 2.0.18-3 - rebuild (openjpeg) * Fri Jan 13 2012 Fedora Release Engineering - 2.0.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Nov 01 2011 Orion Poplawski - 2.0.18-1 - Update to 2.0.18 - Drop upstreamed patches - Add -DGDCM_USE_SYSTEM_CHARLS=ON - Add patch to fix charls include * Fri Oct 28 2011 Rex Dieter - 2.0.17-9 - rebuild(poppler) * Wed Oct 19 2011 Mario Ceresa - 2.0.17-8 - Rebuild for vtk * Fri Sep 30 2011 Marek Kasik - 2.0.17-7 - Rebuild (poppler-0.18.0) * Mon Sep 19 2011 Marek Kasik - 2.0.17-6 - Rebuild (poppler-0.17.3) * Mon Jul 25 2011 Rahul Sundaram - 2.0.17-5 - Rebuild for cmake - Clean up spec to match current guidelines * Fri Jul 15 2011 Marek Kasik - 2.0.17-4 - Rebuild (poppler-0.17.0) * Wed Apr 20 2011 Mario Ceresa - 2.0.17-3 - Bump release * Sun Mar 27 2011 Mario Ceresa mrceresa gmailcom - 2.0.17-2 - Fixed BR mysql-libs * Sat Mar 19 2011 Mario Ceresa mrceresa gmailcom - 2.0.17-1 - Updated to version 2.0.17 * Thu Mar 17 2011 Marek Kasik - 2.0.16-17 - Fix BuildRequires * Sun Mar 13 2011 Marek Kasik - 2.0.16-16 - Rebuild (poppler-0.16.3) * Sun Feb 20 2011 Orion Poplawski - 2.0.16-15 - Rebuild for new vtk with fixed sonames * Mon Feb 14 2011 Mario Ceresa - 2.0.16-13 - Adapted to new version of CharLS lib (v 1.0) * Tue Feb 08 2011 Fedora Release Engineering - 2.0.16-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Feb 02 2011 Mario Ceresa - 2.0.16-11 - Removed python bindings because they fail to build with gcc 4.6 * Wed Feb 02 2011 Mario Ceresa - 2.0.16-10 - Added patch to fix upstream bug #3169784 * Sun Jan 02 2011 Rex Dieter - 2.0.16-11 - rebuild (poppler) * Wed Dec 15 2010 Rex Dieter - 2.0.16-8 - rebuild (poppler) * Mon Nov 22 2010 Mario Ceresa 2.0.16-7 - Fixed bug 655738 * Fri Nov 19 2010 Mario Ceresa 2.0.16-6 - Enabled VTK support * Tue Oct 19 2010 Mario Ceresa 2.0.16-5 - Filtered out private python extension lib - Added documentation * Tue Oct 19 2010 Mario Ceresa 2.0.16-4 - Changed directory ownership * Fri Oct 15 2010 Mario Ceresa 2.0.16-3 - Rearranged directory layout to remove version in dir names * Sat Sep 18 2010 Mario Ceresa 2.0.16-2 - Added ExcludeArch for ppc and ppc64 because of a bug in doxygen see https://bugzilla.redhat.com/show_bug.cgi?id=566725#c9 * Sat Sep 18 2010 Mario Ceresa 2.0.16-1 - Updated to release 2.0.16 - Removed patch "stack_namespace" and "poppler_breaks_api" because already included upstream - Added swig and texlive-pdflatex to BuildRequires - Moved python files to a separate package * Sun Apr 11 2010 Mario Ceresa 2.0.14-5 - Fixed some issues pointed out by Martin Gieseking. In details: - BR to build documentation (tex + graphviz) - Changed man page inclusion - Fixed changelog format - Removed VTK support because cmake 2.8 is needed to recognize vtk 5.4! - Fixed python support * Thu Mar 25 2010 Mario Ceresa 2.0.14-4 - Added VTK support - Added python support * Sun Mar 21 2010 Mario Ceresa 2.0.14-3 - Added BuildRequires fontconfig-devel - Fixed lib /lib64 issue with base CMakeLists.txt * Mon Mar 15 2010 Mario Ceresa 2.0.14-2 - Added BuildRequires CharLS-devel * Wed Feb 17 2010 Mario Ceresa 2.0.14 - Initial RPM Release