File: vtk.nightly.spec.in

package info (click to toggle)
vtk 5.0.4-1.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 51,084 kB
  • ctags: 70,426
  • sloc: cpp: 524,166; ansic: 220,276; tcl: 43,377; python: 14,037; perl: 3,102; java: 1,436; yacc: 1,033; sh: 339; lex: 248; makefile: 197; asm: 154
file content (327 lines) | stat: -rw-r--r-- 12,368 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk
Version: 3.1
Release: @BUILD@N
Copyright: Distributable
Group: Development/Libraries
Source: ftp://vtk.scorec.rpi.edu/pub/vtk.tar.gz
URL: http://www.kitware.com/vtk.html
Patch: vtk-linux.patch
#BuildPrereq: jdk, tk, python, python-devel, tcl
BuildPrereq: tk, python, python-devel, tcl

Buildroot: /usr/src/local/BUILD/vtk-root
Prefix: /usr

%description 
	VTK - the Visualization Toolkit is an object oriented, high
level library that allows one to easily write C++ programs, Tcl,
Python and Java scripts that do 3D visualization.  This package
provides the shared libraries needed to run C++ programs that use VTK.
The patented and contributed classes are also compiled. To compile
C++ code that uses VTK you have to install vtk-devel.

	VTK enables users to concentrate on their work by providing a
large number of excellent and feature packed high level functions that
do visualization.  The library needs OpenGL to render the graphics and
for Linux machines Mesa is necessary. The terms/copyright can be read
in /usr/doc/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
information about using vtk, getting documentataion or help and
instructions on building VTK. The patented classes (few in number) are
not to be used commercially. Please read the files README.patented-dir
and README.patented-classes. This package is relocatable.

%changelog
* Thu Dec 1 2000 Daniel Blezek <blezek@crd.ge.com>
- Moved from /usr/local to /usr
- Checking into CVS
* Thu Nov 23 2000 David Gobbi <dgobbi@irus.rri.on.ca>
- put vtkpython.pth in /usr/lib/pythonX.X/site-packages
- changed prefix to /usr/local, set INSTALL_ROOT to RPM_BUILD_ROOT
- added /sbin/ldconfig to %post/%postun for each of tcl, python, java
* Wed Jul 12 2000 Daniel Blezek <blezek@crd.ge.com>: Removing the need for a patch by changing user.make
* Wed Dec 8 1999 Daniel Blezek <blezek@crd.ge.com>: adapted Aleksey's spec file to nightly releases
* Wed Oct 20 1999 Aleksey Nogin <ayn2@cornell.edu>
[vtk-2.4-1]
- Upgraded to vtk-2.4
- Made the SRPM a little more portable by removing Prabhu's "hardwired" paths
- Added tk sources to SRPM so that we do have access to tk header files.

* Fri Mar 26 1999 Prabhu Ramachandran <prabhu@aero.iitm.ernet.in>
- I am the current maintainer

# vtk-devel

%package devel
Summary: VTK header files for building C++ code.
Requires: vtk
Group: Development/Libraries
Prefix: /usr

%description devel 
	This provides the VTK header files required to compile C++
programs that use VTK to do 3D visualisation.

# vtk-tcl

%package tcl
Summary: Tcl bindings for VTK.
Group: X11/Libraries
Prefix: /usr
# Requires: tk = %{tk_version}

%description tcl
	VTK - the Visualization Toolkit is an object oriented, high level
library that allows one to easily write C++ programs, Tcl, Python and Java
scripts that do 3D visualization.  This package provides the shared
libraries that enable one to use VTK via Tcl scripts.  This version also
provides the vtkTkRenderWindow class. The patented and contributed classes
are also compiled. This package does not require the vtk package to be
installed.  The library needs OpenGL to render the graphics and for Linux
machines Mesa is necessary. 

	The terms/copyright can be read in usr/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has information about using vtk, getting
documentataion or help and instructions on building VTK. The patented
classes (few in number) are not to be used commercially. Please read the
files README.patented-dir and README.patented-classes. This package is
relocatable.

# vtk-python

%package python
Summary: Python bindings for VTK.
Requires: vtk
Group: X11/Libraries
Prefix: /usr

%description python 
	This provides the shared libraries that enable one to use VTK from
python scripts.  You will need python and vtk installed to use this.
Remember to set your PYTHONPATH variable properly before running your
scripts.

# vtk-java
 
%package java
Summary: Java bindings for VTK.
Group: X11/Libraries
Prefix: /usr

%description java
	VTK - the Visualization Toolkit is an object oriented, high level
library that allows one to easily write C++ programs, Tcl, Python and Java
scripts that do 3D visualization.  This package provides the shared
libraries that enable one to use VTK with java scripts.  The patented and
contributed classes are also compiled.  This package does not require the
vtk package to be installed.  The library needs OpenGL to render the
graphics and for Linux machines Mesa is necessary.  You will need jdk..
jdk-1.2pre-2 was used to compile this. Remember to set your CLASSPATH to the
directory that has the java classes.  

	The terms/copyright can be read in usr/doc/vtk-java-%{version}-%{release}/README and
README.html. VTK-Linux-HOWTO has information about using vtk, getting
documentataion or help and instructions on building VTK. The patented
classes (few in number) are not to be used commercially. Please read the
files README.patented-dir and README.patented-classes. This package is
relocatable.

# vtk-examples

%package examples
Summary: C++, Tcl and Python example programs/scripts for VTK.
Group: Development/Libraries
Prefix: /usr

%description examples
	This package contains all the examples from the VTK source.
To compile the C++ examples you will need to install the vtk-devel
package as well. The Python and Tcl examples can be run with the
corresponding packages (vtk-python, vtk-tcl).


%prep

%setup -n vtk -q
%patch -p1

%build

export CLASSPATH=.:/usr/local/jdk1.2.2:`pwd`/java/classes:`pwd`/java:`pwd`/java/vtk
export PATH=/usr/local/jdk1.2.2/bin:$PATH
export LD_LIBRARY_PATH=`pwd`/common:`pwd`/graphics:`pwd`/patented:`pwd`/imaging:`pwd`/contrib:`pwd`/java 

# Can't build with Mesa, Threads and Java, so dropping Java
# ./configure --with-mesa --with-shared --with-tcl --with-tkwidget --with-python --with-java --with-contrib --with-patented --prefix=/usr

export CC=cc
export CXX=g++

./configure --with-java --with-shared --with-tcl --with-tkwidget --with-python --with-contrib --with-patented --prefix=/usr

# Setup dir for java compiled classes
mkdir -p `pwd`/java/classes

export VTK_HOMEDIR=`pwd`
# export MAKE='make -j 2'
make -j 2
# make

%install

# chmod 644 README
cp ./patented/README ./README.patented-dir
echo -e "A list of the patented classes.\n\n" > README.patented-classes
ls ./patented/*.h >> README.patented-classes

rm -rf $RPM_BUILD_ROOT

#creating all the directories
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_BIN_DIR@
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/{contrib/examplesTcl,examplesTcl/frog}
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examples{Cxx,Tcl/RenderMan/Shaders,Python}
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/imaging/examples{,Cxx,Tcl}
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/patented/examplesTcl
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/java/vtk
install -d $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@

# this installs the libs and the vtk tcl interpretor

make INSTALL_ROOT=$RPM_BUILD_ROOT install
# make prefix=/usr install

#stripping all the shared libraries and the vtk interpreter
strip $RPM_BUILD_ROOT/usr@VTK_INSTALL_BIN_DIR@/vtk
strip $RPM_BUILD_ROOT/usr/lib/lib*

# this installs all the header files.
install -m 644 ./common/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@
install -m 644 ./contrib/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@
install -m 644 ./wrap/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@
install -m 644 ./graphics/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@
install -m 644 ./imaging/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@
install -m 644 ./patented/*.h $RPM_BUILD_ROOT/usr@VTK_INSTALL_INCLUDE_DIR@

#installing all the examples...

install  -m 644 ./contrib/examplesTcl/*.tcl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/contrib/examplesTcl/

install  -m 644 ./examplesTcl/*.tcl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/examplesTcl/

install  -m 644 ./examplesTcl/frog/*.tcl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/examplesTcl/frog

install  -m 644 ./graphics/examplesCxx/*.cxx $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesCxx/
install  -m 644 ./graphics/examplesCxx/Makefile* $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesCxx/
install  -m 644 ./graphics/examplesPython/*.py $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesPython/
install  -m 644 ./graphics/examplesTcl/{*.tcl,*.ppm} $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesTcl/
install  -m 644 ./graphics/examplesTcl/RenderMan/{*.so,*.tcl} $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesTcl/RenderMan/
install  -m 644 ./graphics/examplesTcl/RenderMan/Shaders/*.sl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/graphics/examplesTcl/RenderMan/Shaders

# install  -m 644 ./imaging/examples/* $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/imaging/examples/
install  -m 644 ./imaging/examplesTcl/*.tcl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/imaging/examplesTcl/
install  -m 644 ./imaging/examplesCxx/*.cxx $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/imaging/examplesCxx/

install  -m 644 ./patented/examplesTcl/*.tcl $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/patented/examplesTcl/

# installing java classes

install  -m 644 ./java/vtk.jar $RPM_BUILD_ROOT/usr@VTK_INSTALL_LIB_DIR@/

%post
# Check for /usr/lib in /etc/ld.so.conf...
if grep "/usr/lib" /etc/ld.so.conf > /dev/null
then
	true
else
	echo "/usr/lib" >> /etc/ld.so.conf
fi
/sbin/ldconfig

%post tcl
/sbin/ldconfig

%post python
/sbin/ldconfig

%post java
/sbin/ldconfig


%postun
/sbin/ldconfig

%postun tcl
/sbin/ldconfig

%postun python
/sbin/ldconfig

%postun java
/sbin/ldconfig



%files
%attr(755, root, root) /usr/lib/libVTKCommon.so 
%attr(755, root, root) /usr/lib/libVTKContrib.so
%attr(755, root, root) /usr/lib/libVTKGraphics.so 
%attr(755, root, root) /usr/lib/libVTKImaging.so
%attr(755, root, root) /usr/lib/libVTKPatented.so

%attr(-, root, root) %doc README.html VTK-Linux-HOWTO README.patented-dir 
# %attr(644, root, root) %doc README.patented-classes README vtkLogo.jpg
%attr(644, root, root) %doc README.patented-classes vtkLogo.jpg

%files devel
%attr(644, root, root) /usr@VTK_INSTALL_INCLUDE_DIR@/

%files tcl
%attr(755, root, root) /usr/lib/libVTKCommonTcl.so 
%attr(755, root, root) /usr/lib/libVTKContribTcl.so
%attr(755, root, root) /usr/lib/libVTKGraphicsTcl.so 
%attr(755, root, root) /usr/lib/libVTKImagingTcl.so
%attr(755, root, root) /usr/lib/libVTKPatentedTcl.so
%attr(755, root, root) /usr@VTK_INSTALL_BIN_DIR@/vtk

%attr(-, root, root) %doc README.html VTK-Linux-HOWTO README.patented-dir 
# %attr(644, root, root) %doc README.patented-classes README vtkLogo.jpg
%attr(644, root, root) %doc README.patented-classes vtkLogo.jpg


%files python
%attr(755, root, root) /usr/lib/libVTKCommonPython.so 
%attr(755, root, root) /usr/lib/libVTKContribPython.so
%attr(755, root, root) /usr/lib/libVTKGraphicsPython.so 
%attr(755, root, root) /usr/lib/libVTKImagingPython.so
%attr(755, root, root) /usr/lib/libVTKPatentedPython.so
%attr(755, root, root) /usr@VTK_INSTALL_LIB_DIR@TkRenderWidget
%attr(755, root, root) /usr@VTK_INSTALL_LIB_DIR@TkImageWindowWidget
%attr(755, root, root) /usr@VTK_INSTALL_LIB_DIR@TkImageViewerWidget
%attr(-, root, root)   /usr@VTK_INSTALL_LIB_DIR@/python/
%attr(644, root, root) %(python -c "import sys, os; print os.path.join(sys.prefix,'lib','python'+sys.version[0:3],'site-packages','vtkpython.pth')")


%files java
%attr(755, root, root) /usr/lib/libVTKCommonJava.so 
%attr(755, root, root) /usr/lib/libVTKContribJava.so
%attr(755, root, root) /usr/lib/libVTKGraphicsJava.so 
%attr(755, root, root) /usr/lib/libVTKImagingJava.so
%attr(755, root, root) /usr/lib/libVTKPatentedJava.so
%attr(755, root, root) /usr/lib/libvtkJava.so
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@.jar

# 
# %attr(-, root, root) %doc README.html VTK-Linux-HOWTO README.patented-dir 
# %attr(644, root, root) %doc README.patented-classes README vtkLogo.jpg


%files examples
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@/contrib
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@/examplesTcl
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@/graphics
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@/imaging
%attr(-, root, root) /usr@VTK_INSTALL_LIB_DIR@/patented


%clean 
rm -rf $RPM_BUILD_ROOT