123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421 |
- %define name vtk
- %define major_version 5.0
- %define minor_version 4
- %define version %{major_version}.%{minor_version}
- %define release 1%{?_dist_release}
- %define data_version 5.0.4
- %define ruby /usr/bin/ruby
- %define rlibdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')
- %define rarchdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["archdir"]')
- %define qt_dir %{_libdir}/qt3
- %define qt_designer_plugins_dir %{qt_dir}/plugins/designer
- %define py_ver %(python -c 'import sys; print sys.version[:3]')
- %define py_dir %{_libdir}/python%{py_ver}
- Name: %{name}
- Version: %{version}
- Release: %{release}
- Source0: vtk-%{version}.tar.gz
- Source1: vtkdata-%{data_version}.tar.gz
- Patch0: vtk-5.0-getsockname.patch
- Patch1: http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/vtk-ruby-060915.patch
- License: BSD style
- URL: http://www.vtk.org/
- BuildPrereq: cmake >= 2.0.0
- #BuildPrereq: XOrg-devel, XOrg-gl-devel
- BuildPrereq: xorg-x11-devel, mesa-libGL-devel
- BuildPrereq: expat-devel, zlib-devel
- BuildPrereq: netcdf
- BuildPrereq: libjpeg-devel, libpng-devel, libtiff-devel, freetype2-devel
- BuildPrereq: tcl, tk, python, python-devel, ruby, ruby-devel
- BuildPrereq: qt-devel
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Summary: The Visualization Toolkit - A high level 3D visualization library
- Summary: The Visualization Toolkit - ハイレベル3D可視化ライブラリ
- Group: System Environment/Libraries
- Requires: cmake
- #Requires: XOrg, XOrg-gl
- Requires: xorg-x11-libs, mesa-libGL
- Requires: expat, zlib
- Requires: netcdf
- Requires: libjpeg, libpng, libtiff, freetype2
- %description
- VTK - the Visualization Toolkit is an object oriented, high
- level library that allows one to easily write C++ programs, Tcl,
- Python and Java scripts that do 3D visualization. This package
- provides the shared libraries needed to run C++ programs that use VTK.
- To compile C++ code that uses VTK you have to install vtk-devel.
- VTK enables users to concentrate on their work by providing a
- large number of excellent and feature packed high level functions that
- do visualization. The library needs OpenGL to render the graphics and
- for Linux machines Mesa is necessary. The terms/copyright can be read
- in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
- information about using vtk, getting documentataion or help and
- instructions on building VTK. This package is relocatable.
- %package devel
- Summary: VTK header files for building C++ code.
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- %description devel
- This provides the VTK header files required to compile C++
- programs that use VTK to do 3D visualisation.
- %package tcl
- Summary: Tcl bindings for VTK.
- Group: Applications/Engineering
- Requires: %{name} = %{version}-%{release}
- Requires: tcl
- %description tcl
- VTK - the Visualization Toolkit is an object oriented, high level
- library that allows one to easily write C++ programs, Tcl, Python and Java
- scripts that do 3D visualization. This package provides the shared
- libraries that enable one to use VTK via Tcl scripts. This version also
- provides the vtkTkRenderWindow class. This package does not require the vtk
- package to be installed. The library needs OpenGL to render the graphics and
- for Linux machines Mesa is necessary.
- The terms/copyright can be read in
- /usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
- information about using vtk, getting documentation or help and instructions on
- building VTK. This package is relocatable.
- %package python
- Summary: Python bindings for VTK.
- Group: Applications/Engineering
- Requires: %{name} = %{version}-%{release}
- Requires: python
- %description python
- This provides the shared libraries that enable one to use VTK from
- python scripts. You will need python and vtk installed to use this.
- Remember to set your PYTHONPATH variable properly before running your
- scripts.
- %package ruby
- Summary: Ruby bindings for VTK.
- Group: Applications/Engineering
- Requires: %{name} = %{version}-%{release}
- Requires: ruby
- %description ruby
- This provides the shared libraries that enable one to use VTK from
- ruby scripts. You will need ruby and vtk installed to use this.
- %package qt
- Summary: QT VTK widget
- Group: System Environment/Libraries
- Requires: %{name} = %{version}-%{release}
- Requires: qt
- %description qt
- The vtkQt classes combine VTK and Qt(TM) for X11.
- %package examples
- Summary: C++, Tcl and Python example programs/scripts for VTK.
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- %description examples
- This package contains all the examples from the VTK source.
- To compile the C++ examples you will need to install the vtk-devel
- package as well. The Python and Tcl examples can be run with the
- corresponding packages (vtk-python, vtk-tcl).
- %package testing-progs
- Summary: Tests programs for VTK.
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- %description testing-progs
- This package contains all testing programs from the VTK
- source. The source code of these programs can be found in the
- vtk-examples package.
- %package data
- Summary: Data for VTK.
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- Prefix: /usr
- %description data
- This package contains all the data from the VTKData repository.
- These data are required to run various examples from the examples package.
- %prep
- %setup -q -n VTK
- %patch0 -p1
- %patch1 -p1
- cmake . \
- -DCMAKE_CXX_COMPILER:STRING=g++ \
- -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS -Wno-deprecated" \
- -DCMAKE_CXX_FLAGS_DEBUG:STRING=-g \
- -DCMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -finline-functions" \
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-O2 -g" \
- -DCMAKE_C_COMPILER:STRING=gcc \
- -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
- -DCMAKE_C_FLAGS_DEBUG:STRING=-g \
- -DCMAKE_C_FLAGS_MINSIZEREL:STRING=-Os \
- -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -finline-functions" \
- -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-O2 -g" \
- -DCMAKE_BUILD_TYPE:STRING=Release \
- -DCMAKE_HP_PTHREADS:BOOL=OFF \
- -DCMAKE_USE_PTHREADS:BOOL=ON \
- -DCMAKE_USE_SPROC:BOOL=OFF \
- -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK/bin \
- -DCMAKE_INSTALL_PREFIX:PATH=%{prefix} \
- -DCMAKE_USE_RELATIVE_PATHS:BOOL=OFF \
- -DVTK_DATA_ROOT:PATH=%{_datadir}/vtk-data-%{version} \
- -DVTK_WRAP_PYTHON:BOOL=ON \
- -DVTK_WRAP_RUBY:BOOL=ON \
- -DVTK_WRAP_TCL:BOOL=ON \
- -DVTK_USE_PARALLEL:BOOL=ON \
- -DVTK_USE_HYBRID:BOOL=ON \
- -DVTK_USE_RENDERING:BOOL=ON \
- -DBUILD_DOCUMENTATION:BOOL=ON \
- -DBUILD_EXAMPLES:BOOL=OFF \
- -DBUILD_SHARED_LIBS:BOOL=ON \
- -DBUILD_TESTING:BOOL=ON \
- -DVTK_USE_GUISUPPORT:BOOL=ON \
- -DVTK_USE_QVTK:BOOL=ON \
- -DQT_INCLUDE_DIR:FILEPATH=%{qt_dir}/include \
- -DQT_MOC_EXECUTABLE:FILEPATH=%{_bindir}/moc \
- -DQT_QASSISTANTCLIENT_LIBRARY:FILEPATH=%{qt_dir}/lib/libqassistantclient.a \
- -DQT_QT_LIBRARY:FILEPATH=%{qt_dir}/lib/libqt-mt.so \
- -DQT_UIC_EXECUTABLE:FILEPATH=%{_bindir}/bin/uic \
- -DVTK_INSTALL_QT_PLUGIN_DIR:STRING=%{qt_designer_plugins_dir} \
- -DVTK_USE_RPATH:BOOL=OFF \
- -DVTK_LEGACY_REMOVE:BOOL=ON \
- -DVTK_USE_GL2PS:BOOL=ON \
- -DVTK_RUBY_LIB_DIR=%{rlibdir} \
- -DVTK_RUBY_ARCH_DIR=%{rarchdir} \
- -DVTK_RUBY_SETUP_ARGS:STRING=--prefix="$RPM_BUILD_ROOT" \
- -DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
- -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
- -DVTK_USE_SYSTEM_JPEG:BOOL=ON \
- -DVTK_USE_SYSTEM_PNG:BOOL=ON \
- -DVTK_USE_SYSTEM_TIFF:BOOL=ON \
- -DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
- -DVTK_INSTALL_LIB_DIR:PATH=/%{_lib} \
- -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=$RPM_BUILD_ROOT%{_prefix} --install-lib=$RPM_BUILD_ROOT%{py_dir}/site-packages" \
- -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK/%{_lib} \
- -DPYTHON_INCLUDE_PATH:PATH=%{_includedir}/python%{py_ver} \
- -DPYTHON_LIBRARY:FILEPATH=%{py_dir}/config/libpython%{py_ver}.a \
- %build
- %__make %{?_smp_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- export VTKPYTHONPATH=%{py_dir}/site-packages
- %makeinstall DESTDIR=$RPM_BUILD_ROOT
- rm -f bin/*.so*
- install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
- rm -rf doc
- for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets
- do
- install -d -m 755 doc/Testing/$d
- cp -a $d/Testing/* doc/Testing/$d
- done
- cp -a Examples doc
- find doc -name "*.o" -exec rm {} \;
- find doc -name CMakeCache.txt -exec rm {} \;
- find doc -name Makefile -exec rm {} \;
- find doc -name DartTestfile.txt -exec rm {} \;
- find doc -name .NoDartCoverage -exec rm {} \;
- find doc -name "cmake.*" -exec rm {} \;
- echo "%defattr (-, root, root)" > testing-progs-list
- find ${RPM_BUILD_ROOT}%{_bindir} -type f | \
- sed -e "s#^${RPM_BUILD_ROOT}##g" | \
- egrep -v '^%{_bindir}/(vtk|pvtk|vtkWrap.*|vtkParseJava|VTKJavaExecutable|vtkpython|pvtkpython)$' \
- >> testing-progs-list
- tar zxvf %{SOURCE1}
- install -d $RPM_BUILD_ROOT%{_datadir}
- cp -r VTKData $RPM_BUILD_ROOT%{_datadir}/vtk-data-%{version}
- %post -p /sbin/ldconfig
- %post tcl -p /sbin/ldconfig
- %post python -p /sbin/ldconfig
- %post qt -p /sbin/ldconfig
- %postun -p /sbin/ldconfig
- %postun tcl -p /sbin/ldconfig
- %postun python -p /sbin/ldconfig
- %clean
- rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root)
- %doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg
- %{_libdir}/libvtkCommon.so.*
- %{_libdir}/libvtkFiltering.so.*
- %{_libdir}/libvtkGenericFiltering.so.*
- %{_libdir}/libvtkGraphics.so.*
- %{_libdir}/libvtkHybrid.so.*
- %{_libdir}/libvtkIO.so.*
- %{_libdir}/libvtkImaging.so.*
- %{_libdir}/libvtkParallel.so.*
- %{_libdir}/libvtkRendering.so.*
- %{_libdir}/libvtkVolumeRendering.so.*
- %{_libdir}/libvtkWidgets.so.*
- %{_libdir}/libvtkexoIIc.so.*
- %{_libdir}/libvtkftgl.so.*
- %{_libdir}/libvtksys.so.*
- %{_libdir}/libvtkDICOMParser.so.*
- #%{_libdir}/libvtkMPEG2Encode.so.*
- %{_libdir}/libvtkNetCDF.so.*
- %files devel
- %defattr(-,root,root)
- %doc Utilities/Upgrading/*
- %doc %{_libdir}/vtk-%{major_version}/doxygen/*
- %{_includedir}/vtk-%{major_version}/
- %{_libdir}/vtk-%{major_version}/CMake/
- %{_libdir}/vtk-%{major_version}/*.cmake
- %{_libdir}/vtk-%{major_version}/hints
- %{_libdir}/libvtkCommon.so
- %{_libdir}/libvtkFiltering.so
- %{_libdir}/libvtkGenericFiltering.so
- %{_libdir}/libvtkGraphics.so
- %{_libdir}/libvtkHybrid.so
- %{_libdir}/libvtkIO.so
- %{_libdir}/libvtkImaging.so
- %{_libdir}/libvtkParallel.so
- %{_libdir}/libvtkRendering.so
- %{_libdir}/libvtkVolumeRendering.so
- %{_libdir}/libvtkWidgets.so
- %{_libdir}/libvtkexoIIc.so
- %{_libdir}/libvtkftgl.so
- %{_libdir}/libvtksys.so
- %{_libdir}/libvtkDICOMParser.so
- #%{_libdir}/libvtkMPEG2Encode.so
- %{_libdir}/libvtkNetCDF.so
- %{_libdir}/libvtk*TCL.so
- %{_libdir}/libvtk*Python*.so
- %{_libdir}/libQVTK.so
- %{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so
- %files tcl
- %defattr(-,root,root)
- %dir %{_libdir}/vtk-%{major_version}/testing
- %{_bindir}/vtk
- %{_bindir}/vtkWrapTcl
- %{_bindir}/vtkWrapTclInit
- %{_libdir}/libvtk*TCL.so.*
- %{_libdir}/vtk-%{major_version}/tcl/
- %{_libdir}/vtk-%{major_version}/testing/*tcl
- %{_libdir}/vtk-%{major_version}/pkgIndex.tcl
- %files python
- %defattr(-,root,root)
- %{_bindir}/vtkpython
- %{_bindir}/vtkWrapPython
- %{_bindir}/vtkWrapPythonInit
- %{_libdir}/libvtk*Python*.so.*
- %{_libdir}/python%{py_ver}/site-packages/vtk/
- %{_libdir}/python%{py_ver}/site-packages/VTK-%{version}-py%{py_ver}.egg-info
- %{_libdir}/vtk-%{major_version}/testing/*py
- %files ruby
- %defattr(-,root,root)
- %{_bindir}/vtkruby
- %{_bindir}/vtkWrapRuby
- %{_bindir}/vtkWrapRubyInit
- %{_libdir}/libvtk*Ruby*.so*
- %{rlibdir}/vtk.rb
- %{rlibdir}/vtk/
- %{rarchdir}/vtk/
- %files qt
- %defattr(-,root,root)
- %{_libdir}/libQVTK.so.*
- %files examples
- %defattr(-,root,root)
- %doc doc/Examples/
- %doc doc/Testing/
- %files testing-progs -f testing-progs-list
- %files data
- %defattr(-,root,root)
- %{_datadir}/vtk-data-%{version}
- %changelog
- * Thu Jul 31 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.4-1vl5
- - updated vtk to 5.0.4
- - updated vtkdata to 5.0.4
- - built with xorg-x11-devel, python-2.5
- - applied new versioning policy
- - spec in utf-8
- * Mon Feb 25 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 5.0.2-0vl6
- - rebuild with expat-2.0.1
- - add BuildPrereq: freetype2-devel and drop freetype-devel
- - add BuildPrereq: qt-devel
- - add Requires: freetype2 and drop freetype
- * Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl5
- - rebuild with tcl/tk-8.4.18
- * Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl4
- - rebuild with tcl/tk-8.4.16
- * Mon Aug 27 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl3
- - added %%define py_ver, py_dir
- - added %%{?_smp_mflags} to make
- - change for x86_64
- - changed lib to %%{_lib}
- - added VTK_INSTALL_LIB_DIR=PATH=/%{_lib} in cmake
- - added --install-lib at VTK_PYTHON_SETUP_ARGS in cmake
- * Tue May 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0.2-0vl2
- - rebuild with new environment/toolchain
- * Fri Sep 15 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.2-0vl1
- - new upstream
- - add ruby patch
- * Sat Jul 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.0.1-0vl1
- - new upstream
- - fixed spec file encoding
- - changed Group to System Environment/Libraries
- * Mon Feb 06 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.0-0vl1
- - source verion up
- * Tue Mar 29 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.4.2-0vl1
- - source verion up
- * Sun Mar 20 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.2.6-0vl1
- - initial build for Vine Linux
|