]> git.pld-linux.org Git - packages/vtk.git/blob - vtk.spec
- pl summaries, formatting
[packages/vtk.git] / vtk.spec
1 #
2 # ToDo:
3 # - make it all work 
4 # Conditional build
5 #
6 %bcond_with     java    # build with Java support (not yet done)
7 #
8
9 Summary:        Toolkit for 3D computer graphics, image processing, and visualization
10 Summary(pl):    Zestaw narzêdzi do trójwymiarowej grafiki, przetwarzania obrazu i wizualizacji
11 Name:           vtk
12 Version:        4.2.2
13 Release:        0.1
14 License:        BSD
15 Group:          Graphics
16 Source0:        %{name}42Src.tar.bz2
17 Source1:        %{name}42Data.tar.bz2
18 Patch0:         %{name}-cmakefiles.patch
19 URL:            http://public.kitware.com/VTK/
20 BuildRequires:  cmake 
21 BuildRequires:  python-devel 
22 BuildRequires:  tcl 
23 BuildRequires:  XFree86-devel 
24 BuildRequires:  doxygen
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 The Visualization ToolKit (VTK) is an object oriented software system
29 for 3D computer graphics, image processing, and visualization. VTK
30 includes a textbook, a C++ class library, and several interpreted
31 interface layers including Tcl/Tk, Java, and Python. VTK supports a
32 wide variety of visualization algorithms including scalar, vector,
33 tensor, texture, and volumetric methods. It also supports advanced
34 modeling techniques like implicit modeling, polygon reduction, mesh
35 smoothing, cutting, contouring, and Delaunay triangulation.  Moreover,
36 dozens of imaging algorithms have been integrated into the system.
37 This allows mixing 2D imaging / 3D graphics algorithms and data.
38
39 NOTE: The java wrapper is not included by default.  You may rebuild
40       the srpm using "--with java" with JDK installed.
41
42 NOTE: All patented routines which are part of the package have been
43       removed in this version.
44
45 %package devel
46 Summary:        VTK header files for building C++ code
47 Summary(pl):    Pliki nag³ówkowe VTK dla C++
48 Group:          Development/C++
49 Requires:       vtk
50
51 %description devel 
52 This provides the VTK header files required to compile C++
53 programs that use VTK to do 3D visualisation.
54
55 %package tcl
56 Summary:        Tcl bindings for VTK
57 Summary(pl):    Dowi±zania Tcl do VTK
58 Group:          System/Libraries
59 Requires:       vtk
60
61 %description tcl
62 The Visualization ToolKit (VTK) is an object oriented software system
63 for 3D computer graphics, image processing, and visualization. VTK
64 includes a textbook, a C++ class library, and several interpreted
65 interface layers including Tcl/Tk, Java, and Python. VTK supports a
66 wide variety of visualization algorithms including scalar, vector,
67 tensor, texture, and volumetric methods. It also supports advanced
68 modeling techniques like implicit modeling, polygon reduction, mesh
69 smoothing, cutting, contouring, and Delaunay triangulation.  Moreover,
70 dozens of imaging algorithms have been integrated into the system.
71 This allows mixing 2D imaging / 3D graphics algorithms and data.
72
73 This package contains tcl bindings for VTK.
74
75 %package python
76 Summary:        Python bindings for VTK
77 Summary(pl):    Dowi±zania Pythona do VTK
78 Requires:       vtk
79 Provides:       vtk
80 Group:          System/Libraries
81
82 %description python 
83 The Visualization ToolKit (VTK) is an object oriented software system
84 for 3D computer graphics, image processing, and visualization. VTK
85 includes a textbook, a C++ class library, and several interpreted
86 interface layers including Tcl/Tk, Java, and Python. VTK supports a
87 wide variety of visualization algorithms including scalar, vector,
88 tensor, texture, and volumetric methods. It also supports advanced
89 modeling techniques like implicit modeling, polygon reduction, mesh
90 smoothing, cutting, contouring, and Delaunay triangulation.  Moreover,
91 dozens of imaging algorithms have been integrated into the system.
92 This allows mixing 2D imaging / 3D graphics algorithms and data.
93
94 This package contains python bindings for VTK.
95
96 %package java
97 Summary:        Java bindings for VTK
98 Summary(pl):    Dowi±zania Javy do VTK
99 Group:          Development/Java
100 Requires:       vtk
101
102 %description java
103 The Visualization ToolKit (VTK) is an object oriented software system
104 for 3D computer graphics, image processing, and visualization. VTK
105 includes a textbook, a C++ class library, and several interpreted
106 interface layers including Tcl/Tk, Java, and Python. VTK supports a
107 wide variety of visualization algorithms including scalar, vector,
108 tensor, texture, and volumetric methods. It also supports advanced
109 modeling techniques like implicit modeling, polygon reduction, mesh
110 smoothing, cutting, contouring, and Delaunay triangulation.  Moreover,
111 dozens of imaging algorithms have been integrated into the system.
112 This allows mixing 2D imaging / 3D graphics algorithms and data.
113
114 This package contains java bindings for VTK.
115
116 %package examples
117 Summary:        C++, Tcl and Python example programs/scripts for VTK
118 Summary(pl):    Przyk³adowe programy/skrypty w C++, Tcl-u i Pythonie dla VTK
119 Group:          Development/Other
120 Requires:       vtk
121 Requires:       vtk-data
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 %package test-suite
130 Summary:        Test programs for VTK
131 Summary(pl):    Programy testowe dla VTK
132 Group:          Development/Other
133 Requires:       vtk
134 Requires:       vtk-data
135
136 %description test-suite
137 This package contains all testing programs from the VTK source. The
138 source code of these programs can be found in the vtk-examples
139 package.
140
141 %package data
142 Summary:        Data files for VTK
143 Summary(pl):    Pliki danych dla VTK
144 Group:          Development/Libraries
145
146 %description data 
147 This package contains all the data from the VTKData repository. These
148 data are required to run various examples from the examples package.
149
150 %prep
151 %setup -q -a 1 -n VTK-%version
152 cd Hybrid
153 %patch0 -p1
154
155 %build
156 #%if %build_java
157 #cmake  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
158 #       -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
159 #       -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin \
160 #       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
161 #       -DCMAKE_SKIP_RPATH:BOOL=ON \
162 #       -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \
163 #       -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
164 #       -DJAVA_INCLUDE_PATH:PATH=$JAVA_HOME/include
165 #       -DJAVA_INCLUDE_PATH2:PATH=$JAVA_HOME/include/linux \
166 #       -DJAVE_AWT_INCLUDE_PATH:PATH=$JAVA_HOME/include \
167 #       -DPYTHON_INCLUDE_PATH:PATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'include', 'python' + sys.version[:3])") \
168 #       -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'config/libpython' + sys.version[:3] + '.a')") \
169 #       -DVTK_DATA_ROOT:PATH=%{_docdir}/vtk-data-%{version} \
170 #       -DVTK_WRAP_PYTHON:BOOL=ON \
171 #       -DVTK_WRAP_JAVA:BOOL=ON \
172 #       -DVTK_WRAP_TCL:BOOL=ON \
173 #       -DVTK_USE_HYBRID:BOOL=ON \
174 #       -DVTK_USE_PARALLEL:BOOL=ON \
175 #       -DVTK_USE_RENDERING:BOOL=ON \
176 #       -DVTK_USE_X:BOOL=ON \
177 #       -DBUILD_DOCUMENTATION:BOOL=ON \
178 #       -DBUILD_EXAMPLES:BOOL=ON \
179 #       -DBUILD_SHARED_LIBS:BOOL=ON \
180 #       -DBUILD_TESTING:BOOL=ON \
181 #       -DOPENGL_INCLUDE_PATH:FILEPATH=/usr/X11R6/include/GL
182 ##      -DOPENGL_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.so.1.0
183 #
184 #%else
185 #cmake  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
186 #       -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
187 #       -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin \
188 #       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
189 #       -DCMAKE_SKIP_RPATH:BOOL=ON \
190 #       -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS" \
191 #       -DCMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
192 #       -DPYTHON_INCLUDE_PATH:PATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'include', 'python' + sys.version[:3])") \
193 #       -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3], 'config/libpython' + sys.version[:3] + '.a')") \
194 #       -DVTK_DATA_ROOT:PATH=%{_datadir}/vtk-data-%{version} \
195 #       -DVTK_WRAP_PYTHON:BOOL=ON \
196 #       -DVTK_WRAP_JAVA:BOOL=off \
197 #       -DVTK_WRAP_TCL:BOOL=ON \
198 #       -DVTK_USE_HYBRID:BOOL=ON \
199 #       -DVTK_USE_PARALLEL:BOOL=ON \
200 #       -DVTK_USE_RENDERING:BOOL=ON \
201 #       -DVTK_USE_X:BOOL=ON \
202 #       -DBUILD_DOCUMENTATION:BOOL=ON \
203 #       -DBUILD_EXAMPLES:BOOL=ON \
204 #       -DBUILD_SHARED_LIBS:BOOL=ON \
205 #       -DBUILD_TESTING:BOOL=ON \
206 #       -DOPENGL_INCLUDE_PATH:FILEPATH=/usr/X11R6/include/GL
207 ##      -DOPENGL_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.so.1.0
208 #
209 #%endif
210 cmake \
211         -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
212         -DLIBRARY_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/lib \
213         -DEXECUTABLE_OUTPUT_PATH:PATH=$RPM_BUILD_DIR/VTK-%version/bin  \
214         -DCMAKE_SKIP_RPATH:BOOL=ON \
215         -DBUILD_EXAMPLES:BOOL=ON \
216         -DBUILD_SHARED_LIBS:BOOL=ON \
217         -DBUILD_DOCUMENTATION:BOOL=ON \
218         -DBUILD_TESTING:BOOL=ON \
219         -DCMAKE_BACKWARDS_COMPATIBILITY=1.8 \
220         -DOPENGL_INCLUDE_PATH:PATH=/usr/X11R6/include/GL \
221         -DPYTHON_INCLUDE_PATH:PATH=%{_includedir}/python2.3 \
222         -DPYTHON_LIBRARY:FILEPATH=$(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version        [:3], 'config/libpython' + sys.version[:3] + '.a')") \
223         -DPYTHON_UTIL_LIBRARY:PATH=/usr/lib/libutil.so \
224         -DTCL_INCLUDE_PATH:PATH=%{_includedir} \
225         -DTCL_LIBRARY:PATH=%{_libdir}/libtcl.so \
226         -DTK_INCLUDE_PATH:PATH=%{_includedir} \
227         -DTK_LIBRARY:PATH=%{_libdir}/libtk.so \
228         -DVTK_DATA_ROOT:PATH=%{_datadir}/vtk \
229         -DVTK_USE_HYBRID:BOOL=ON \
230         -DVTK_USE_PARALLEL:BOOL=ON \
231         -DVTK_USE_PATENTED:BOOL=off \
232         -DVTK_USE_RENDERING:BOOL=ON \
233         -DVTK_WRAP_JAVA:BOOL=OFF \
234         -DVTK_WRAP_PYTHON:BOOL=ON \
235         -DVTK_WRAP_TCL:BOOL=ON \
236         -DBUILD_SHARED_LIBS:BOOL=ON \
237         -DCMAKE_CXX_COMPILER:PATH="%{__cxx}" \
238         -DCMAKE_C_COMPILER:PATH="%{__cc}" \
239         -DCMAKE_LINKER_FLAGS:STRING="%{rpmldflags}" \
240         -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
241
242
243 %{__make}
244
245 %install
246 rm -rf $RPM_BUILD_ROOT
247
248 #setup python
249 export VTKPYTHONPATH=%(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3],'site-packages')")
250
251 #install directories
252 install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
253 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
254 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/gtk
255 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/qt
256 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/testing
257 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/tk
258 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/util
259 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/wx
260 install -d -m 755 $RPM_BUILD_ROOT/$VTKPYTHONPATH
261 install -d -m 755 $RPM_BUILD_ROOT/usr/include/vtk
262
263 #install libs and tcl
264 #%makeinstall_std
265 %{__make} install \
266         DESTDIR=$RPM_BUILD_ROOT
267
268 chmod 755 $RPM_BUILD_ROOT%{_libdir}/vtk/*.so
269 for f in $RPM_BUILD_ROOT%{_libdir}/vtk/libvtk*Python*.so
270 do
271   ln -s ../`basename $f` $RPM_BUILD_ROOT%{_libdir}/vtk/python/
272 done
273
274 #install binaries
275 install  -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
276
277 #install python
278 install  -m 644 Wrapping/Python/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python
279 install  -m 644 Wrapping/Python/vtk/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
280 install  -m 644 Wrapping/Python/vtk/gtk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/gtk
281 install  -m 644 Wrapping/Python/vtk/qt/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/qt
282 install  -m 644 Wrapping/Python/vtk/tk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/tk
283 install  -m 644 Wrapping/Python/vtk/util/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/util
284 install  -m 644 Wrapping/Python/vtk/wx/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/wx
285 cat > $RPM_BUILD_ROOT/$VTKPYTHONPATH/vtkpython.pth <<_EOF
286 %{_libdir}/vtk/python
287 _EOF
288
289 %if %build_java
290 #install java
291 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/java
292 install  -m 644 lib/vtk.jar     $RPM_BUILD_ROOT/usr/lib/vtk/java
293 install  -m 644 java/vtk/*.java $RPM_BUILD_ROOT%{_libdir}/vtk/java
294 %endif
295
296 #install data
297 mkdir -p $RPM_BUILD_ROOT/%_datadir/%name-data
298 cp -r VTKData-release-4-2/* $RPM_BUILD_ROOT/%_datadir/%name-data
299 rm -fr $RPM_BUILD_ROOT/%_datadir/%name-data/CVS
300
301 #install test-suite and examples
302 for d in Common Filtering Graphics Hybrid IO Imaging Parallel Patented Rendering
303 do
304         mkdir -p $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
305         cp -a $d/Testing/* $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
306 done
307 cp -a Examples $RPM_BUILD_ROOT/%_datadir/vtk-examples
308
309 # get rid of unwanted files
310 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "*.o" -exec rm {} \;
311 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name CMakeCache.txt -exec rm {} \;
312 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name Makefile -exec rm {} \;
313 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name DartTestfile.txt -exec rm {} \;
314 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name .NoDartCoverage -exec rm {} \;
315 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "CMake*" -exec rm {} \;
316 find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "cmake.*" -exec rm {} \;
317
318 # Generate the package testing-progs lists and store them in file-lists
319 echo "%defattr (-, root, root)" > testing-progs-list
320 %if %build_java
321 find ${RPM_BUILD_ROOT}/usr/bin -type f | \
322         sed -e "s#^${RPM_BUILD_ROOT}##g" | \
323         egrep -v '^/usr/bin/(vtk|pvtk|vtkWrap.*|vtkParse.*|VTKJavaExecutable|vtkpython|pvtkpython)$' \
324         >> testing-progs-list
325 %else
326 find ${RPM_BUILD_ROOT}/usr/bin -type f | \
327         sed -e "s#^${RPM_BUILD_ROOT}##g" | \
328         egrep -v '^/usr/bin/(vtk|pvtk|vtkWrap.*|vtkParse.*|vtkpython|pvtkpython)$' \
329         >> testing-progs-list
330 %endif
331
332 %post -p /sbin/ldconfig
333 %post tcl -p /sbin/ldconfig
334 %post python -p /sbin/ldconfig
335 %if %build_java
336 %post java -p /sbin/ldconfig
337 %endif
338
339 %postun -p /sbin/ldconfig
340 %postun tcl -p /sbin/ldconfig
341 %postun python -p /sbin/ldconfig 
342 %if %build_java
343 %postun java -p /sbin/ldconfig
344 %endif
345
346 %files
347 %defattr(-,root,root)
348 %doc README.html vtkLogo.jpg
349 %dir %{_libdir}/vtk
350 %{_libdir}/vtk/libvtkCommon.so 
351 %{_libdir}/vtk/libvtkFiltering.so 
352 %{_libdir}/vtk/libvtkGraphics.so
353 %{_libdir}/vtk/libvtkHybrid.so
354 %{_libdir}/vtk/libvtkImaging.so
355 %{_libdir}/vtk/libvtkIO.so
356 %{_libdir}/vtk/libvtkParallel.so
357 %{_libdir}/vtk/libvtkRendering.so
358 %{_libdir}/vtk/libvtkjpeg.so 
359 %{_libdir}/vtk/libvtkpng.so 
360 %{_libdir}/vtk/libvtkzlib.so
361 %{_libdir}/vtk/libvtkexpat.so
362 %{_libdir}/vtk/libvtkfreetype.so
363 %{_libdir}/vtk/libvtkftgl.so
364 %{_libdir}/vtk/libvtktiff.so
365
366 %files devel
367 %defattr(-,root,root)
368 %doc %{_libdir}/vtk/doxygen
369 %{_includedir}/vtk
370 %{_libdir}/vtk/CMake
371 %{_libdir}/vtk/*.cmake
372 %doc Utilities/Upgrading/*
373
374 %files test-suite -f testing-progs-list
375
376 %files tcl
377 %defattr(-,root,root)
378 %{_bindir}/vtkWrapTcl
379 %{_libdir}/vtk/libvtk*TCL.so 
380 %{_bindir}/vtk
381 %{_libdir}/vtk/tcl
382 %dir %{_libdir}/vtk/testing
383 %{_libdir}/vtk/testing/*.tcl
384 %doc README.html 
385 %doc vtkLogo.jpg
386
387 %files python
388 %defattr(-,root,root)
389 %_bindir/vtkWrapPython
390 %_bindir/vtkpython
391 %_libdir/vtk/libvtk*Python*.so 
392 %_libdir/vtk/python
393 %dir %_libdir/vtk/testing
394 %_libdir/vtk/testing/*.py
395 %(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3],'site-packages', 'vtkpython.pth')")
396
397 %if %build_java
398 %files java
399 %defattr(-,root,root)
400 %{_bindir}/vtkParseJava
401 %{_bindir}/vtkWrapJava
402 %{_bindir}/VTKJavaExecutable
403 %{_libdir}/vtk/libvtk*Java.so 
404 %{_libdir}/vtk/java
405 %endif
406
407 %files examples
408 %defattr(-,root,root)
409 %dir %_datadir/vtk-examples
410 %_datadir/vtk-examples/Examples
411 %_datadir/vtk-examples/Testing
412
413 %files data
414 %defattr(-,root,root)
415 %dir %_datadir/vtk-data
416 %_datadir/vtk-data/Baseline
417 %_datadir/vtk-data/Data
418 %_datadir/vtk-data/VTKData.readme
419
420 %clean 
421 rm -rf $RPM_BUILD_ROOT
422
423 %changelog
424 * Mon Mar 01 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.2.2-4mdk
425 - Own dir (again)
426
427 * Sun Feb 29 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.2.2-3mdk
428 - Own dir
429
430 * Sat Aug 9 2003 Austin Acton <aacton@yorku.ca> 4.2.2-2mdk
431 - python 2.3
432
433 * Thu Jul 17 2003 Austin Acton <aacton@yorku.ca> 4.2.2-1mdk
434 - 4.2.2
435 - some DIRM
436 - some removal of some lint
437 - some java conditionals
438
439 * Sun Feb 2 2003 Austin Acton <aacton@yorku.ca> 4.0-1mdk
440 - initial package
441 - stole most of specfile from http://www.creatis.insa-lyon.fr/vtk/
This page took 0.098333 seconds and 4 git commands to generate.