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