source: projects/specs/trunk/v/vtk/vtk-vl.spec @ 945

Revision 945, 11.2 KB checked in by owa, 14 years ago (diff)

updated vtk to 5.4.2

Line 
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
6Summary: The Visualization Toolkit - A high level 3D visualization library
7Summary: The Visualization Toolkit - ハイレベル3D可視化ライブラリ
8Group: System Environment/Libraries
9Name: vtk
10Version: %{version}
11Release: 1%{?_dist_release}
12Source0: vtk-%{version}.tar.gz
13Source1: vtkdata-%{version}.tar.gz
14
15Patch0: vtk-5.0-getsockname.patch
16Patch1: http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/vtk-ruby-060915.patch
17Patch2: vtk-5.2.1-boost-1.42.patch
18
19License: BSD style
20URL: http://www.vtk.org/
21
22BuildRequires: cmake >= 2.0.0
23BuildRequires: xorg-x11-devel, mesa-libGL-devel
24BuildRequires: expat-devel, zlib-devel
25BuildRequires: netcdf
26BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, freetype2-devel
27BuildRequires: tcl, tk, python, python-devel
28#BuildRequires: ruby, ruby-devel
29BuildRequires: qt-devel
30BuildRequires: libboost-devel
31BuildRoot: %{_tmppath}/%{name}-%{version}-root
32
33Requires: cmake
34Requires: xorg-x11-libs, mesa-libGL
35Requires: expat, zlib
36Requires: netcdf
37Requires: libjpeg, libpng, libtiff, freetype2
38Obsoletes: %{name}-ruby < %{version}
39
40%description
41VTK - the Visualization Toolkit is an object oriented, high
42level library that allows one to easily write C++ programs, Tcl,
43Python and Java scripts that do 3D visualization.  This package
44provides the shared libraries needed to run C++ programs that use VTK.
45To compile C++ code that uses VTK you have to install vtk-devel.
46
47VTK enables users to concentrate on their work by providing a
48large number of excellent and feature packed high level functions that
49do visualization.  The library needs OpenGL to render the graphics and
50for Linux machines Mesa is necessary. The terms/copyright can be read
51in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
52information about using vtk, getting documentataion or help and
53instructions on building VTK. This package is relocatable.
54
55%package devel
56Summary: VTK header files for building C++ code.
57Group: Development/Libraries
58Requires: %{name} = %{version}-%{release}
59
60%description devel
61This provides the VTK header files required to compile C++
62programs that use VTK to do 3D visualisation.
63
64
65%package tcl
66Summary: Tcl bindings for VTK.
67Group: Applications/Engineering
68Requires: %{name} = %{version}-%{release}
69Requires: tcl
70
71%description tcl
72VTK - the Visualization Toolkit is an object oriented, high level
73library that allows one to easily write C++ programs, Tcl, Python and Java
74scripts that do 3D visualization.  This package provides the shared
75libraries that enable one to use VTK via Tcl scripts.  This version also
76provides the vtkTkRenderWindow class. This package does not require the vtk
77package to be installed.  The library needs OpenGL to render the graphics and
78for Linux machines Mesa is necessary.
79
80The terms/copyright can be read in
81/usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
82information about using vtk, getting documentation or help and instructions on
83building VTK. This package is relocatable.
84
85
86%package python
87Summary: Python bindings for VTK.
88Group: Applications/Engineering
89Requires: %{name} = %{version}-%{release}
90Requires: python
91
92%description python
93This provides the shared libraries that enable one to use VTK from
94python scripts.  You will need python and vtk installed to use this.
95Remember to set your PYTHONPATH variable properly before running your
96scripts.
97
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.
107
108%package qt
109Summary: QT VTK widget
110Group: System Environment/Libraries
111Requires: %{name} = %{version}-%{release}
112Requires: qt
113
114%description qt
115The vtkQt classes combine VTK and Qt(TM) for X11.
116
117
118%package examples
119Summary: C++, Tcl and Python example programs/scripts for VTK.
120Group: Development/Libraries
121Requires: %{name} = %{version}-%{release}
122
123%description examples
124This package contains all the examples from the VTK source.
125To compile the C++ examples you will need to install the vtk-devel
126package as well. The Python and Tcl examples can be run with the
127corresponding packages (vtk-python, vtk-tcl).
128
129
130%package testing-progs
131Summary: Tests programs for VTK.
132Group: Development/Libraries
133Requires: %{name} = %{version}-%{release}
134
135%description testing-progs
136This package contains all testing programs from the VTK
137source. The source code of these programs can be found in the
138vtk-examples package.
139
140
141%package data
142Summary: Data for VTK.
143Group: Development/Libraries
144Requires: %{name} = %{version}-%{release}
145Prefix: /usr
146
147%description data
148This package contains all the data from the VTKData repository.
149These data are required to run various examples from the examples package.
150
151
152%prep
153%setup -q -n VTK
154#%patch0 -p1 -b .getsockname
155#%patch1 -p1 -b .ruby-060915
156%patch2 -p1 -b .boost-1.42
157
158# fix data path
159find . -type f | xargs sed -i -e 's|../../../../VTKData|%{vtkdata_dir}|g'
160
161%build
162## This section wad fixed reference to Mandriva package
163# Remove old cmake files
164rm -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
203%__make %{?_smp_mflags}
204
205
206%install
207rm -rf $RPM_BUILD_ROOT
208%makeinstall DESTDIR=$RPM_BUILD_ROOT
209
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
215mv $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/
216
217rm -f bin/*.so*
218install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
219rm -rf doc
220for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets
221do
222        install -d -m 755 doc/Testing/$d
223        cp -a $d/Testing/* doc/Testing/$d
224done
225
226cp -a Examples doc
227find doc -name "*.o" -exec rm {} \;
228find doc -name CMakeCache.txt -exec rm {} \;
229find doc -name Makefile -exec rm {} \;
230find doc -name DartTestfile.txt -exec rm {} \;
231find doc -name .NoDartCoverage -exec rm {} \;
232find doc -name "cmake.*" -exec rm {} \;
233
234echo "%defattr (-, root, root)" > testing-progs-list
235find ${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
240tar zxvf %{SOURCE1}
241install -d $RPM_BUILD_ROOT%{_datadir}
242cp -r VTKData $RPM_BUILD_ROOT/%{vtkdata_dir}
243
244# Remove any possible verdict docs
245rm -rf %buildroot/%{_libdir}/vtk-%{vtkver}/doc
246
247
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
256rm -rf $RPM_BUILD_ROOT
257
258%files
259%defattr(-,root,root)
260%doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg
261%{_libdir}/*.so.*
262
263%files devel
264%defattr(-,root,root)
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
272%{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so
273
274
275%files tcl
276%defattr(-,root,root)
277%dir %{_libdir}/vtk-%{vtkver}/testing
278%{_bindir}/vtk
279%{_bindir}/vtkWrapTcl
280%{_bindir}/vtkWrapTclInit
281%{_libdir}/libvtk*TCL.so.*
282%{_libdir}/vtk-%{vtkver}/tcl/
283%{_libdir}/vtk-%{vtkver}/testing/*tcl
284%{_libdir}/vtk-%{vtkver}/pkgIndex.tcl
285
286
287%files python
288%defattr(-,root,root)
289%{_bindir}/vtkpython
290%{_bindir}/vtkWrapPython
291%{_bindir}/vtkWrapPythonInit
292%{_libdir}/libvtk*Python*.so.*
293%{_libdir}/python%{pyver}/site-packages/*
294%{_libdir}/vtk-%{vtkver}/testing/*py
295
296
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/
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)
324%{vtkdata_dir}
325
326
327%changelog
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
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
Note: See TracBrowser for help on using the repository browser.