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

Revision 3820, 10.9 KB checked in by owa, 13 years ago (diff)

rebuilt: vtk

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: 2%{?_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: qt-devel
24BuildRequires: libboost-devel
25BuildRoot: %{_tmppath}/%{name}-%{version}-root
26Requires: cmake
27Requires: xorg-x11-libs, mesa-libGL
28Requires: expat, zlib
29Requires: netcdf
30Requires: libjpeg, libpng, libtiff, freetype2
31Obsoletes: %{name}-ruby < %{version}
32Distribution: Project Vine
33Vendor: Vine Linux
34Packager: owa
35
36%description
37VTK - the Visualization Toolkit is an object oriented, high
38level library that allows one to easily write C++ programs, Tcl,
39Python and Java scripts that do 3D visualization.  This package
40provides the shared libraries needed to run C++ programs that use VTK.
41To compile C++ code that uses VTK you have to install vtk-devel.
42
43VTK enables users to concentrate on their work by providing a
44large number of excellent and feature packed high level functions that
45do visualization.  The library needs OpenGL to render the graphics and
46for Linux machines Mesa is necessary. The terms/copyright can be read
47in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
48information about using vtk, getting documentataion or help and
49instructions on building VTK. This package is relocatable.
50
51%package devel
52Summary: VTK header files for building C++ code.
53Group: Development/Libraries
54Requires: %{name} = %{version}-%{release}
55
56%description devel
57This provides the VTK header files required to compile C++
58programs that use VTK to do 3D visualisation.
59
60
61%package tcl
62Summary: Tcl bindings for VTK.
63Group: Applications/Engineering
64Requires: %{name} = %{version}-%{release}
65Requires: tcl
66
67%description tcl
68VTK - the Visualization Toolkit is an object oriented, high level
69library that allows one to easily write C++ programs, Tcl, Python and Java
70scripts that do 3D visualization.  This package provides the shared
71libraries that enable one to use VTK via Tcl scripts.  This version also
72provides the vtkTkRenderWindow class. This package does not require the vtk
73package to be installed.  The library needs OpenGL to render the graphics and
74for Linux machines Mesa is necessary.
75
76The terms/copyright can be read in
77/usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
78information about using vtk, getting documentation or help and instructions on
79building VTK. This package is relocatable.
80
81
82%package python
83Summary: Python bindings for VTK.
84Group: Applications/Engineering
85Requires: %{name} = %{version}-%{release}
86Requires: python
87
88%description python
89This provides the shared libraries that enable one to use VTK from
90python scripts.  You will need python and vtk installed to use this.
91Remember to set your PYTHONPATH variable properly before running your
92scripts.
93
94
95%package qt
96Summary: QT VTK widget
97Group: System Environment/Libraries
98Requires: %{name} = %{version}-%{release}
99Requires: qt
100
101%description qt
102The vtkQt classes combine VTK and Qt(TM) for X11.
103
104
105%package examples
106Summary: C++, Tcl and Python example programs/scripts for VTK.
107Group: Development/Libraries
108Requires: %{name} = %{version}-%{release}
109
110%description examples
111This package contains all the examples from the VTK source.
112To compile the C++ examples you will need to install the vtk-devel
113package as well. The Python and Tcl examples can be run with the
114corresponding packages (vtk-python, vtk-tcl).
115
116
117%package testing-progs
118Summary: Tests programs for VTK.
119Group: Development/Libraries
120Requires: %{name} = %{version}-%{release}
121
122%description testing-progs
123This package contains all testing programs from the VTK
124source. The source code of these programs can be found in the
125vtk-examples package.
126
127
128%package data
129Summary: Data for VTK.
130Group: Development/Libraries
131Requires: %{name} = %{version}-%{release}
132Prefix: /usr
133
134%description data
135This package contains all the data from the VTKData repository.
136These data are required to run various examples from the examples package.
137
138
139%prep
140%setup -q -n VTK
141%patch2 -p1 -b .boost-1.42
142
143# fix data path
144find . -type f | xargs sed -i -e 's|../../../../VTKData|%{vtkdata_dir}|g'
145
146
147%build
148## This section wad fixed reference to Mandriva package
149# Remove old cmake files
150rm -f CMake/FindBoost*
151
152# Due to cmake prefix point already for _prefix, we need
153# push only the necessary extra paths
154%cmake \
155        -DVTK_INSTALL_BIN_DIR:PATH=/bin \
156        -DVTK_INSTALL_PACKAGE_DIR=/%{_lib}/vtk-%{vtkver} \
157        -DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk-%{vtkver} \
158        -DVTK_PYTHON_MODULE_PLATFORM_INSTALL_DIR=/%{_lib}/pyhton%{pyver}/site-packages \
159        -DVTK_DATA_ROOT:PATH=/share/vtk-%{vtkver} \
160        \
161        -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \
162        -DVTK_WRAP_PYTHON:BOOL=ON \
163        -DVTK_WRAP_JAVA:BOOL=OFF \
164        -DVTK_WRAP_TCL:BOOL=ON \
165        -DVTK_USE_RENDERING:BOOL=ON \
166        -DDESIRED_QT_VERSION=4 \
167        -DBUILD_DOCUMENTATION:BOOL=OFF \
168        -DBUILD_EXAMPLES:BOOL=ON \
169        -DBUILD_SHARED_LIBS:BOOL=ON \
170        -DBUILD_TESTING:BOOL=ON \
171        -DVTK_USE_SYSTEM_EXPAT=ON \
172        -DVTK_USE_SYSTEM_JPEG=ON \
173        -DVTK_USE_SYSTEM_PNG=ON \
174        -DVTK_USE_SYSTEM_TIFF=ON \
175        -DVTK_USE_SYSTEM_ZLIB=ON \
176        -DVTK_USE_SYSTEM_FREETYPE=ON \
177        -DVTK_USE_ANSI_STDLIB:BOOL=ON \
178        -DVTK_USE_PARALLEL:BOOL=ON \
179        -DVTK_USE_GUISUPPORT:BOOL=ON \
180        -DVTK_USE_QVTK=ON \
181        -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=%{_prefix} --root=%{buildroot}" \
182        -DVTK_INSTALL_QT_PLUGIN_DIR=%{qt_designer_plugins_dir} \
183        -DVTK_USE_GL2PS:BOOL=ON \
184        -DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
185        -DVTK_USE_QVTK_QTOPENGL:BOOL=ON \
186        -DVTK_USE_BOOST:BOOL=ON \
187        -DTCL_LIBRARY:FILEPATH=%{_libdir}/libtcl%{tcl_ver}.so\
188        -DTK_LIBRARY:FILEPATH=%{_libdir}/libtk%{tcl_ver}.so\
189        ;
190
191## don't use _smp_mflags
192##%__make %{?_smp_mflags}
193%__make
194
195
196%install
197rm -rf $RPM_BUILD_ROOT
198%makeinstall DESTDIR=$RPM_BUILD_ROOT
199
200%if %{_lib} == lib64
201        mkdir -p $RPM_BUILD_ROOT%{_libdir}
202        mv $RPM_BUILD_ROOT%{_prefix}/lib/python%{pyver} $RPM_BUILD_ROOT%{_libdir}/
203        mv $RPM_BUILD_ROOT%{_prefix}/lib/vtk-%{vtkver}/* $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/
204%endif
205mv $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/
206
207rm -f bin/*.so*
208install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
209rm -rf doc
210for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets
211do
212        install -d -m 755 doc/Testing/$d
213        cp -a $d/Testing/* doc/Testing/$d
214done
215
216cp -a Examples doc
217find doc -name "*.o" -exec rm {} \;
218find doc -name CMakeCache.txt -exec rm {} \;
219find doc -name Makefile -exec rm {} \;
220find doc -name DartTestfile.txt -exec rm {} \;
221find doc -name .NoDartCoverage -exec rm {} \;
222find doc -name "cmake.*" -exec rm {} \;
223
224echo "%defattr (-, root, root)" > testing-progs-list
225find ${RPM_BUILD_ROOT}%{_bindir} -type f | \
226        sed -e "s#^${RPM_BUILD_ROOT}##g" | \
227        egrep -v '^%{_bindir}/(vtk|pvtk|vtkWrap.*|vtkParseJava|VTKJavaExecutable|vtkpython|pvtkpython)$' \
228        >> testing-progs-list
229
230tar zxvf %{SOURCE1}
231install -d $RPM_BUILD_ROOT%{_datadir}
232cp -r VTKData $RPM_BUILD_ROOT/%{vtkdata_dir}
233
234# Remove any possible verdict docs
235rm -rf %buildroot/%{_libdir}/vtk-%{vtkver}/doc
236
237
238%post -p /sbin/ldconfig
239%post tcl -p /sbin/ldconfig
240%post python -p /sbin/ldconfig
241%post qt -p /sbin/ldconfig
242%postun -p /sbin/ldconfig
243%postun tcl -p /sbin/ldconfig
244%postun python -p /sbin/ldconfig
245%clean
246rm -rf $RPM_BUILD_ROOT
247
248%files
249%defattr(-,root,root)
250%doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg
251%{_libdir}/*.so.*
252
253%files devel
254%defattr(-,root,root)
255%doc Utilities/Upgrading
256%doc %{_libdir}/vtk-%{vtkver}/doxygen
257%{_includedir}/vtk-%{vtkver}/
258%{_libdir}/*.so
259%{_libdir}/vtk-%{vtkver}/CMake/
260%{_libdir}/vtk-%{vtkver}/*.cmake
261%{_libdir}/vtk-%{vtkver}/hints
262%{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so
263
264
265%files tcl
266%defattr(-,root,root)
267%dir %{_libdir}/vtk-%{vtkver}/testing
268%{_bindir}/vtk
269%{_bindir}/vtkWrapTcl
270%{_bindir}/vtkWrapTclInit
271%{_libdir}/libvtk*TCL.so.*
272%{_libdir}/vtk-%{vtkver}/tcl/
273%{_libdir}/vtk-%{vtkver}/testing/*tcl
274%{_libdir}/vtk-%{vtkver}/pkgIndex.tcl
275
276
277%files python
278%defattr(-,root,root)
279%{_bindir}/vtkpython
280%{_bindir}/vtkWrapPython
281%{_bindir}/vtkWrapPythonInit
282%{_libdir}/libvtk*Python*.so.*
283%{_libdir}/python%{pyver}/site-packages/*
284%{_libdir}/vtk-%{vtkver}/testing/*py
285
286
287%files qt
288%defattr(-,root,root)
289%{_libdir}/libQVTK.so.*
290
291
292%files examples
293%defattr(-,root,root)
294%doc doc/Examples/
295%doc doc/Testing/
296
297
298%files testing-progs -f testing-progs-list
299
300
301%files data
302%defattr(-,root,root)
303%{vtkdata_dir}
304
305
306%changelog
307* Sun May 08 2011 Shu KONNO <owa@bg.wakwak.com> 5.4.2-2
308- remove _smp_mflags
309- added tcl_ver macro
310- added TCL_LIBRARY, TK_LIBRARY to cmake
311
312* Tue May 04 2010 Shu KONNO <owa@bg.wakwak.com> 5.4.2-1
313- updated vtk to 5.4.2
314- updated vtkdata to 5.4.2
315- added Obsoletes: %%{name}-ruby < 5.4.2
316- added Patch2: vtk-5.2.1-boost-1.42.patch (from Mandriva)
317- dropt Patch0: vtk-5.0-getsockname.patch
318- dropt Patch1: vtk-ruby-060915.patch
319
320* Thu Jul 31 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.4-1vl5
321- updated vtk to 5.0.4
322- updated vtkdata to 5.0.4
323- built with xorg-x11-devel, python-2.5
324- applied new versioning policy
325- spec in utf-8
326
327* Mon Feb 25 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 5.0.2-0vl6
328- rebuild with expat-2.0.1
329- add BuildPrereq: freetype2-devel and drop freetype-devel
330- add BuildPrereq: qt-devel
331- add Requires: freetype2 and drop freetype
332
333* Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl5
334- rebuild with tcl/tk-8.4.18
335
336* Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl4
337- rebuild with tcl/tk-8.4.16
338
339* Mon Aug 27 2007 Shu KONNO <owa@bg.wakwak.com> 5.0.2-0vl3
340- added %%define py_ver, py_dir
341- added %%{?_smp_mflags} to make
342- change for x86_64
343        - changed lib to %%{_lib}
344        - added VTK_INSTALL_LIB_DIR=PATH=/%{_lib} in cmake
345        - added --install-lib at VTK_PYTHON_SETUP_ARGS in cmake
346
347* Tue May 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 5.0.2-0vl2
348- rebuild with new environment/toolchain
349
350* Fri Sep 15 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.2-0vl1
351- new upstream
352- add ruby patch
353
354* Sat Jul 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.0.1-0vl1
355- new upstream
356- fixed spec file encoding
357- changed Group to System Environment/Libraries
358
359* Mon Feb 06 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 5.0.0-0vl1
360- source verion up
361
362* Tue Mar 29 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.4.2-0vl1
363- source verion up
364
365* Sun Mar 20 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 4.2.6-0vl1
366- initial build for Vine Linux
Note: See TracBrowser for help on using the repository browser.