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

Revision 521, 13.2 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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