]> git.pld-linux.org Git - packages/vtk.git/blame - vtk.spec
- new; saving work
[packages/vtk.git] / vtk.spec
CommitLineData
52d6c353
AG
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
9Summary: Toolkit for 3D computer graphics, image processing, and visualization
10Name: vtk
11Version: 4.2.2
12Release: 0.1
13License: BSD
14Group: Graphics
15Url: http://public.kitware.com/VTK/
16Source0: %{name}42Src.tar.bz2
17Source1: %{name}42Data.tar.bz2
18Patch0: %{name}-cmakefiles.patch
19BuildRequires: cmake
20BuildRequires: python-devel
21BuildRequires: tcl
22BuildRequires: XFree86-devel
23BuildRequires: doxygen
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27The Visualization ToolKit (VTK) is an object oriented software system for 3D
28computer graphics, image processing, and visualization. VTK includes a
29textbook, a C++ class library, and several interpreted interface layers
30including Tcl/Tk, Java, and Python. VTK supports a wide variety of
31visualization algorithms including scalar, vector, tensor, texture, and
32volumetric methods. It also supports advanced modeling techniques like
33implicit modeling, polygon reduction, mesh smoothing, cutting, contouring,
34and Delaunay triangulation. Moreover, dozens of imaging algorithms have been
35integrated into the system. This allows mixing 2D imaging / 3D graphics
36algorithms and data.
37
38NOTE: The java wrapper is not included by default. You may rebuild the srpm
39 using "--with java" with JDK installed.
40
41NOTE: All patented routines which are part of the package have been removed in
42 this version.
43
44%package devel
45Summary: VTK header files for building C++ code.
46Requires: vtk
47Provides: vtk
48Group: Development/C++
49
50%description devel
51This provides the VTK header files required to compile C++
52programs that use VTK to do 3D visualisation.
53
54%package tcl
55Summary: Tcl bindings for VTK.
56Group: System/Libraries
57Requires: vtk
58Provides: vtk
59
60%description tcl
61The Visualization ToolKit (VTK) is an object oriented software system for 3D
62computer graphics, image processing, and visualization. VTK includes a
63textbook, a C++ class library, and several interpreted interface layers
64including Tcl/Tk, Java, and Python. VTK supports a wide variety of
65visualization algorithms including scalar, vector, tensor, texture, and
66volumetric methods. It also supports advanced modeling techniques like
67implicit modeling, polygon reduction, mesh smoothing, cutting, contouring,
68and Delaunay triangulation. Moreover, dozens of imaging algorithms have been
69integrated into the system. This allows mixing 2D imaging / 3D graphics
70algorithms and data.
71
72This package contains tcl bindings for VTK.
73
74%package python
75Summary: Python bindings for VTK.
76Requires: vtk
77Provides: vtk
78Group: System/Libraries
79
80%description python
81The Visualization ToolKit (VTK) is an object oriented software system for 3D
82computer graphics, image processing, and visualization. VTK includes a
83textbook, a C++ class library, and several interpreted interface layers
84including Tcl/Tk, Java, and Python. VTK supports a wide variety of
85visualization algorithms including scalar, vector, tensor, texture, and
86volumetric methods. It also supports advanced modeling techniques like
87implicit modeling, polygon reduction, mesh smoothing, cutting, contouring,
88and Delaunay triangulation. Moreover, dozens of imaging algorithms have been
89integrated into the system. This allows mixing 2D imaging / 3D graphics
90algorithms and data.
91
92This package contains python bindings for VTK.
93
94%if %build_java
95%package java
96Summary: Java bindings for VTK.
97Group: Development/Java
98Requires: vtk
99Provides: vtk
100
101%description java
102The Visualization ToolKit (VTK) is an object oriented software system for 3D
103computer graphics, image processing, and visualization. VTK includes a
104textbook, a C++ class library, and several interpreted interface layers
105including Tcl/Tk, Java, and Python. VTK supports a wide variety of
106visualization algorithms including scalar, vector, tensor, texture, and
107volumetric methods. It also supports advanced modeling techniques like
108implicit modeling, polygon reduction, mesh smoothing, cutting, contouring,
109and Delaunay triangulation. Moreover, dozens of imaging algorithms have been
110integrated into the system. This allows mixing 2D imaging / 3D graphics
111algorithms and data.
112
113This package contains java bindings for VTK.
114
115%endif
116
117%package examples
118Summary: C++, Tcl and Python example programs/scripts for VTK.
119Group: Development/Other
120Requires: vtk-data
121Requires: vtk
122Provides: vtk
123
124%description examples
125This package contains all the examples from the VTK source.
126To compile the C++ examples you will need to install the vtk-devel
127package as well. The Python and Tcl examples can be run with the
128corresponding packages (vtk-python, vtk-tcl).
129
130%package test-suite
131Summary: Tests programs for VTK.
132Requires: vtk
133Provides: vtk
134Requires: vtk-data
135Group: Development/Other
136
137%description test-suite
138This package contains all testing programs from the VTK
139source. The source code of these programs can be found in the
140vtk-examples package.
141
142%package data
143Summary: Data files for VTK.
144Group: Development/Libraries
145
146%description data
147This package contains all the data from the VTKData repository.
148These data are required to run various examples from the examples package.
149
150%prep
151%setup -q -a 1 -n VTK-%version
152cd 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
210cmake \
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
246rm -rf $RPM_BUILD_ROOT
247
248#setup python
249export VTKPYTHONPATH=%(python -c"import os,sys; print os.path.join(sys.exec_prefix, 'lib', 'python' + sys.version[:3],'site-packages')")
250
251#install directories
252install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
253install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
254install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/gtk
255install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/qt
256install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/testing
257install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/tk
258install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/util
259install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk/wx
260install -d -m 755 $RPM_BUILD_ROOT/$VTKPYTHONPATH
261install -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
268chmod 755 $RPM_BUILD_ROOT%{_libdir}/vtk/*.so
269for f in $RPM_BUILD_ROOT%{_libdir}/vtk/libvtk*Python*.so
270do
271 ln -s ../`basename $f` $RPM_BUILD_ROOT%{_libdir}/vtk/python/
272done
273
274#install binaries
275install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
276
277#install python
278install -m 644 Wrapping/Python/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python
279install -m 644 Wrapping/Python/vtk/*.py $RPM_BUILD_ROOT%{_libdir}/vtk/python/vtk
280install -m 644 Wrapping/Python/vtk/gtk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/gtk
281install -m 644 Wrapping/Python/vtk/qt/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/qt
282install -m 644 Wrapping/Python/vtk/tk/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/tk
283install -m 644 Wrapping/Python/vtk/util/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/util
284install -m 644 Wrapping/Python/vtk/wx/*.py $RPM_BUILD_ROOT/usr/lib/vtk/python/vtk/wx
285cat > $RPM_BUILD_ROOT/$VTKPYTHONPATH/vtkpython.pth <<_EOF
286%{_libdir}/vtk/python
287_EOF
288
289%if %build_java
290#install java
291install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/vtk/java
292install -m 644 lib/vtk.jar $RPM_BUILD_ROOT/usr/lib/vtk/java
293install -m 644 java/vtk/*.java $RPM_BUILD_ROOT%{_libdir}/vtk/java
294%endif
295
296#install data
297mkdir -p $RPM_BUILD_ROOT/%_datadir/%name-data
298cp -r VTKData-release-4-2/* $RPM_BUILD_ROOT/%_datadir/%name-data
299rm -fr $RPM_BUILD_ROOT/%_datadir/%name-data/CVS
300
301#install test-suite and examples
302for d in Common Filtering Graphics Hybrid IO Imaging Parallel Patented Rendering
303do
304 mkdir -p $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
305 cp -a $d/Testing/* $RPM_BUILD_ROOT/%_datadir/vtk-examples/Testing/$d
306done
307cp -a Examples $RPM_BUILD_ROOT/%_datadir/vtk-examples
308
309# get rid of unwanted files
310find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "*.o" -exec rm {} \;
311find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name CMakeCache.txt -exec rm {} \;
312find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name Makefile -exec rm {} \;
313find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name DartTestfile.txt -exec rm {} \;
314find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name .NoDartCoverage -exec rm {} \;
315find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "CMake*" -exec rm {} \;
316find $RPM_BUILD_ROOT/%_datadir/vtk-examples -name "cmake.*" -exec rm {} \;
317
318# Generate the package testing-progs lists and store them in file-lists
319echo "%defattr (-, root, root)" > testing-progs-list
320%if %build_java
321find ${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
326find ${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
421rm -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.146595 seconds and 4 git commands to generate.