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

Revision 3827, 11.0 KB checked in by owa, 13 years ago (diff)

update: vtk-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%define tcl_ver %(echo "puts [info tclversion]" | %{_bindir}/tclsh)
6Summary: The Visualization Toolkit - A high level 3D visualization library
7Summary: The Visualization Toolkit - ハイレベル3D可視化ライブラリ
8Group: System Environment/Libraries
9Name: vtk
10Version: %{version}
11Release: 3%{?_dist_release}
12Source0: vtk-%{version}.tar.gz
13Source1: vtkdata-%{version}.tar.gz
14Patch2: vtk-5.2.1-boost-1.42.patch
15License: BSD style
16URL: http://www.vtk.org/
17BuildRequires: cmake >= 2.0.0
18BuildRequires: xorg-x11-devel, mesa-libGL-devel
19BuildRequires: expat-devel, zlib-devel
20BuildRequires: netcdf
21BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, freetype2-devel
22BuildRequires: tcl, tk, python, python-devel
23BuildRequires: qt4-devel
24BuildRequires: libboost-devel
25BuildRequires: libxml2-devel
26BuildRoot: %{_tmppath}/%{name}-%{version}-root
27Requires: cmake
28Requires: xorg-x11-libs, mesa-libGL
29Requires: expat, zlib
30Requires: netcdf
31Requires: libjpeg, libpng, libtiff, freetype2
32Obsoletes: %{name}-ruby < %{version}
33Distribution: Project Vine
34Vendor: Vine Linux
35Packager: owa
36
37%description
38VTK - the Visualization Toolkit is an object oriented, high
39level library that allows one to easily write C++ programs, Tcl,
40Python and Java scripts that do 3D visualization.  This package
41provides the shared libraries needed to run C++ programs that use VTK.
42To compile C++ code that uses VTK you have to install vtk-devel.
43
44VTK enables users to concentrate on their work by providing a
45large number of excellent and feature packed high level functions that
46do visualization.  The library needs OpenGL to render the graphics and
47for Linux machines Mesa is necessary. The terms/copyright can be read
48in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
49information about using vtk, getting documentataion or help and
50instructions on building VTK. This package is relocatable.
51
52%package devel
53Summary: VTK header files for building C++ code.
54Group: Development/Libraries
55Requires: %{name} = %{version}-%{release}
56
57%description devel
58This provides the VTK header files required to compile C++
59programs that use VTK to do 3D visualisation.
60
61
62%package tcl
63Summary: Tcl bindings for VTK.
64Group: Applications/Engineering
65Requires: %{name} = %{version}-%{release}
66Requires: tcl
67
68%description tcl
69VTK - the Visualization Toolkit is an object oriented, high level
70library that allows one to easily write C++ programs, Tcl, Python and Java
71scripts that do 3D visualization.  This package provides the shared
72libraries that enable one to use VTK via Tcl scripts.  This version also
73provides the vtkTkRenderWindow class. This package does not require the vtk
74package to be installed.  The library needs OpenGL to render the graphics and
75for Linux machines Mesa is necessary.
76
77The terms/copyright can be read in
78/usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
79information about using vtk, getting documentation or help and instructions on
80building VTK. This package is relocatable.
81
82
83%package python
84Summary: Python bindings for VTK.
85Group: Applications/Engineering
86Requires: %{name} = %{version}-%{release}
87Requires: python
88
89%description python
90This provides the shared libraries that enable one to use VTK from
91python scripts.  You will need python and vtk installed to use this.
92Remember to set your PYTHONPATH variable properly before running your
93scripts.
94
95
96%package qt
97Summary: QT VTK widget
98Group: System Environment/Libraries
99Requires: %{name} = %{version}-%{release}
100Requires: qt
101
102%description qt
103The vtkQt classes combine VTK and Qt(TM) for X11.
104
105
106%package examples
107Summary: C++, Tcl and Python example programs/scripts for VTK.
108Group: Development/Libraries
109Requires: %{name} = %{version}-%{release}
110
111%description examples
112This package contains all the examples from the VTK source.
113To compile the C++ examples you will need to install the vtk-devel
114package as well. The Python and Tcl examples can be run with the
115corresponding packages (vtk-python, vtk-tcl).
116
117
118%package testing-progs
119Summary: Tests programs for VTK.
120Group: Development/Libraries
121Requires: %{name} = %{version}-%{release}
122
123%description testing-progs
124This package contains all testing programs from the VTK
125source. The source code of these programs can be found in the
126vtk-examples package.
127
128
129%package data
130Summary: Data for VTK.
131Group: Development/Libraries
132Requires: %{name} = %{version}-%{release}
133Prefix: /usr
134
135%description data
136This package contains all the data from the VTKData repository.
137These data are required to run various examples from the examples package.
138
139
140%prep
141%setup -q -n VTK
142%patch2 -p1 -b .boost-1.42
143
144# fix data path
145find . -type f | xargs sed -i -e 's|../../../../VTKData|%{vtkdata_dir}|g'
146
147
148%build
149## This section wad fixed reference to Mandriva package
150# Remove old cmake files
151rm -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 \
188        -DTCL_LIBRARY:FILEPATH=%{_libdir}/libtcl%{tcl_ver}.so\
189        -DTK_LIBRARY:FILEPATH=%{_libdir}/libtk%{tcl_ver}.so\
190        ;
191
192## don't use _smp_mflags
193##%__make %{?_smp_mflags}
194%__make
195
196
197%install
198rm -rf $RPM_BUILD_ROOT
199%makeinstall DESTDIR=$RPM_BUILD_ROOT
200
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
206mv $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/
207
208rm -f bin/*.so*
209install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
210rm -rf doc
211for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets
212do
213        install -d -m 755 doc/Testing/$d
214        cp -a $d/Testing/* doc/Testing/$d
215done
216
217cp -a Examples doc
218find doc -name "*.o" -exec rm {} \;
219find doc -name CMakeCache.txt -exec rm {} \;
220find doc -name Makefile -exec rm {} \;
221find doc -name DartTestfile.txt -exec rm {} \;
222find doc -name .NoDartCoverage -exec rm {} \;
223find doc -name "cmake.*" -exec rm {} \;
224
225echo "%defattr (-, root, root)" > testing-progs-list
226find ${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
231tar zxvf %{SOURCE1}
232install -d $RPM_BUILD_ROOT%{_datadir}
233cp -r VTKData $RPM_BUILD_ROOT/%{vtkdata_dir}
234
235# Remove any possible verdict docs
236rm -rf %buildroot/%{_libdir}/vtk-%{vtkver}/doc
237
238
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
247rm -rf $RPM_BUILD_ROOT
248
249%files
250%defattr(-,root,root)
251%doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg
252%{_libdir}/*.so.*
253
254%files devel
255%defattr(-,root,root)
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
263%{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so
264
265
266%files tcl
267%defattr(-,root,root)
268%dir %{_libdir}/vtk-%{vtkver}/testing
269%{_bindir}/vtk
270%{_bindir}/vtkWrapTcl
271%{_bindir}/vtkWrapTclInit
272%{_libdir}/libvtk*TCL.so.*
273%{_libdir}/vtk-%{vtkver}/tcl/
274%{_libdir}/vtk-%{vtkver}/testing/*tcl
275%{_libdir}/vtk-%{vtkver}/pkgIndex.tcl
276
277
278%files python
279%defattr(-,root,root)
280%{_bindir}/vtkpython
281%{_bindir}/vtkWrapPython
282%{_bindir}/vtkWrapPythonInit
283%{_libdir}/libvtk*Python*.so.*
284%{_libdir}/python%{pyver}/site-packages/*
285%{_libdir}/vtk-%{vtkver}/testing/*py
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)
304%{vtkdata_dir}
305
306
307%changelog
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
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
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
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
Note: See TracBrowser for help on using the repository browser.