Blame InsightToolkit.spec

3d0ec2
%define _ver_major      4
Sebastian Pölsterl 182273
%define _ver_minor      6
Sebastian Pölsterl 182273
%define _ver_release    0
3d0ec2
3d0ec2
%if 0%{?rhel} && 0%{?rhel} <= 5
3d0ec2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
3d0ec2
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
3d0ec2
%endif
3d0ec2
3d0ec2
Name:           InsightToolkit
3d0ec2
Summary:        Insight Toolkit library for medical image processing
3d0ec2
Version:        %{_ver_major}.%{_ver_minor}.%{_ver_release}
333fb3
Release:        3%{?dist}
c24334
License:        ASL 2.0
3d0ec2
Group:          Applications/Engineering
Mario Ceresa 5f0b3d
Source0:        http://sourceforge.net/projects/itk/files/itk/%{_ver_major}.%{_ver_minor}/%{name}-%{version}.tar.xz
Sebastian Pölsterl 182273
Source1:        http://downloads.sourceforge.net/project/itk/itk/4.6/InsightSoftwareGuide-Book1-4.6.0.pdf
Sebastian Pölsterl 182273
Source2:        http://downloads.sourceforge.net/project/itk/itk/4.6/InsightSoftwareGuide-Book2-4.6.0.pdf
3d0ec2
URL:            http://www.itk.org/
3d0ec2
Patch0:         %{name}-0001-Set-lib-lib64-according-to-the-architecture.patch
bd6c4a
#Patch1:         %{name}-Fix_HDF5_Libraries.patch
3d0ec2
3d0ec2
BuildRequires:  cmake
3d0ec2
BuildRequires:  doxygen
3d0ec2
BuildRequires:  fftw-devel
3d0ec2
BuildRequires:  gccxml
Mario Ceresa 244abb
BuildRequires:  gdcm-devel
Mario Ceresa 244abb
BuildRequires:  graphviz
3d0ec2
BuildRequires:  hdf5-devel
3d0ec2
BuildRequires:  libjpeg-devel
3d0ec2
BuildRequires:  libxml2-devel
3d0ec2
BuildRequires:  libpng-devel
3d0ec2
BuildRequires:  libtiff-devel
3d0ec2
BuildRequires:  libjpeg-devel
3d0ec2
BuildRequires:  python2-devel
Mario Ceresa 244abb
BuildRequires:  qtwebkit-devel
3d0ec2
BuildRequires:  vxl-devel
Mario Ceresa 244abb
BuildRequires:  vtk-devel
3d0ec2
BuildRequires:  zlib-devel
df2992
BuildRequires:  blas-devel
df2992
BuildRequires:  lapack-devel
79b3a1
BuildRequires:  netcdf-cxx-devel
e9e8dc
BuildRequires:  jsoncpp-devel
Sebastian Pölsterl 182273
BuildRequires:  expat-devel
3d0ec2
3d0ec2
%description
3d0ec2
ITK is an open-source software toolkit for performing registration and 
3d0ec2
segmentation. Segmentation is the process of identifying and classifying data
3d0ec2
found in a digitally sampled representation. Typically the sampled
3d0ec2
representation is an image acquired from such medical instrumentation as CT or
3d0ec2
MRI scanners. Registration is the task of aligning or developing 
3d0ec2
correspondences between data. For example, in the medical environment, a CT
3d0ec2
scan may be aligned with a MRI scan in order to combine the information
3d0ec2
contained in both.
3d0ec2
3d0ec2
ITK is implemented in C++ and its implementation style is referred to as 
3d0ec2
generic programming (i.e.,using templated code). Such C++ templating means
3d0ec2
that the code is highly efficient, and that many software problems are 
3d0ec2
discovered at compile-time, rather than at run-time during program execution.
3d0ec2
3d0ec2
%package        devel
3d0ec2
Summary:        Insight Toolkit
3d0ec2
Group:          Development/Libraries
3d0ec2
Requires:       %{name}%{?_isa} = %{version}-%{release}
Mario Ceresa 534a77
Requires:       vtk-devel%{?_isa}
3d0ec2
3d0ec2
%description devel
3d0ec2
%{summary}.
3d0ec2
Install this if you want to develop applications that use ITK.
3d0ec2
3d0ec2
%package        examples
3d0ec2
Summary:        C++, Tcl and Python example programs/scripts for ITK
3d0ec2
Group:          Development/Languages
3d0ec2
Requires:       %{name}%{?_isa} = %{version}-%{release}
3d0ec2
3d0ec2
%description examples
3d0ec2
ITK examples
3d0ec2
3d0ec2
%package        doc
3d0ec2
Summary:        Documentation for ITK
3d0ec2
Group:          Documentation
3d0ec2
BuildArch:      noarch
3d0ec2
3d0ec2
%description    doc
3d0ec2
%{summary}.
3d0ec2
This package contains additional documentation.
3d0ec2
3d0ec2
# Hit bug http://www.gccxml.org/Bug/view.php?id=13372
3d0ec2
# We agreed with Mattias Ellert to postpone the bindings till
3d0ec2
# next gccxml update.
3d0ec2
#%package        python
3d0ec2
#Summary:        Documentation for ITK
3d0ec2
#Group:          Documentation
3d0ec2
#BuildArch:      noarch
3d0ec2
3d0ec2
#%description    python
3d0ec2
#%{summary}.
3d0ec2
#This package contains python bindings for ITK.
3d0ec2
c24334
%package        vtk
c24334
Summary:        Provides an interface between ITK and VTK
c24334
Group:          System Environment/Libraries
c24334
Requires:       %{name}%{?_isa} = %{version}-%{release}
c24334
c24334
%description vtk
c24334
Provides an interface between ITK and VTK
3d0ec2
3d0ec2
%prep
3d0ec2
%setup -q
3d0ec2
%patch0 -p1
bd6c4a
#%patch1 -p1
3d0ec2
3d0ec2
# copy guide into the appropriate directory
Sebastian Pölsterl 182273
cp -a %{SOURCE1} %{SOURCE2} .
3d0ec2
3d0ec2
# remove applications: they are shipped separately now
3d0ec2
rm -rf Applications/
3d0ec2
Sebastian Pölsterl ed95fd
# remove source files of external dependencies that itk gets linked against
Sebastian Pölsterl ed95fd
for adir in DCMTK Expat GDCM HDF5 JPEG PNG TIFF VNL ZLIB; do
Sebastian Pölsterl ed95fd
    find Modules/ThirdParty/${adir} -regextype posix-extended -type f \
Sebastian Pölsterl ed95fd
    -regex ".*\.(h|hxx|hpp|c|cc|cpp|cxx|txx)$" -not -iname "itk*" -print0 | xargs -0 rm -fr
Sebastian Pölsterl ed95fd
done
Sebastian Pölsterl ed95fd
3d0ec2
%build
3d0ec2
3d0ec2
mkdir -p %{_target_platform}
3d0ec2
pushd %{_target_platform}
3d0ec2
3d0ec2
%cmake .. \
3d0ec2
       -DBUILD_SHARED_LIBS:BOOL=ON \
8a877e
       -DBUILD_EXAMPLES:BOOL=ON \
3d0ec2
       -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo"\
3d0ec2
       -DCMAKE_VERBOSE_MAKEFILE=ON\
8a877e
       -DBUILD_TESTING=ON\
3d0ec2
       -DITKV3_COMPATIBILITY:BOOL=ON \
c24334
       -DITK_BUILD_DEFAULT_MODULES:BOOL=ON \
Mario Ceresa 244abb
       -DModule_ITKVtkGlue:BOOL=ON \
3d0ec2
       -DITK_WRAP_PYTHON:BOOL=OFF \
3d0ec2
       -DITK_WRAP_JAVA:BOOL=OFF \
3d0ec2
       -DBUILD_DOCUMENTATION:BOOL=OFF \
c24334
       -DModule_ITKReview:BOOL=ON \
3d0ec2
       -DITK_USE_SYSTEM_HDF5=ON \
3d0ec2
       -DITK_USE_SYSTEM_JPEG=ON \
3d0ec2
       -DITK_USE_SYSTEM_TIFF=ON \
3d0ec2
       -DITK_USE_SYSTEM_PNG=ON \
3d0ec2
       -DITK_USE_SYSTEM_ZLIB=ON \
3d0ec2
       -DITK_USE_SYSTEM_GDCM=ON \
3d0ec2
       -DITK_USE_SYSTEM_VXL=ON \
3d0ec2
       -DITK_USE_SYSTEM_SWIG=ON \
3d0ec2
       -DITK_USE_SYSTEM_GCCXML=ON \
Sebastian Pölsterl 182273
       -DITK_USE_SYSTEM_EXPAT=ON \
d9204f
       -DITK_INSTALL_LIBRARY_DIR=%{_lib}/ \
3d0ec2
       -DITK_INSTALL_INCLUDE_DIR=include/%{name} \
3d0ec2
       -DITK_INSTALL_PACKAGE_DIR=%{_lib}/cmake/%{name}/ \
3d0ec2
       -DITK_INSTALL_RUNTIME_DIR:PATH=%{_bindir} \
Mario Ceresa 9d8f69
       -DITK_INSTALL_DOC_DIR=share/doc/%{name}/ \
3d0ec2
       -DCMAKE_CXX_FLAGS:STRING="-fpermissive"
3d0ec2
3d0ec2
popd
3d0ec2
3d0ec2
make %{?_smp_mflags} -C %{_target_platform}
3d0ec2
3d0ec2
%install
3d0ec2
%make_install -C %{_target_platform}
3d0ec2
3d0ec2
# Install examples
3d0ec2
mkdir -p %{buildroot}%{_datadir}/%{name}/examples
3d0ec2
cp -ar Examples/* %{buildroot}%{_datadir}/%{name}/examples/
3d0ec2
c24334
for f in LICENSE NOTICE README.txt ; do
c24334
    cp -p $f ${RPM_BUILD_ROOT}%{_docdir}/%{name}/${f}
c24334
done
c24334
8a877e
%check
3d0ec2
# There are a couple of tests randomly failing on f19 and rawhide and I'm debugging
3d0ec2
# it with upstream. Making the tests informative for now
8a877e
make test -C %{_target_platform} || exit 0
3d0ec2
3d0ec2
%post -p /sbin/ldconfig
3d0ec2
3d0ec2
%postun -p /sbin/ldconfig
3d0ec2
c24334
%post vtk -p /sbin/ldconfig
c24334
c24334
%postun vtk -p /sbin/ldconfig
c24334
c24334
3d0ec2
%files
c24334
%{_docdir}/%{name}/
d9204f
%{_libdir}/*.so.*
c24334
%exclude %{_libdir}/libITKVtkGlue*.so.*
d9204f
%{_bindir}/itkTestDriver
3d0ec2
3d0ec2
%files devel
d9204f
%{_libdir}/*.so
3d0ec2
%{_libdir}/cmake/%{name}/
3d0ec2
%{_includedir}/%{name}/
3d0ec2
3d0ec2
%files examples
3d0ec2
%{_datadir}/%{name}/examples
d9204f
3d0ec2
%files doc
Mario Ceresa 9d8f69
%dir %{_docdir}/%{name}/
Mario Ceresa 9d8f69
%{_docdir}/%{name}/*
Sebastian Pölsterl 182273
%doc InsightSoftwareGuide-Book1-4.6.0.pdf
Sebastian Pölsterl 182273
%doc InsightSoftwareGuide-Book2-4.6.0.pdf
3d0ec2
c24334
%files vtk
c24334
%{_libdir}/libITKVtkGlue*.so.*
3d0ec2
3d0ec2
%changelog
333fb3
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.6.0-3
333fb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
333fb3
Sebastian Pölsterl ed95fd
* Tue Aug 12 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.6.0-2
Sebastian Pölsterl ed95fd
- Remove source files of external dependencies
Sebastian Pölsterl ed95fd
- Partially fixes bug #1076793
Sebastian Pölsterl ed95fd
Sebastian Pölsterl 182273
* Mon Aug 04 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.6.0-1
Sebastian Pölsterl 182273
- Update to 4.6.0
Sebastian Pölsterl 182273
5ac4d4
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.2-3
5ac4d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5ac4d4
09ab4b
* Wed May  7 2014 Tom Callaway <spot@fedoraproject.org> - 4.5.2-2
09ab4b
- rebuild for new R without bundled blas/lapack
09ab4b
f202fd
* Thu Apr 17 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.2-1
f202fd
- Update to version 4.5.2
f202fd
303e89
* Sun Feb 16 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.1-1
303e89
- Update to version 4.5.1
303e89
79b3a1
* Sun Jan 26 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.0-4
79b3a1
- Require netcdf-cxx-devel instead of netcdf-devel
79b3a1
e9e8dc
* Sun Jan 26 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.0-3
e9e8dc
- Add jsoncpp-devel to BuildRequires (needed for vtk 6.1)
e9e8dc
458cf3
* Sun Jan 26 2014 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.0-2
458cf3
- Rebuilt for vtk 6.1 update
458cf3
c24334
* Sun Dec 29 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 4.5.0-1
c24334
- Update to version 4.5.0
c24334
- Update software guide to 4.5.0
c24334
- Include LICENSE, NOTICE and README.txt in base package
c24334
- Move ITK-VTK bridge to new vtk subpackage
c24334
- Add BuildRequires on netcdf-devel (required by vtk)
c24334
df2992
* Mon Dec 23 2013 Sebastian Poelsterl <sebp@k-d-w.org> - 4.4.2-6
df2992
- Add BuildRequires on blas-devel and lapack-devel
df2992
14971f
* Mon Dec 23 2013 Sebastian Poelsterl <sebp@k-d-w.org> - 4.4.2-5
14971f
- Rebuilt for updated vtk
14971f
788b55
* Tue Oct 29 2013 Mario Ceresa <mrceresa@fedoraproject.org> - 4.4.2-4
788b55
- Revision bump up to build against updated gdcm
788b55
bd6c4a
* Fri Oct 25 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 4.4.2-3
bd6c4a
- Removed HDF5 patch that seems to interfere with cmake 2.8.12
bd6c4a
aa1d64
* Tue Oct 22 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 4.4.2-2
aa1d64
- Rebuilt for gdcm 2.4.0
aa1d64
10e345
* Sun Sep 08 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 4.4.2-1
10e345
- Update to version 4.4.2
10e345
- Added patch to only link against HDF5 release libraries
10e345
Mario Ceresa 244abb
* Wed Aug 14 2013 Mario Ceresa <mrceresa@fedoraproject.org> 4.4.1-2
Mario Ceresa 244abb
- Re-enabled vtk support
Mario Ceresa 244abb
- Re-enabled tests
Mario Ceresa 244abb
- Added BR qtwebkit
Mario Ceresa 244abb
01a27a
* Tue Aug 13 2013 Sebastian Pölsterl <sebp@k-d-w.org> - 4.4.1-1
01a27a
- Update to version 4.4.1
01a27a
0d98b5
* Mon Aug 05 2013 Mario Ceresa <mrceresa at="" fedoraproject="" dot="" org=""> - 4.4.0-6
0d98b5
- Use unversioned doc
29f985
- Fixed bogus dates
29f985
- Temporary remove vtk support because of issues with texlive in rawhide
0d98b5
7b956e
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-5
7b956e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7b956e
Mario Ceresa 5f0b3d
* Tue Jul 16 2013 Mario Ceresa <mrceresa@fedoraproject.org> 4.4.0-4
Mario Ceresa 5f0b3d
- Use xz tarball to save space in srpm media. (Fixes BZ980599)
Mario Ceresa 5f0b3d
946440
* Fri Jul 12 2013 Orion Poplawski <orion@cora.nwra.com> 4.4.0-3
946440
- Rebuild for vtk 6.0.0
946440
Mario Ceresa 534a77
* Wed Jul 10 2013 Mario Ceresa mrceresa fedoraproject org 4.4.0-2
Mario Ceresa 534a77
- Devel package now requires vtk-devel because it is build with itkvtkglue mod
Mario Ceresa 534a77
- Minor cleanups
Mario Ceresa 534a77
Mario Ceresa 534a77
* Mon Jul 08 2013 Mario Ceresa mrceresa fedoraproject org 4.4.0-1
Mario Ceresa 49b521
- Contributed by Sebastian Pölsterl <sebp@k-d-w.org>
Mario Ceresa 49b521
- Updated to upstream version 4.4.0
Mario Ceresa 49b521
- Add VTK Glue module
Mario Ceresa 49b521
- Removed obsolete TIFF patch
Mario Ceresa 49b521
9c7f19
* Thu May 16 2013 Orion Poplawski <orion@cora.nwra.com> - 4.3.1-12
9c7f19
- Rebuild for hdf5 1.8.11
9c7f19
29f985
* Thu May 2 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-11
Mario Ceresa 534a77
- Rebuilt for gdcm 2.3.2
172407
d9204f
* Fri Apr 26 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-10
d9204f
- Install itkTestDriver in default package
d9204f
- Install libraries into _libdir and drop ldconfig file
d9204f
3d0ec2
* Tue Apr 23 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-9
3d0ec2
- Changed license to ASL 2.0
3d0ec2
3d0ec2
* Mon Apr 22 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-8
3d0ec2
- Build examples
3d0ec2
- Making tests informative as we debug it with upstream
3d0ec2
- Fixed cmake support file location
3d0ec2
- Disabled python bindings for now, hit http://www.gccxml.org/Bug/view.php?id=13372
3d0ec2
3d0ec2
* Sat Apr 20 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-7
3d0ec2
- Enabled v3.20 compatibility layer
3d0ec2
3d0ec2
* Thu Apr 18 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-6
3d0ec2
- Removed unused patches
3d0ec2
3d0ec2
* Mon Apr 08 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-5
3d0ec2
- Fixed failing tests
3d0ec2
3d0ec2
* Wed Apr 03 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-4
3d0ec2
- Fixed build with USE_SYSTEM_TIFF
3d0ec2
3d0ec2
* Fri Mar 29 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-3
3d0ec2
- Compiles against VXL with compatibility patches
3d0ec2
- Enabled testing
3d0ec2
3d0ec2
* Tue Feb 12 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-2
3d0ec2
- Reorganized sections
3d0ec2
- Fixed patch naming
3d0ec2
- Removed buildroot and rm in install section
3d0ec2
- Removed cmake version constraint
3d0ec2
- Changed BR libjpeg-turbo-devel to libjpeg-devel
3d0ec2
- Preserve timestamp of SOURCE1 file.
3d0ec2
- Fixed main file section
3d0ec2
- Added noreplace
3d0ec2
3d0ec2
* Fri Jan 25 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-1
3d0ec2
- Updated to 4.3.1
3d0ec2
- Fixed conflicts with previous patches
3d0ec2
- Dropped gcc from BR
3d0ec2
- Fixed tabs-vs-space
3d0ec2
- Improved description
3d0ec2
- Re-enabled system tiff
3d0ec2
- Clean up the spec
3d0ec2
- Sanitize use of dir macro
3d0ec2
- Re-organized docs
3d0ec2
- Fixed libdir and datadir ownership
3d0ec2
3d0ec2
* Wed Dec 12 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-4
3d0ec2
- Included improvements to the spec file from Dan Vratil
3d0ec2
3d0ec2
* Tue Dec 4 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-3
3d0ec2
- Build against system VXL
3d0ec2
3d0ec2
* Mon Nov 26 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-2
3d0ec2
- Reorganized install paths
3d0ec2
3d0ec2
* Tue Nov 20 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-1
3d0ec2
- Updated to new version
3d0ec2
3d0ec2
* Wed Nov 30 2011 Mario Ceresa mrceresa fedoraproject org InsightToolkit 3.20.1-1
3d0ec2
- Updated to new version
3d0ec2
- Added binary morphology code
3d0ec2
3d0ec2
* Fri May 27 2011 Mario Ceresa mrceresa fedoraproject org InsightToolkit 3.20.0-5
3d0ec2
- Added cstddef patch for gcc 4.6
3d0ec2
3d0ec2
* Mon Jan 24 2011 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.20.0-4
3d0ec2
- Added the ld.so.conf file
3d0ec2
3d0ec2
* Mon Nov 22 2010 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.20.0-3
3d0ec2
- Updated to 3.20 release
3d0ec2
- Added vxl utility and review material
3d0ec2
- Applied patch from upstream to fix vtk detection (Thanks to Mathieu Malaterre)
3d0ec2
- Added patch to install in the proper lib dir based on arch value
3d0ec2
- Added patch to set datadir as cmake configuration files dir
3d0ec2
3d0ec2
* Sun Dec  6 2009 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.16.0-2
3d0ec2
- Fixed comments from revision: https://bugzilla.redhat.com/show_bug.cgi?id=539387#c8
3d0ec2
3d0ec2
* Tue Nov 17 2009 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.16.0-1
3d0ec2
- Initial RPM Release
3d0ec2
3d0ec2