[945] | 1 | %define vtkver 5.4 |
---|
| 2 | %define version %{vtkver}.2 |
---|
| 3 | %define vtkdata_dir %{_datadir}/vtk-data-%{version} |
---|
| 4 | %define qt_designer_plugins_dir %(qmake -query QT_INSTALL_PREFIX)/plugins/designer |
---|
| 5 | |
---|
| 6 | Summary: The Visualization Toolkit - A high level 3D visualization library |
---|
| 7 | Summary: The Visualization Toolkit - ハイレベル3D可視化ライブラリ |
---|
| 8 | Group: System Environment/Libraries |
---|
| 9 | Name: vtk |
---|
[521] | 10 | Version: %{version} |
---|
[945] | 11 | Release: 1%{?_dist_release} |
---|
[521] | 12 | Source0: vtk-%{version}.tar.gz |
---|
[945] | 13 | Source1: vtkdata-%{version}.tar.gz |
---|
| 14 | |
---|
[521] | 15 | Patch0: vtk-5.0-getsockname.patch |
---|
| 16 | Patch1: http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/vtk-ruby-060915.patch |
---|
[945] | 17 | Patch2: vtk-5.2.1-boost-1.42.patch |
---|
| 18 | |
---|
[521] | 19 | License: BSD style |
---|
| 20 | URL: http://www.vtk.org/ |
---|
| 21 | |
---|
[945] | 22 | BuildRequires: cmake >= 2.0.0 |
---|
| 23 | BuildRequires: xorg-x11-devel, mesa-libGL-devel |
---|
| 24 | BuildRequires: expat-devel, zlib-devel |
---|
| 25 | BuildRequires: netcdf |
---|
| 26 | BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, freetype2-devel |
---|
| 27 | BuildRequires: tcl, tk, python, python-devel |
---|
| 28 | #BuildRequires: ruby, ruby-devel |
---|
| 29 | BuildRequires: qt-devel |
---|
| 30 | BuildRequires: libboost-devel |
---|
[521] | 31 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 32 | |
---|
| 33 | Requires: cmake |
---|
| 34 | Requires: xorg-x11-libs, mesa-libGL |
---|
| 35 | Requires: expat, zlib |
---|
| 36 | Requires: netcdf |
---|
| 37 | Requires: libjpeg, libpng, libtiff, freetype2 |
---|
[945] | 38 | Obsoletes: %{name}-ruby < %{version} |
---|
[521] | 39 | |
---|
| 40 | %description |
---|
| 41 | VTK - the Visualization Toolkit is an object oriented, high |
---|
| 42 | level library that allows one to easily write C++ programs, Tcl, |
---|
| 43 | Python and Java scripts that do 3D visualization. This package |
---|
| 44 | provides the shared libraries needed to run C++ programs that use VTK. |
---|
| 45 | To compile C++ code that uses VTK you have to install vtk-devel. |
---|
| 46 | |
---|
| 47 | VTK enables users to concentrate on their work by providing a |
---|
| 48 | large number of excellent and feature packed high level functions that |
---|
| 49 | do visualization. The library needs OpenGL to render the graphics and |
---|
| 50 | for Linux machines Mesa is necessary. The terms/copyright can be read |
---|
| 51 | in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has |
---|
| 52 | information about using vtk, getting documentataion or help and |
---|
| 53 | instructions on building VTK. This package is relocatable. |
---|
| 54 | |
---|
| 55 | %package devel |
---|
| 56 | Summary: VTK header files for building C++ code. |
---|
| 57 | Group: Development/Libraries |
---|
| 58 | Requires: %{name} = %{version}-%{release} |
---|
| 59 | |
---|
| 60 | %description devel |
---|
| 61 | This provides the VTK header files required to compile C++ |
---|
| 62 | programs that use VTK to do 3D visualisation. |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | %package tcl |
---|
| 66 | Summary: Tcl bindings for VTK. |
---|
| 67 | Group: Applications/Engineering |
---|
| 68 | Requires: %{name} = %{version}-%{release} |
---|
| 69 | Requires: tcl |
---|
| 70 | |
---|
| 71 | %description tcl |
---|
| 72 | VTK - the Visualization Toolkit is an object oriented, high level |
---|
| 73 | library that allows one to easily write C++ programs, Tcl, Python and Java |
---|
| 74 | scripts that do 3D visualization. This package provides the shared |
---|
| 75 | libraries that enable one to use VTK via Tcl scripts. This version also |
---|
| 76 | provides the vtkTkRenderWindow class. This package does not require the vtk |
---|
| 77 | package to be installed. The library needs OpenGL to render the graphics and |
---|
| 78 | for Linux machines Mesa is necessary. |
---|
| 79 | |
---|
| 80 | The terms/copyright can be read in |
---|
| 81 | /usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has |
---|
| 82 | information about using vtk, getting documentation or help and instructions on |
---|
| 83 | building VTK. This package is relocatable. |
---|
| 84 | |
---|
| 85 | |
---|
| 86 | %package python |
---|
| 87 | Summary: Python bindings for VTK. |
---|
| 88 | Group: Applications/Engineering |
---|
| 89 | Requires: %{name} = %{version}-%{release} |
---|
| 90 | Requires: python |
---|
| 91 | |
---|
| 92 | %description python |
---|
| 93 | This provides the shared libraries that enable one to use VTK from |
---|
| 94 | python scripts. You will need python and vtk installed to use this. |
---|
| 95 | Remember to set your PYTHONPATH variable properly before running your |
---|
| 96 | scripts. |
---|
| 97 | |
---|
[945] | 98 | #%package ruby |
---|
| 99 | #Summary: Ruby bindings for VTK. |
---|
| 100 | #Group: Applications/Engineering |
---|
| 101 | #Requires: %{name} = %{version}-%{release} |
---|
| 102 | #Requires: ruby |
---|
| 103 | # |
---|
| 104 | #%description ruby |
---|
| 105 | #This provides the shared libraries that enable one to use VTK from |
---|
| 106 | #ruby scripts. You will need ruby and vtk installed to use this. |
---|
[521] | 107 | |
---|
| 108 | %package qt |
---|
| 109 | Summary: QT VTK widget |
---|
| 110 | Group: System Environment/Libraries |
---|
| 111 | Requires: %{name} = %{version}-%{release} |
---|
| 112 | Requires: qt |
---|
| 113 | |
---|
| 114 | %description qt |
---|
| 115 | The vtkQt classes combine VTK and Qt(TM) for X11. |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | %package examples |
---|
| 119 | Summary: C++, Tcl and Python example programs/scripts for VTK. |
---|
| 120 | Group: Development/Libraries |
---|
| 121 | Requires: %{name} = %{version}-%{release} |
---|
| 122 | |
---|
| 123 | %description examples |
---|
| 124 | This package contains all the examples from the VTK source. |
---|
| 125 | To compile the C++ examples you will need to install the vtk-devel |
---|
| 126 | package as well. The Python and Tcl examples can be run with the |
---|
| 127 | corresponding packages (vtk-python, vtk-tcl). |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | %package testing-progs |
---|
| 131 | Summary: Tests programs for VTK. |
---|
| 132 | Group: Development/Libraries |
---|
| 133 | Requires: %{name} = %{version}-%{release} |
---|
| 134 | |
---|
| 135 | %description testing-progs |
---|
| 136 | This package contains all testing programs from the VTK |
---|
| 137 | source. The source code of these programs can be found in the |
---|
| 138 | vtk-examples package. |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | %package data |
---|
| 142 | Summary: Data for VTK. |
---|
| 143 | Group: Development/Libraries |
---|
| 144 | Requires: %{name} = %{version}-%{release} |
---|
| 145 | Prefix: /usr |
---|
| 146 | |
---|
| 147 | %description data |
---|
| 148 | This package contains all the data from the VTKData repository. |
---|
| 149 | These data are required to run various examples from the examples package. |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | %prep |
---|
| 153 | %setup -q -n VTK |
---|
[945] | 154 | #%patch0 -p1 -b .getsockname |
---|
| 155 | #%patch1 -p1 -b .ruby-060915 |
---|
| 156 | %patch2 -p1 -b .boost-1.42 |
---|
[521] | 157 | |
---|
[945] | 158 | # fix data path |
---|
| 159 | find . -type f | xargs sed -i -e 's|../../../../VTKData|%{vtkdata_dir}|g' |
---|
[521] | 160 | |
---|
| 161 | %build |
---|
[945] | 162 | ## This section wad fixed reference to Mandriva package |
---|
| 163 | # Remove old cmake files |
---|
| 164 | rm -f CMake/FindBoost* |
---|
| 165 | |
---|
| 166 | # Due to cmake prefix point already for _prefix, we need |
---|
| 167 | # push only the necessary extra paths |
---|
| 168 | %cmake \ |
---|
| 169 | -DVTK_INSTALL_BIN_DIR:PATH=/bin \ |
---|
| 170 | -DVTK_INSTALL_PACKAGE_DIR=/%{_lib}/vtk-%{vtkver} \ |
---|
| 171 | -DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk-%{vtkver} \ |
---|
| 172 | -DVTK_PYTHON_MODULE_PLATFORM_INSTALL_DIR=/%{_lib}/pyhton%{pyver}/site-packages \ |
---|
| 173 | -DVTK_DATA_ROOT:PATH=/share/vtk-%{vtkver} \ |
---|
| 174 | \ |
---|
| 175 | -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \ |
---|
| 176 | -DVTK_WRAP_PYTHON:BOOL=ON \ |
---|
| 177 | -DVTK_WRAP_JAVA:BOOL=OFF \ |
---|
| 178 | -DVTK_WRAP_TCL:BOOL=ON \ |
---|
| 179 | -DVTK_USE_RENDERING:BOOL=ON \ |
---|
| 180 | -DDESIRED_QT_VERSION=4 \ |
---|
| 181 | -DBUILD_DOCUMENTATION:BOOL=OFF \ |
---|
| 182 | -DBUILD_EXAMPLES:BOOL=ON \ |
---|
| 183 | -DBUILD_SHARED_LIBS:BOOL=ON \ |
---|
| 184 | -DBUILD_TESTING:BOOL=ON \ |
---|
| 185 | -DVTK_USE_SYSTEM_EXPAT=ON \ |
---|
| 186 | -DVTK_USE_SYSTEM_JPEG=ON \ |
---|
| 187 | -DVTK_USE_SYSTEM_PNG=ON \ |
---|
| 188 | -DVTK_USE_SYSTEM_TIFF=ON \ |
---|
| 189 | -DVTK_USE_SYSTEM_ZLIB=ON \ |
---|
| 190 | -DVTK_USE_SYSTEM_FREETYPE=ON \ |
---|
| 191 | -DVTK_USE_ANSI_STDLIB:BOOL=ON \ |
---|
| 192 | -DVTK_USE_PARALLEL:BOOL=ON \ |
---|
| 193 | -DVTK_USE_GUISUPPORT:BOOL=ON \ |
---|
| 194 | -DVTK_USE_QVTK=ON \ |
---|
| 195 | -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=%{_prefix} --root=%{buildroot}" \ |
---|
| 196 | -DVTK_INSTALL_QT_PLUGIN_DIR=%{qt_designer_plugins_dir} \ |
---|
| 197 | -DVTK_USE_GL2PS:BOOL=ON \ |
---|
| 198 | -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \ |
---|
| 199 | -DVTK_USE_QVTK_QTOPENGL:BOOL=ON \ |
---|
| 200 | -DVTK_USE_BOOST:BOOL=ON \ |
---|
| 201 | ; |
---|
| 202 | |
---|
[521] | 203 | %__make %{?_smp_mflags} |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | %install |
---|
| 207 | rm -rf $RPM_BUILD_ROOT |
---|
| 208 | %makeinstall DESTDIR=$RPM_BUILD_ROOT |
---|
| 209 | |
---|
[945] | 210 | %if %{_lib} == lib64 |
---|
| 211 | mkdir -p $RPM_BUILD_ROOT%{_libdir} |
---|
| 212 | mv $RPM_BUILD_ROOT%{_prefix}/lib/python%{pyver} $RPM_BUILD_ROOT%{_libdir}/ |
---|
| 213 | mv $RPM_BUILD_ROOT%{_prefix}/lib/vtk-%{vtkver}/* $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/ |
---|
| 214 | %endif |
---|
| 215 | mv $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/ |
---|
| 216 | |
---|
[521] | 217 | rm -f bin/*.so* |
---|
| 218 | install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir} |
---|
| 219 | rm -rf doc |
---|
| 220 | for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets |
---|
| 221 | do |
---|
| 222 | install -d -m 755 doc/Testing/$d |
---|
| 223 | cp -a $d/Testing/* doc/Testing/$d |
---|
| 224 | done |
---|
| 225 | |
---|
| 226 | cp -a Examples doc |
---|
| 227 | find doc -name "*.o" -exec rm {} \; |
---|
| 228 | find doc -name CMakeCache.txt -exec rm {} \; |
---|
| 229 | find doc -name Makefile -exec rm {} \; |
---|
| 230 | find doc -name DartTestfile.txt -exec rm {} \; |
---|
| 231 | find doc -name .NoDartCoverage -exec rm {} \; |
---|
| 232 | find doc -name "cmake.*" -exec rm {} \; |
---|
| 233 | |
---|
| 234 | echo "%defattr (-, root, root)" > testing-progs-list |
---|
| 235 | find ${RPM_BUILD_ROOT}%{_bindir} -type f | \ |
---|
| 236 | sed -e "s#^${RPM_BUILD_ROOT}##g" | \ |
---|
| 237 | egrep -v '^%{_bindir}/(vtk|pvtk|vtkWrap.*|vtkParseJava|VTKJavaExecutable|vtkpython|pvtkpython)$' \ |
---|
| 238 | >> testing-progs-list |
---|
| 239 | |
---|
| 240 | tar zxvf %{SOURCE1} |
---|
| 241 | install -d $RPM_BUILD_ROOT%{_datadir} |
---|
[945] | 242 | cp -r VTKData $RPM_BUILD_ROOT/%{vtkdata_dir} |
---|
[521] | 243 | |
---|
[945] | 244 | # Remove any possible verdict docs |
---|
| 245 | rm -rf %buildroot/%{_libdir}/vtk-%{vtkver}/doc |
---|
[521] | 246 | |
---|
[945] | 247 | |
---|
[521] | 248 | %post -p /sbin/ldconfig |
---|
| 249 | %post tcl -p /sbin/ldconfig |
---|
| 250 | %post python -p /sbin/ldconfig |
---|
| 251 | %post qt -p /sbin/ldconfig |
---|
| 252 | %postun -p /sbin/ldconfig |
---|
| 253 | %postun tcl -p /sbin/ldconfig |
---|
| 254 | %postun python -p /sbin/ldconfig |
---|
| 255 | %clean |
---|
| 256 | rm -rf $RPM_BUILD_ROOT |
---|
| 257 | |
---|
| 258 | %files |
---|
| 259 | %defattr(-,root,root) |
---|
| 260 | %doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg |
---|
[945] | 261 | %{_libdir}/*.so.* |
---|
[521] | 262 | |
---|
| 263 | %files devel |
---|
| 264 | %defattr(-,root,root) |
---|
[945] | 265 | %doc Utilities/Upgrading |
---|
| 266 | %doc %{_libdir}/vtk-%{vtkver}/doxygen |
---|
| 267 | %{_includedir}/vtk-%{vtkver}/ |
---|
| 268 | %{_libdir}/*.so |
---|
| 269 | %{_libdir}/vtk-%{vtkver}/CMake/ |
---|
| 270 | %{_libdir}/vtk-%{vtkver}/*.cmake |
---|
| 271 | %{_libdir}/vtk-%{vtkver}/hints |
---|
[521] | 272 | %{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | %files tcl |
---|
| 276 | %defattr(-,root,root) |
---|
[945] | 277 | %dir %{_libdir}/vtk-%{vtkver}/testing |
---|
[521] | 278 | %{_bindir}/vtk |
---|
| 279 | %{_bindir}/vtkWrapTcl |
---|
| 280 | %{_bindir}/vtkWrapTclInit |
---|
| 281 | %{_libdir}/libvtk*TCL.so.* |
---|
[945] | 282 | %{_libdir}/vtk-%{vtkver}/tcl/ |
---|
| 283 | %{_libdir}/vtk-%{vtkver}/testing/*tcl |
---|
| 284 | %{_libdir}/vtk-%{vtkver}/pkgIndex.tcl |
---|
[521] | 285 | |
---|
| 286 | |
---|
| 287 | %files python |
---|
| 288 | %defattr(-,root,root) |
---|
| 289 | %{_bindir}/vtkpython |
---|
| 290 | %{_bindir}/vtkWrapPython |
---|
| 291 | %{_bindir}/vtkWrapPythonInit |
---|
| 292 | %{_libdir}/libvtk*Python*.so.* |
---|
[945] | 293 | %{_libdir}/python%{pyver}/site-packages/* |
---|
| 294 | %{_libdir}/vtk-%{vtkver}/testing/*py |
---|
[521] | 295 | |
---|
| 296 | |
---|
[945] | 297 | #%files ruby |
---|
| 298 | #%defattr(-,root,root) |
---|
| 299 | #%{_bindir}/vtkruby |
---|
| 300 | #%{_bindir}/vtkWrapRuby |
---|
| 301 | #%{_bindir}/vtkWrapRubyInit |
---|
| 302 | #%{_libdir}/libvtk*Ruby*.so* |
---|
| 303 | #%{rlibdir}/vtk.rb |
---|
| 304 | #%{rlibdir}/vtk/ |
---|
| 305 | #%{rarchdir}/vtk/ |
---|
[521] | 306 | |
---|
| 307 | |
---|
| 308 | %files qt |
---|
| 309 | %defattr(-,root,root) |
---|
| 310 | %{_libdir}/libQVTK.so.* |
---|
| 311 | |
---|
| 312 | |
---|
| 313 | %files examples |
---|
| 314 | %defattr(-,root,root) |
---|
| 315 | %doc doc/Examples/ |
---|
| 316 | %doc doc/Testing/ |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | %files testing-progs -f testing-progs-list |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | %files data |
---|
| 323 | %defattr(-,root,root) |
---|
[945] | 324 | %{vtkdata_dir} |
---|
[521] | 325 | |
---|
| 326 | |
---|
| 327 | %changelog |
---|
[945] | 328 | * Tue May 04 2010 Shu KONNO <owa@bg.wakwak.com> 5.4.2-1 |
---|
| 329 | - updated vtk to 5.4.2 |
---|
| 330 | - updated vtkdata to 5.4.2 |
---|
| 331 | - added Obsoletes: %%{name}-ruby < 5.4.2 |
---|
| 332 | - added Patch2: vtk-5.2.1-boost-1.42.patch (from Mandriva) |
---|
| 333 | - dropt Patch0: vtk-5.0-getsockname.patch |
---|
| 334 | - dropt Patch1: vtk-ruby-060915.patch |
---|
| 335 | |
---|
[521] | 336 | * Thu Jul 31 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.4-1vl5 |
---|
| 337 | - updated vtk to 5.0.4 |
---|
| 338 | - updated vtkdata to 5.0.4 |
---|
| 339 | - built with xorg-x11-devel, python-2.5 |
---|
| 340 | - applied new versioning policy |
---|
| 341 | - spec in utf-8 |
---|
| 342 | |
---|
| 343 | * Mon Feb 25 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 5.0.2-0vl6 |
---|
| 344 | - rebuild with expat-2.0.1 |
---|
| 345 | - add BuildPrereq: freetype2-devel and drop freetype-devel |
---|
| 346 | - add BuildPrereq: qt-devel |
---|
| 347 | - add Requires: freetype2 and drop freetype |
---|
| 348 | |
---|
| 349 | * Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl5 |
---|
| 350 | - rebuild with tcl/tk-8.4.18 |
---|
| 351 | |
---|
| 352 | * Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl4 |
---|
| 353 | - rebuild with tcl/tk-8.4.16 |
---|
| 354 | |
---|
| 355 | * Mon Aug 27 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl3 |
---|
| 356 | - added %%define py_ver, py_dir |
---|
| 357 | - added %%{?_smp_mflags} to make |
---|
| 358 | - change for x86_64 |
---|
| 359 | - changed lib to %%{_lib} |
---|
| 360 | - added VTK_INSTALL_LIB_DIR=PATH=/%{_lib} in cmake |
---|
| 361 | - added --install-lib at VTK_PYTHON_SETUP_ARGS in cmake |
---|
| 362 | |
---|
| 363 | * Tue May 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0.2-0vl2 |
---|
| 364 | - rebuild with new environment/toolchain |
---|
| 365 | |
---|
| 366 | * Fri Sep 15 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.2-0vl1 |
---|
| 367 | - new upstream |
---|
| 368 | - add ruby patch |
---|
| 369 | |
---|
| 370 | * Sat Jul 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.0.1-0vl1 |
---|
| 371 | - new upstream |
---|
| 372 | - fixed spec file encoding |
---|
| 373 | - changed Group to System Environment/Libraries |
---|
| 374 | |
---|
| 375 | * Mon Feb 06 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.0-0vl1 |
---|
| 376 | - source verion up |
---|
| 377 | |
---|
| 378 | * Tue Mar 29 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.4.2-0vl1 |
---|
| 379 | - source verion up |
---|
| 380 | |
---|
| 381 | * Sun Mar 20 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.2.6-0vl1 |
---|
| 382 | - initial build for Vine Linux |
---|