f5b22d
%{!?build_mpi:%define build_mpi 1}
341cf2
%define pv_maj 3
341cf2
%define pv_min 2
73a57c
%define pv_patch 2
341cf2
%define pv_majmin %{pv_maj}.%{pv_min}
45f711
11ff22
Name:           paraview
341cf2
Version:        %{pv_majmin}.%{pv_patch}
73a57c
Release:        1%{?dist}
11ff22
Summary:        Parallel visualization application
11ff22
11ff22
Group:          Applications/Engineering
7fa6ec
License:        BSD
11ff22
URL:            http://www.paraview.org/
341cf2
Source0:        http://www.paraview.org/files/v%{pv_majmin}/paraview-%{version}.tar.gz
11ff22
Source1:        paraview_22x22.png
11ff22
Source2:        paraview.xml
d42eff
Source3:        FindMPI.cmake
d42eff
Patch1:         paraview-3.2.1-findmpi.patch
341cf2
Patch2:         paraview-3.2.1-install.patch
341cf2
Patch3:         paraview-3.2.1-doc.patch
341cf2
Patch4:         paraview-3.2.1-assistant-qt4.patch
f71f80
Patch5:         paraview-3.2.1-make.patch
20369d
Patch6:         paraview-3.2.1-gcc43.patch
b85ec8
Patch7:         paraview-3.2.1-hdf5.patch
73a57c
Patch8:         paraview-3.2.2-hdf5-1.8.patch
11ff22
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11ff22
45f711
BuildRequires:  cmake
45f711
%if %{build_mpi}
45f711
BuildRequires:  openmpi-devel
45f711
%endif
f5b22d
BuildRequires:  qt4-devel, mesa-libOSMesa-devel
11ff22
BuildRequires:  python-devel, tk-devel, hdf5-devel
f5b22d
BuildRequires:  freetype-devel, libtiff-devel, zlib-devel
11ff22
BuildRequires:  expat-devel
11ff22
BuildRequires:  /usr/bin/desktop-file-install
f5b22d
BuildRequires:  doxygen, graphviz
341cf2
BuildRequires:  readline-devel
11ff22
Requires:       %{name}-data = %{version}-%{release}
341cf2
Requires:       qt4-assistant
11ff22
Requires(post):   /usr/bin/update-desktop-database
11ff22
Requires(postun): /usr/bin/update-desktop-database
d42eff
Obsoletes:      paraview-demos < %{version}-%{release}
d42eff
Provides:       paraview-demos = %{version}-%{release}
11ff22
11ff22
11ff22
%description
11ff22
ParaView is an application designed with the need to visualize large data
11ff22
sets in mind. The goals of the ParaView project include the following:
11ff22
11ff22
    * Develop an open-source, multi-platform visualization application.
11ff22
    * Support distributed computation models to process large data sets.
11ff22
    * Create an open, flexible, and intuitive user interface.
11ff22
    * Develop an extensible architecture based on open standards.
11ff22
11ff22
ParaView runs on distributed and shared memory parallel as well as single
11ff22
processor systems and has been successfully tested on Windows, Linux and
11ff22
various Unix workstations and clusters. Under the hood, ParaView uses the
11ff22
Visualization Toolkit as the data processing and rendering engine and has a
11ff22
user interface written using a unique blend of Tcl/Tk and C++.
11ff22
11ff22
NOTE: This version has NOT been compiled with MPI support.
11ff22
11ff22
45f711
%if %{build_mpi}
11ff22
%package        mpi
11ff22
Summary:        Parallel visualization application
11ff22
Group:          Applications/Engineering
11ff22
Requires:       %{name}-data = %{version}-%{release}
d42eff
Requires:       openmpi
11ff22
Requires(post):   /usr/bin/update-desktop-database
11ff22
Requires(postun): /usr/bin/update-desktop-database
11ff22
11ff22
%description    mpi
d42eff
This package contains copies of the ParaView server binaries compiled with
d42eff
OpenMPI.  These are named pvserver-mpi, pvbatch-mpi, etc.
45f711
%endif
11ff22
11ff22
%package        data
11ff22
Summary:        Data files for ParaView
11ff22
Group:          Applications/Engineering
9455d0
Requires:       %{name} = %{version}-%{release}
11ff22
Requires(post):   /usr/bin/update-mime-database
11ff22
Requires(postun): /usr/bin/update-mime-database
11ff22
11ff22
%description    data
11ff22
%{summary}.
11ff22
11ff22
f5b22d
%package        devel
f5b22d
Summary:        Development files for ParaView
11ff22
Group:          Applications/Engineering
f5b22d
Requires:       %{name} = %{version}-%{release}
d42eff
Obsoletes:      %{name}-mpi-devel < %{version}-%{release}
d42eff
Provides:       %{name}-mpi-devel = %{version}-%{release}
f5b22d
f5b22d
%description    devel
f5b22d
%{summary}.
f5b22d
11ff22
11ff22
%prep
3c9182
%setup -q -n ParaView%{version}
d42eff
cp -p %SOURCE3 CMake/
d42eff
%patch1 -p1 -b .findmpi
341cf2
%patch2 -p1 -b .install
341cf2
%patch3 -p1 -b .doc
341cf2
%patch4 -p1 -b .assistant-qt4
f71f80
%patch5 -p0 -b .make
20369d
%patch6 -p1 -b .gcc43
b85ec8
%patch7 -p1 -b .hdf5
73a57c
%patch8 -p1 -b .hdf5-1.8
11ff22
11ff22
11ff22
%build
11ff22
rm -rf fedora fedora-mpi
11ff22
mkdir fedora
11ff22
pushd fedora
11ff22
export CC='gcc'
11ff22
export CXX='g++'
11ff22
export MAKE='make'
172ed0
export CFLAGS="$RPM_OPT_FLAGS -DH5_USE_16_API"
172ed0
export CXXFLAGS="$RPM_OPT_FLAGS -DH5_USE_16_API"
f5b22d
%cmake .. \
f5b22d
        -DPV_INSTALL_LIB_DIR:PATH=/%{_lib}/paraview \
11ff22
        -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
11ff22
        -DCMAKE_C_COMPILER:FILEPATH=$CC \
11ff22
        -DTCL_LIBRARY:PATH=tcl \
11ff22
        -DTK_LIBRARY:PATH=tk \
f5b22d
        -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
11ff22
        -DPARAVIEW_USE_SYSTEM_HDF5:BOOL=ON \
710af1
        -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
341cf2
        -DVTK_USE_INFOVIS:BOOL=OFF \
11ff22
        -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_PNG:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
11ff22
        -DBUILD_DOCUMENTATION:BOOL=ON \
11ff22
        -DBUILD_EXAMPLES:BOOL=ON
f5b22d
cmake ..
f71f80
make VERBOSE=1 %{?_smp_mflags}
11ff22
popd
45f711
%if %{build_mpi}
11ff22
mkdir fedora-mpi
11ff22
pushd fedora-mpi
11ff22
export CC='gcc'
d42eff
export CXX='g++'
11ff22
export MAKE='make'
172ed0
export CFLAGS="$RPM_OPT_FLAGS -DH5_USE_16_API"
172ed0
export CXXFLAGS="$RPM_OPT_FLAGS -DH5_USE_16_API"
f5b22d
%cmake .. \
f5b22d
        -DPV_INSTALL_LIB_DIR:PATH=/%{_lib}/paraview-mpi \
11ff22
        -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
11ff22
        -DCMAKE_C_COMPILER:FILEPATH=$CC \
11ff22
        -DTCL_LIBRARY:PATH=tcl \
11ff22
        -DTK_LIBRARY:PATH=tk \
f5b22d
        -DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
d42eff
        -DPARAVIEW_USE_MPI:BOOL=ON \
11ff22
        -DPARAVIEW_USE_SYSTEM_HDF5:BOOL=ON \
f5b22d
        -DICET_BUILD_TESTING:BOOL=ON \
710af1
        -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
341cf2
        -DVTK_USE_INFOVIS:BOOL=OFF \
11ff22
        -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_PNG:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
11ff22
        -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
11ff22
        -DBUILD_DOCUMENTATION:BOOL=ON \
11ff22
        -DBUILD_EXAMPLES:BOOL=ON
f5b22d
cmake ..
f71f80
make VERBOSE=1 %{?_smp_mflags}
45f711
%endif
11ff22
11ff22
%install
11ff22
rm -rf $RPM_BUILD_ROOT
11ff22
11ff22
#Fix permissions
11ff22
find . \( -name \*.txt -o -name \*.xml -o -name '*.[ch]' -o -name '*.[ch][px][px]' \) -print0 | xargs -0 chmod -x
11ff22
11ff22
# Create some needed directories
11ff22
install -d $RPM_BUILD_ROOT%{_datadir}/applications
11ff22
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
11ff22
install -m644 %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/pixmaps
11ff22
install -d $RPM_BUILD_ROOT%{_datadir}/mime/packages
11ff22
install -m644 %SOURCE2 $RPM_BUILD_ROOT%{_datadir}/mime/packages
11ff22
45f711
%if %{build_mpi}
11ff22
# Install mpi version
11ff22
pushd fedora-mpi
11ff22
make install DESTDIR=$RPM_BUILD_ROOT
f5b22d
f5b22d
#Move the mpi binaries, includes, and man pages out of the way
d42eff
#Don't need mpi versions of these
11ff22
pushd $RPM_BUILD_ROOT/%{_bindir}
d42eff
rm paraview pvpython pvTestDriver vtkSMExtractDocumentation
11ff22
for f in *
11ff22
do
11ff22
   mv $f ${f}-mpi
11ff22
done
11ff22
popd
31b2ae
rm -rf $RPM_BUILD_ROOT/%{_includedir}/paraview-%{pv_majmin}
f5b22d
rm -rf $RPM_BUILD_ROOT%{_mandir}
341cf2
341cf2
#Remove mpi copy of documentation
d42eff
rm -rf $RPM_BUILD_ROOT%{_datadir}/paraview/Documentation-mpi
d42eff
rm -rf $RPM_BUILD_ROOT%{_libdir}/paraview-mpi/doc
d42eff
popd
45f711
%endif
11ff22
11ff22
#Install the normal version
11ff22
pushd fedora
11ff22
make install DESTDIR=$RPM_BUILD_ROOT
f5b22d
f5b22d
#Create desktop file
11ff22
cat > paraview.desktop <
11ff22
[Desktop Entry]
11ff22
Encoding=UTF-8
11ff22
Name=ParaView Viewer
11ff22
GenericName=Data Viewer
11ff22
Comment=ParaView allows viewing of large data sets
11ff22
Type=Application
11ff22
Terminal=false
341cf2
Icon=paraview_22x22
341cf2
MimeType=application/x-paraview;
11ff22
Categories=Application;Graphics;
11ff22
Exec=paraview
11ff22
EOF
11ff22
11ff22
desktop-file-install --vendor=fedora \
11ff22
       --add-category=X-Fedora \
11ff22
       --dir %{buildroot}%{_datadir}/applications/ \
11ff22
       paraview.desktop
11ff22
11ff22
popd
11ff22
f5b22d
#Don't ship the VTK Qt Designer plugin
f5b22d
rm -r $RPM_BUILD_ROOT/usr/plugins
036a68
d42eff
#Don't ship copy of Qt assisstant
d42eff
rm $RPM_BUILD_ROOT%{_bindir}/assistant{,-mpi}
d42eff
11ff22
11ff22
%clean
11ff22
rm -rf $RPM_BUILD_ROOT
11ff22
11ff22
11ff22
%post
341cf2
/sbin/ldconfig
11ff22
update-desktop-database &> /dev/null ||:
11ff22
f5b22d
11ff22
%postun
341cf2
/sbin/ldconfig
11ff22
update-desktop-database &> /dev/null ||:
11ff22
11ff22
11ff22
%post   data
11ff22
update-mime-database %{_datadir}/mime &> /dev/null || :
11ff22
11ff22
%postun data
11ff22
update-mime-database %{_datadir}/mime &> /dev/null || :
11ff22
11ff22
11ff22
%files
11ff22
%defattr(-,root,root,-)
f5b22d
%doc License_v1.1.txt
11ff22
%{_bindir}/paraview
341cf2
%{_bindir}/pvbatch
11ff22
%{_bindir}/pvdataserver
710af1
%{_bindir}/pvpython
11ff22
%{_bindir}/pvrenderserver
11ff22
%{_bindir}/pvserver
f5b22d
%{_bindir}/pvTestDriver
d42eff
%{_bindir}/vtkSMExtractDocumentation
11ff22
%{_datadir}/applications/fedora-paraview.desktop
d42eff
%doc %{_datadir}/paraview/
f5b22d
%{_libdir}/paraview/
341cf2
%exclude %{_libdir}/paraview/doc/
11ff22
45f711
%if %{build_mpi}
11ff22
%files mpi
11ff22
%defattr(-,root,root,-)
f5b22d
%doc License_v1.1.txt
341cf2
%{_bindir}/pvbatch-mpi
11ff22
%{_bindir}/pvdataserver-mpi
11ff22
%{_bindir}/pvrenderserver-mpi
11ff22
%{_bindir}/pvserver-mpi
f5b22d
%{_libdir}/paraview-mpi/
45f711
%endif
11ff22
11ff22
11ff22
%files data
11ff22
%defattr(-,root,root,-)
11ff22
%{_datadir}/pixmaps/paraview_22x22.png
11ff22
%{_datadir}/mime/packages/paraview.xml
11ff22
11ff22
f5b22d
%files devel
11ff22
%defattr(-,root,root,-)
341cf2
%{_includedir}/paraview-%{pv_majmin}/
341cf2
%doc %{_libdir}/paraview/doc/
f5b22d
f5b22d
11ff22
%changelog
73a57c
* Wed Jul 16 2008 Orion Poplawski <orion@cora.nwra.com> - 3.2.2-1
73a57c
- Update to 3.2.2
73a57c
- Drop qt patch as upstream now supports qt 4.2.2-4.3.X
73a57c
- Add patch to support hdf5 1.8 in mpi build
73a57c
d42eff
* Wed Jun 25 2008 Orion Poplawski <orion@cora.nwra.com> - 3.2.1-7
d42eff
- Add patch from Tyson Whitehead to fix mpi build (bug #450598)
d42eff
- Drop rpath patch, use rpath instead of ls.so conf files so mpi and non-mpi
d42eff
  can be installed at the same time
d42eff
- mpi package now just ships mpi versions of the server components
d42eff
- Drop useless mpi-devel subpackage
6c0f2d
- Update hdf5 patch to fix H5pubconf.h -> H5public.h usage
d42eff
cdf76f
* Wed May 07 2008 Jesse Keating <jkeating@redhat.com> - 3.2.1-6
cdf76f
- Rebuild for file corruption
cdf76f
b85ec8
* Wed Mar 5 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-5
b85ec8
- Rebuild for hdf5 1.8.0 using compatability API define and new patch
172ed0
20369d
* Mon Feb 18 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-4
20369d
- Add patch to compile with gcc 4.3
20369d
f71f80
* Fri Jan 18 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-3
f71f80
- Add patch to fix parallel make
f71f80
- Obsolete demos package (bug #428528)
f71f80
543ad8
* Tue Dec 18 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-2
52ebed
- Name ld.so.conf.d file with .conf extension
84bd76
- Drop parallel make for now
52ebed
543ad8
* Mon Dec 03 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-1
3c9182
- Update to 3.2.1
341cf2
- Use macros for version numbers
341cf2
- Add patches to fix documentation install location and use assistant-qt4,
341cf2
  not install copies of Qt libraries, and not use rpath.
341cf2
- Install ld.so.conf.d file
341cf2
- Fixup desktop files
3c9182
543ad8
* Thu Aug 23 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.0.2-2
7fa6ec
- Update license tag to BSD
7fa6ec
- Fix make %%{_smp_mflags}
7fa6ec
- Rebuild for ppc32
7fa6ec
543ad8
* Wed Jul 11 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.0.2-1
f5b22d
- Update to 3.0.2
f5b22d
- Turn mpi build back on
f5b22d
- Add devel packages
f5b22d
- Remove demo package no longer in upstream
f5b22d
- Use cmake macros
f5b22d
543ad8
* Thu Mar 08 2007 - Orion Poplawski <orion@cora.nwra.com> - 2.4.4-6
45f711
- Don't build mpi version until upstream fixes the build system
45f711
543ad8
* Fri Dec 22 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.4-5
036a68
- Fix .so permissions
036a68
- Patch for const issue
036a68
- Patch for new cmake
036a68
- Build with openmpi
036a68
df271c
* Thu Dec 14 2006 - Jef Spaleta <jspaleta@gmail.com> - 2.4.4-4
df271c
- Bump and build for python 2.5
df271c
543ad8
* Fri Oct  6 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.4-3
c00a71
- Install needed python libraries to get around make install bug
c00a71
543ad8
* Wed Oct  4 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.4-2
710af1
- Re-enable OSMESA support for FC6
710af1
- Enable python wrapping
710af1
543ad8
* Fri Sep 15 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.4-1
f5fc6f
- Update to 2.4.4
f5fc6f
543ad8
* Thu Jun 29 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-8
9455d0
- No OSMesa support in FC5
9455d0
- Make data sub-package pull in main package (bug #193837)
9455d0
- A patch from CVS to fix vtkXOpenRenderWindow.cxx
dc468b
- Need lam-devel for FC6
9455d0
543ad8
* Fri Apr 21 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-7
0b2b59
- Re-enable ppc
0b2b59
543ad8
* Mon Apr 17 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-6
d34052
- Exclude ppc due to gcc bug #189160
d34052
543ad8
* Wed Apr 12 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-5
11ff22
- Cleanup permissions
11ff22
543ad8
* Mon Apr 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-4
11ff22
- Add icon and cleanup desktop file
11ff22
543ad8
* Mon Apr 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-3
11ff22
- Add VTK_USE_MANGLE_MESA for off screen rendering
11ff22
- Cleanup source permisions
11ff22
- Add an initial .desktop file
11ff22
- Make requirement on -data specific to version
11ff22
- Don't package Ice-T man pages and cmake files
11ff22
543ad8
* Thu Apr  6 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-2
11ff22
- Add mpi version
11ff22
543ad8
* Tue Apr  4 2006 - Orion Poplawski <orion@cora.nwra.com> - 2.4.3-1
11ff22
- Initial Fedora Extras version