1 |
%define testver 249 |
2 |
%define relver 249 |
3 |
%define name blender |
4 |
%define truename blender |
5 |
%define kde3altpath /opt/kde3 |
6 |
|
7 |
%define svndate 20090918 |
8 |
%define svnrel r23322 |
9 |
|
10 |
%define build_svn 0 |
11 |
%{?_with_svn: %{expand: %%global build_svn 1}} |
12 |
%{?_without_svn: %{expand: %%global build_svn 0}} |
13 |
|
14 |
%define build_debug 0 |
15 |
%{?_with_debug: %{expand: %%global build_debug 1}} |
16 |
%{?_without_debug: %{expand: %%global build_debug 0}} |
17 |
|
18 |
%define build_fullopt 1 |
19 |
%{?_with_fullopt: %{expand: %%global build_fullopt 1}} |
20 |
%{?_without_fullopt: %{expand: %%global build_fullopt 0}} |
21 |
|
22 |
%define build_profiling 0 |
23 |
%{?_with_profiling: %{expand: %%global build_profiling 1}} |
24 |
%{?_without_profiling: %{expand: %%global build_profiling 0}} |
25 |
|
26 |
%define build_systembullet 0 |
27 |
%{?_with_systembullet: %{expand: %%global build_systembullet 1}} |
28 |
%{?_without_systembullet: %{expand: %%global build_systembullet 0}} |
29 |
|
30 |
%define build_systemffmpeg 0 |
31 |
%{?_with_systemffmpeg: %{expand: %%global build_systemffmpeg 1}} |
32 |
%{?_without_systemffmpeg: %{expand: %%global build_systemffmpeg 0}} |
33 |
|
34 |
%define build_verse 1 |
35 |
%{?_with_verse: %{expand: %%global build_verse 1}} |
36 |
%{?_without_verse: %{expand: %%global build_verse 0}} |
37 |
|
38 |
%define build_gameeng 1 |
39 |
%{?_with_gameeng: %{expand: %%global build_gameeng 1}} |
40 |
%{?_without_gameeng: %{expand: %%global build_gameeng 0}} |
41 |
|
42 |
%define build_player 1 |
43 |
%{?_with_player: %{expand: %%global build_player 1}} |
44 |
%{?_without_player: %{expand: %%global build_player 0}} |
45 |
|
46 |
%define build_ogg 1 |
47 |
%{?_with_ogg: %{expand: %%global build_ogg 1}} |
48 |
%{?_without_ogg: %{expand: %%global build_ogg 0}} |
49 |
|
50 |
%define use_smp 1 |
51 |
%{?_with_smp: %global use_smp 1} |
52 |
%{?_without_smp: %global use_smp 0} |
53 |
|
54 |
%define use_protector 0 |
55 |
%{?_with_protector: %global use_protector 1} |
56 |
%{?_without_protector: %global use_protector 0} |
57 |
|
58 |
%define no_protector 0 |
59 |
%{?_with_noprotector: %global no_protector 1} |
60 |
%{?_without_noprotector: %global no_protector 0} |
61 |
|
62 |
%define avoid_dunno_patent 1 |
63 |
%{?_with_avoidpatent: %global avoid_dunno_patent 1} |
64 |
%{?_without_avoidpatent: %global avoid_dunno_patent 0} |
65 |
|
66 |
%if "%{?distro_section}" == "tainted" |
67 |
%define avoid_dunno_patent 0 |
68 |
%endif |
69 |
|
70 |
%if %{use_smp} |
71 |
%define scons_smp --debug=time -j %(expr $(getconf _NPROCESSORS_ONLN) + 2) |
72 |
%else |
73 |
%define scons_smp %{nil} |
74 |
%endif |
75 |
|
76 |
%if %{use_protector} |
77 |
%define protector_flags -fstack-protector -fstack-protector-all --param=ssp-buffer-size=1 |
78 |
%else |
79 |
%define protector_flags %{nil} |
80 |
%endif |
81 |
|
82 |
%if %{no_protector} |
83 |
%define protector_flags -fno-stack-protector |
84 |
%else |
85 |
%define protector_flags %{nil} |
86 |
%endif |
87 |
|
88 |
%if %{build_profiling} |
89 |
%define profiling_flags -Wall -g -pg |
90 |
%else |
91 |
%define profiling_flags %{nil} |
92 |
%endif |
93 |
|
94 |
%if %{build_systemffmpeg} |
95 |
%define ffmpeg_source '/usr' |
96 |
%define ffmpeg_lib 'avformat avcodec swscale avutil avdevice' |
97 |
%else |
98 |
%define ffmpeg_source '\#extern/ffmpeg' |
99 |
%define ffmpeg_lib '' |
100 |
%endif |
101 |
|
102 |
%if %{build_verse} |
103 |
%define verse_bool 'true' |
104 |
%else |
105 |
%define verse_bool 'false' |
106 |
%endif |
107 |
|
108 |
%if %{build_gameeng} |
109 |
%define gameeng_bool 'true' |
110 |
%else |
111 |
%define gameeng_bool 'false' |
112 |
%endif |
113 |
|
114 |
%if %{build_player} |
115 |
%define player_bool 'true' |
116 |
%else |
117 |
%define player_bool 'false' |
118 |
%endif |
119 |
|
120 |
%if %{build_ogg} |
121 |
%define ogg_bool 'true' |
122 |
%else |
123 |
%define ogg_bool 'false' |
124 |
%endif |
125 |
|
126 |
%define ffmpeg_bool 'true' |
127 |
%define redcode_bool 'false' |
128 |
|
129 |
%define opengl_libpath '%{_libdir}' |
130 |
|
131 |
%define openmp_bool 'true' |
132 |
|
133 |
%define subrel 2 |
134 |
|
135 |
Name: %{name} |
136 |
Version: 2.49b |
137 |
Release: %mkrel 11 |
138 |
Summary: A fully functional 3D modeling/rendering/animation package |
139 |
Group: Graphics |
140 |
Source0: http://download.blender.org/source/blender-%{version}.tar.bz2 |
141 |
Source1: blender-wrapper |
142 |
Source2: http://download.blender.org/demo/test/test%{testver}.zip |
143 |
Source3: http://ffmpeg.org/releases/ffmpeg-0.5.8.tar.bz2 |
144 |
Source11: blender-16x16.png |
145 |
Source12: blender-32x32.png |
146 |
Source13: blender-48x48.png |
147 |
Source14: blendernodri-16x16.png |
148 |
Source15: blendernodri-32x32.png |
149 |
Source16: blendernodri-48x48.png |
150 |
Source17: http://upload.wikimedia.org/wikipedia/commons/6/65/Blender_logo.png |
151 |
Patch1: blender-2.49-libffmpeg-system.patch |
152 |
Patch2: blender-2.49-lib64.patch |
153 |
Patch3: blender-2.42-forceyafrayplug.patch |
154 |
Patch10: blender-2.49a-O3opt.patch |
155 |
Patch13: blender-2.49-python25.patch |
156 |
Patch17: blender-2.49b-changelog.patch |
157 |
Patch18: blender-2.46-yafray_zero_threads.patch |
158 |
Patch19: blender-2.49a-maxthreads.patch |
159 |
Patch21: blender-2.44-boxpack2d-missed.patch |
160 |
Patch22: blender-2.49-bug6811.patch |
161 |
Patch23: blender-2.44-more-than-six-subsurf.patch |
162 |
Patch24: blender-2.45-import-dxf-logpath.patch |
163 |
Patch34: blender-2.48a-deinterlace.patch |
164 |
Patch37: blender-2.46-arith-optz.patch |
165 |
Patch38: blender-2.46-ffmpeg-new.patch |
166 |
Patch39: blender-2.46-scons-new.patch |
167 |
# From Fedora: fix CVE-2008-1103-1 - AdamW 2008/09 #44196 |
168 |
Patch40: blender-2.46rc3-cve-2008-1103-1.patch |
169 |
# Disable x264, xvid and mp3lame support in blender's ffmpeg: these |
170 |
# cannot be in the repos for legal reasons - AdamW 2008/09 |
171 |
Patch41: blender-2.49-legal.patch |
172 |
Patch43: blender-2.48a-CVE-2008-4863.diff |
173 |
Patch44: blender-2.49-lib64-libpath.patch |
174 |
Patch45: blender-2.49a-wformat.patch |
175 |
Patch46: blender-2.49b-wformat.patch |
176 |
Patch47: blender-ffmpeg-CVE-2009-4632.patch |
177 |
Patch48: blender-ffmpeg-CVE-2009-4633.patch |
178 |
Patch49: blender-ffmpeg-CVE-2009-4634.patch |
179 |
Patch50: blender-ffmpeg-CVE-2009-4635.patch |
180 |
Patch51: blender-ffmpeg-CVE-2009-4636.patch |
181 |
Patch52: blender-ffmpeg-CVE-2009-4640.patch |
182 |
Patch53: blender-ffmpeg-CVE-2010-3429.patch |
183 |
Patch54: blender-ffmpeg-CVE-2010-4704.patch |
184 |
Patch55: blender-ffmpeg-CVE-2011-0722.patch |
185 |
Patch56: blender-ffmpeg-CVE-2011-0723.patch |
186 |
URL: http://www.blender.org/ |
187 |
License: GPLv2+ |
188 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
189 |
BuildRequires: scons >= 1.0 |
190 |
BuildRequires: python-scons |
191 |
BuildRequires: openal-devel |
192 |
BuildRequires: OpenEXR-devel >= 1.6.1 |
193 |
%if %{build_systembullet} |
194 |
BuildRequires: bullet-devel |
195 |
%endif |
196 |
BuildRequires: freealut-devel |
197 |
BuildRequires: ffmpeg-devel >= 0.4.9-3.pre1.7407.10 |
198 |
BuildRequires: ftgl-devel |
199 |
BuildRequires: gettext-devel |
200 |
BuildRequires: libgomp-devel |
201 |
BuildRequires: jpeg-devel |
202 |
BuildRequires: mesaglu-devel |
203 |
#BuildRequires: glew-devel |
204 |
BuildRequires: oggvorbis-devel |
205 |
BuildRequires: openssl-devel |
206 |
BuildRequires: png-devel |
207 |
BuildRequires: python-devel >= 2.4 |
208 |
BuildRequires: SDL-devel |
209 |
BuildRequires: smpeg-devel |
210 |
BuildRequires: subversion |
211 |
BuildRequires: tiff-devel |
212 |
BuildRequires: X11-devel |
213 |
BuildRequires: yasm |
214 |
BuildRequires: nasm |
215 |
BuildRequires: zlib-devel |
216 |
%if %{build_ogg} |
217 |
BuildRequires: libtheora-devel |
218 |
%endif |
219 |
BuildRequires: ImageMagick |
220 |
%if ! %{avoid_dunno_patent} |
221 |
BuildRequires: libxvid-devel liblame-devel x264-devel |
222 |
%endif |
223 |
Requires: python-imaging >= 1.1.4 |
224 |
Requires: libtiff |
225 |
Suggests: yafaray |
226 |
|
227 |
%description |
228 |
Blender is the in-house software of a high quality animation studio. |
229 |
It has proven to be an extremely fast and versatile design instrument. |
230 |
The software has a personal touch, offering a unique approach to the |
231 |
world of three dimensions. Blender can be used to create TV |
232 |
commercials, to make technical visualizations or business graphics, to |
233 |
do some morphing, or to design user interfaces. Developers can easily |
234 |
build and manage complex environments. The renderer is versatile and |
235 |
extremely fast. All basic animation principles (curves and keys) are |
236 |
implemented. |
237 |
|
238 |
%if %{avoid_dunno_patent} |
239 |
Please note that the ability of Blender to export to h.264 and Xvid |
240 |
video formats, and MP3 audio format, has been disabled in this build |
241 |
due to patent issues. |
242 |
%endif |
243 |
|
244 |
%if %{build_debug} |
245 |
This version is built with debug enabled. |
246 |
%endif |
247 |
|
248 |
%prep |
249 |
%setup -q -n %{truename}-%{version} -a 2 |
250 |
%patch1 -p1 -b .ffmpeg |
251 |
%if "%{_lib}" != "lib" |
252 |
%patch2 -p1 -b .lib64 |
253 |
%endif |
254 |
%patch3 -p1 -b .yafray |
255 |
%patch10 -p1 -b .O3opt |
256 |
%patch13 -p1 -b .python |
257 |
%patch17 -p1 -b .chglog |
258 |
%patch18 -p1 -b .zero_threads |
259 |
%patch19 -p1 -b .maxthreads |
260 |
%patch21 -p1 |
261 |
%patch22 -p1 -b .bug6811 |
262 |
%patch23 -p1 -b .subsurf |
263 |
%patch34 -p1 -b .deinterlace |
264 |
%patch37 -p1 -b .optz |
265 |
%if %{build_systemffmpeg} |
266 |
%patch38 -p1 -b .ffmpegnew |
267 |
%endif |
268 |
%patch39 -p1 -b .sconsnew |
269 |
%patch40 -p1 -b .cve200811031 |
270 |
%if !%{build_systemffmpeg} && %{avoid_dunno_patent} |
271 |
%patch41 -p1 -b .legal |
272 |
%endif |
273 |
%patch43 -p0 -b .CVE-2008-4863 |
274 |
%patch44 -p1 -b .lib64path |
275 |
%patch45 -p1 -b .wformat |
276 |
%patch46 -p1 -b .wformat2 |
277 |
|
278 |
# Replace the bundled ffmpeg copy with the latest ffmpeg upstream release |
279 |
pushd extern |
280 |
mkdir ffmpeg.save |
281 |
files_list="SConscript" |
282 |
for f in $files_list ; do |
283 |
cp ffmpeg/"$f" ffmpeg.save/ |
284 |
done |
285 |
rm -rf ffmpeg |
286 |
tar xf %{SOURCE3} |
287 |
mv ffmpeg-0.5.8/ ffmpeg/ |
288 |
for f in $files_list ; do |
289 |
cp ffmpeg.save/"$f" ffmpeg/ |
290 |
done |
291 |
perl -pi -e 's/ --disable-vhook//' ffmpeg/SConscript |
292 |
popd |
293 |
# Commented out, because now we just replace the ffmpeg version |
294 |
# pushd extern/ffmpeg |
295 |
# %%patch47 -p0 -b .CVE-2009-4632 |
296 |
# %%patch48 -p0 -b .CVE-2009-4633 |
297 |
# %%patch49 -p1 -b .CVE-2009-4634 |
298 |
# %%patch50 -p0 -b .CVE-2009-4635 |
299 |
# %%patch51 -p0 -b .CVE-2009-4636 |
300 |
# %%patch52 -p0 -b .CVE-2009-4640 |
301 |
# %%patch53 -p1 -b .CVE-2010-3429 |
302 |
# %%patch54 -p0 -b .CVE-2010-4704 |
303 |
# %%patch55 -p0 -b .CVE-2011-0722 |
304 |
# %%patch56 -p0 -b .CVE-2011-0723 |
305 |
# popd |
306 |
|
307 |
# workaround for nasm missed nasm.inc |
308 |
(cd extern/xvidcore/src |
309 |
find . -type d -exec cp -v nasm.inc '{}' \; |
310 |
) |
311 |
|
312 |
%build |
313 |
%if %{build_debug} |
314 |
%define debug_flags -g |
315 |
%define scons_debug BF_DEBUG=1 |
316 |
%else |
317 |
%define debug_flags %{nil} |
318 |
%define scons_debug BF_DEBUG=0 |
319 |
%endif |
320 |
|
321 |
cat > user-config.py <<EOF |
322 |
BF_LIB64_LIBPATH = '%{_libdir}' |
323 |
BF_GETTEXT_LIBPATH = '\${BF_GETTEXT}/%{_lib}' |
324 |
WITH_BF_FFMPEG = %{ffmpeg_bool} |
325 |
BF_FFMPEG = %{ffmpeg_source} |
326 |
BF_FFMPEG_LIB = %{ffmpeg_lib} |
327 |
BF_FFMPEG_LIBPATH = '\${BF_FFMPEG}/%{_lib}' |
328 |
WITH_BF_OGG = %{ogg_bool} |
329 |
WITH_BF_VERSE = %{verse_bool} |
330 |
WITH_BF_GAMEENGINE = %{gameeng_bool} |
331 |
WITH_BF_PLAYER = %{player_bool} |
332 |
BF_OPENGL_LIBPATH = %{opengl_libpath} |
333 |
WITH_BF_OPENMP = %{openmp_bool} |
334 |
WITH_BF_REDCODE = %{redcode_bool} |
335 |
%if %{build_systembullet} |
336 |
BF_BULLET = '%{_prefix}' |
337 |
BF_BULLET_INC = '\${BF_BULLET}/include/bullet' |
338 |
BF_BULLET_LIB = 'bulletdynamics bulletcollision bulletmath' |
339 |
%endif |
340 |
# |
341 |
BF_BUILDDIR = './builddir' |
342 |
BF_INSTALLDIR = './installdir' |
343 |
%if %{build_fullopt} |
344 |
CCFLAGS = "%{optflags} -O3 -ftree-vectorize -ftree-vectorizer-verbose=6 -ffast-math %{debug_flags} -funsigned-char -fno-strict-aliasing %{protector_flags}".split() |
345 |
CXXFLAGS = "%{optflags} -O3 -ftree-vectorize -ftree-vectorizer-verbose=6 -ffast-math %{debug_flags} -funsigned-char -fno-strict-aliasing %{protector_flags}".split() |
346 |
REL_CFLAGS = "-O3".split() |
347 |
REL_CCFLAGS = "-O3".split() |
348 |
%endif |
349 |
%if %{build_profiling} |
350 |
BF_PROFILE = 'true' |
351 |
BF_PROFILE_FLAGS= "%{profiling_flags}".split(); |
352 |
%endif |
353 |
EOF |
354 |
|
355 |
cat > user-config.py.sse <<EOF |
356 |
BF_LIB64_LIBPATH = '%{_libdir}' |
357 |
BF_GETTEXT_LIBPATH = '\${BF_GETTEXT}/%{_lib}' |
358 |
WITH_BF_FFMPEG = %{ffmpeg_bool} |
359 |
BF_FFMPEG = %{ffmpeg_source} |
360 |
BF_FFMPEG_LIB = %{ffmpeg_lib} |
361 |
BF_FFMPEG_LIBPATH = '\${BF_FFMPEG}/%{_lib}' |
362 |
WITH_BF_OGG = %{ogg_bool} |
363 |
WITH_BF_VERSE = %{verse_bool} |
364 |
WITH_BF_GAMEENGINE = %{gameeng_bool} |
365 |
WITH_BF_PLAYER = %{player_bool} |
366 |
BF_OPENGL_LIBPATH = %{opengl_libpath} |
367 |
WITH_BF_OPENMP = %{openmp_bool} |
368 |
WITH_BF_REDCODE = %{redcode_bool} |
369 |
%if %{build_systembullet} |
370 |
BF_BULLET = '%{_prefix}' |
371 |
BF_BULLET_INC = '\${BF_BULLET}/include/bullet' |
372 |
BF_BULLET_LIB = 'bulletdynamics bulletcollision bulletmath' |
373 |
%endif |
374 |
BF_BUILDDIR = './builddir' |
375 |
BF_INSTALLDIR = './installdir' |
376 |
%if %{build_fullopt} |
377 |
CCFLAGS = "%{optflags} -O3 -ftree-vectorize -ftree-vectorizer-verbose=6 -ffast-math -msse -mfpmath=sse %{debug_flags} %{profiling_flags} -funsigned-char -fno-strict-aliasing %{protector_flags}".split() |
378 |
CXXFLAGS = "%{optflags} -O3 -ftree-vectorize -ftree-vectorizer-verbose=6 -ffast-math -msse -mfpmath=sse %{debug_flags} %{profiling_flags} -funsigned-char -fno-strict-aliasing %{protector_flags}".split() |
379 |
REL_CFLAGS = "-O3".split() |
380 |
REL_CCFLAGS = "-O3".split() |
381 |
%if %{build_profiling} |
382 |
BF_PROFILE = 'true' |
383 |
BF_PROFILE_FLAGS= "%{profiling_flags}".split(); |
384 |
%endif |
385 |
%endif |
386 |
EOF |
387 |
|
388 |
%ifarch %{ix86} |
389 |
cp -p user-config.py user-config.py.std |
390 |
cp -p user-config.py.sse user-config.py |
391 |
scons -c %scons_debug BF_QUIET=0 |
392 |
scons %scons_debug %scons_smp BF_QUIET=0 |
393 |
cp -p builddir/bin/blender blender.sse |
394 |
cp -p user-config.py.std user-config.py |
395 |
scons -c %scons_debug BF_QUIET=0 |
396 |
%endif |
397 |
|
398 |
scons %scons_debug %scons_smp BF_QUIET=0 |
399 |
|
400 |
# Build plugins |
401 |
pushd release/plugins |
402 |
if [ -d ./include ]; then |
403 |
rm -rf include |
404 |
fi |
405 |
ln -s ../../source/blender/blenpluginapi include |
406 |
chmod +x bmake |
407 |
%make |
408 |
popd |
409 |
|
410 |
find ./test%{testver} -type f -print0|xargs -0 chmod 644 |
411 |
find ./test%{testver} -type d -print0|xargs -0 chmod 755 |
412 |
|
413 |
%install |
414 |
rm -rf %{buildroot} |
415 |
|
416 |
install -m 755 %{SOURCE1} blender-wrapper |
417 |
perl -pi -e 's@\$\{BLENDER_LIBDIR\}/%{truename}/@\$\{BLENDER_LIBDIR\}/%{name}/@g' blender-wrapper |
418 |
|
419 |
%ifarch %{ix86} |
420 |
cat >> blender-wrapper <<EOF |
421 |
if [ -e /proc/cpuinfo ]; then |
422 |
SSE="\`cat /proc/cpuinfo | grep flags | grep sse\`" |
423 |
fi |
424 |
|
425 |
if [ "x\$SSE" == x ]; then |
426 |
\${BLENDER_LIBDIR}/%{name}/%{truename} "\$@" |
427 |
else |
428 |
\${BLENDER_LIBDIR}/%{name}/%{truename}.sse "\$@" |
429 |
fi |
430 |
EOF |
431 |
%else |
432 |
cat >> blender-wrapper <<EOF |
433 |
\${BLENDER_LIBDIR}/%{name}/%{truename} "\$@" |
434 |
EOF |
435 |
%endif |
436 |
|
437 |
install -d -m 755 \ |
438 |
%{buildroot}%{_bindir} \ |
439 |
%{buildroot}%{_libdir}/%{name} \ |
440 |
%{buildroot}%{_datadir}/ \ |
441 |
%{buildroot}%{_datadir}/mime/packages/ \ |
442 |
%{buildroot}%{kde3altpath}/share/mimelnk/application/ \ |
443 |
%{buildroot}%{_datadir}/mimelnk/application/ |
444 |
|
445 |
%if %{build_verse} |
446 |
install -m 755 ./installdir/verse %{buildroot}%{_libdir}/%{name}/verse |
447 |
%endif |
448 |
%if %{build_player} |
449 |
install -m 755 ./installdir/blenderplayer %{buildroot}%{_libdir}/%{name}/%{truename}player |
450 |
ln -s %{_libdir}/%{name}/%{truename}player %{buildroot}%{_bindir}/%{name}player |
451 |
%endif |
452 |
install -m 755 ./installdir/blender %{buildroot}%{_libdir}/%{name}/%{truename} |
453 |
%ifarch %{ix86} |
454 |
install -m 755 ./blender.sse %{buildroot}%{_libdir}/%{name}/%{truename}.sse |
455 |
%endif |
456 |
install -m 755 blender-wrapper %{buildroot}%{_bindir}/%{name} |
457 |
sed -i "s,SPECDEFINED,%_libdir,g" %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name} |
458 |
cp -p %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}nodri |
459 |
perl -pi -e 's@^\s*\$\{BLENDER_LIBDIR\}/%{name}/blender@LIBGL_ALWAYS_INDIRECT=1 \$\{BLENDER_LIBDIR\}/%{name}/blender@g' %{buildroot}%{_bindir}/%{name}nodri |
460 |
cp -a ./installdir/.blender/scripts %{buildroot}%{_libdir}/%{name} |
461 |
cp -a ./installdir/.blender/locale %{buildroot}%{_datadir} |
462 |
install -p -m 644 ./installdir/.blender/.Blanguages %{buildroot}%{_libdir}/%{name} |
463 |
install -p -m 644 ./installdir/.blender/.bfont.ttf %{buildroot}%{_libdir}/%{name} |
464 |
install -p -m 644 release/VERSION %{buildroot}%{_libdir}/%{name} |
465 |
install -p -m 644 ./installdir/release_%{relver}.txt %{buildroot}%{_libdir}/%{name} |
466 |
install -p -m 644 ./installdir/copyright.txt %{buildroot}%{_libdir}/%{name} |
467 |
install -p -m 644 ./installdir/BlenderQuickStart.pdf %{buildroot}%{_libdir}/%{name} |
468 |
install -p -m 644 ./installdir/blender.html %{buildroot}%{_libdir}/%{name} |
469 |
install -p -m 644 source/blender/python/api2_2x/doc/*.py %{buildroot}%{_libdir}/%{name}/scripts |
470 |
install -d -m 755 %{buildroot}%{_libdir}/%{name}/plugins/sequence |
471 |
install -pD -m 644 release/plugins/sequence/*.so %{buildroot}%{_libdir}/%{name}/plugins/sequence |
472 |
install -d %{buildroot}%{_libdir}/%{name}/plugins/texture |
473 |
install -pD -m 644 release/plugins/texture/*.so %{buildroot}%{_libdir}/%{name}/plugins/texture |
474 |
find %{buildroot}%{_libdir}/%{name}/scripts -type f -name '*.py' -exec chmod 644 '{}' \; |
475 |
|
476 |
# menu |
477 |
mkdir -p %{buildroot}%{_datadir}/applications |
478 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF |
479 |
[Desktop Entry] |
480 |
Name=Blender |
481 |
Comment=The free open source 3D content creation suite |
482 |
Exec=%{_bindir}/%{name} -w %f |
483 |
Icon=%{name} |
484 |
Terminal=false |
485 |
Type=Application |
486 |
Categories=3DGraphics;Graphics;Viewer; |
487 |
MimeType=application/x-blender; |
488 |
InitialPreference=11 |
489 |
EOF |
490 |
|
491 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}fs.desktop << EOF |
492 |
[Desktop Entry] |
493 |
Name=Blender (FullScreen) |
494 |
Comment=The free open source 3D content creation suite |
495 |
Exec=%{_bindir}/%{name} -W %f |
496 |
Icon=%{name} |
497 |
Terminal=false |
498 |
Type=Application |
499 |
Categories=3DGraphics;Graphics;Viewer; |
500 |
MimeType=application/x-blender; |
501 |
InitialPreference=10 |
502 |
EOF |
503 |
|
504 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}nodri.desktop << EOF |
505 |
[Desktop Entry] |
506 |
Name=Blender (DRI disabled) |
507 |
Comment=The free open source 3D content creation suite (with DRI disabled) |
508 |
Exec=%{_bindir}/%{name}nodri -w %f |
509 |
Icon=%{name}nodri |
510 |
Terminal=false |
511 |
Type=Application |
512 |
Categories=3DGraphics;Graphics;Viewer; |
513 |
EOF |
514 |
|
515 |
# mimelnk |
516 |
cat > %{buildroot}%{_datadir}/mime/packages/blender.xml <<EOF |
517 |
<?xml version="1.0" encoding="UTF-8"?> |
518 |
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> |
519 |
<mime-type type="application/x-blender"> |
520 |
<comment xml:lang="en">Blender Scene</comment> |
521 |
<glob pattern="*.blend" /> |
522 |
</mime-type> |
523 |
</mime-info> |
524 |
EOF |
525 |
|
526 |
# icons |
527 |
install -m644 %{SOURCE11} -D %{buildroot}%{_miconsdir}/%{name}.png |
528 |
install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/%{name}.png |
529 |
install -m644 %{SOURCE13} -D %{buildroot}%{_liconsdir}/%{name}.png |
530 |
install -m644 %{SOURCE14} -D %{buildroot}%{_miconsdir}/%{name}nodri.png |
531 |
install -m644 %{SOURCE15} -D %{buildroot}%{_iconsdir}/%{name}nodri.png |
532 |
install -m644 %{SOURCE16} -D %{buildroot}%{_liconsdir}/%{name}nodri.png |
533 |
|
534 |
# bigger size icons |
535 |
for i in 64x64 72x72 96x96 128x128 192x192 256x256; do |
536 |
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i} |
537 |
convert -resize ${i} %{SOURCE17} %{buildroot}%{_datadir}/icons/hicolor/${i}/%{name}.png |
538 |
done |
539 |
|
540 |
%if %build_debug |
541 |
export DONT_STRIP=1 |
542 |
export EXCLUDE_FROM_STRIP=".*" |
543 |
%endif |
544 |
|
545 |
%find_lang %name |
546 |
|
547 |
%clean |
548 |
rm -rf %{buildroot} |
549 |
|
550 |
%files -f %name.lang |
551 |
%defattr(-,root,root) |
552 |
%doc ChangeLog README doc/*.txt test%{testver} |
553 |
%{_bindir}/* |
554 |
%{_datadir}/applications/* |
555 |
%{_datadir}/mime/packages/blender.xml |
556 |
%dir %{_libdir}/%{name} |
557 |
%dir %{_libdir}/%{name}/plugins |
558 |
%dir %{_libdir}/%{name}/scripts |
559 |
%{_libdir}/%{name}/%{truename} |
560 |
%ifarch %{ix86} |
561 |
%{_libdir}/%{name}/%{truename}.sse |
562 |
%endif |
563 |
%{_libdir}/%{name}/verse |
564 |
%{_libdir}/%{name}/%{truename}player |
565 |
%{_libdir}/%{name}/.bfont.ttf |
566 |
%{_libdir}/%{name}/.Blanguages |
567 |
%{_libdir}/%{name}/VERSION |
568 |
%{_libdir}/%{name}/BlenderQuickStart.pdf |
569 |
%{_libdir}/%{name}/blender.html |
570 |
%{_libdir}/%{name}/copyright.txt |
571 |
%{_libdir}/%{name}/release_%{relver}.txt |
572 |
%{_libdir}/%{name}/scripts/* |
573 |
%{_libdir}/%{name}/plugins/sequence |
574 |
%{_libdir}/%{name}/plugins/texture |
575 |
%{_miconsdir}/%{name}.png |
576 |
%{_liconsdir}/%{name}.png |
577 |
%{_iconsdir}/%{name}.png |
578 |
%{_miconsdir}/%{name}nodri.png |
579 |
%{_liconsdir}/%{name}nodri.png |
580 |
%{_iconsdir}/%{name}nodri.png |
581 |
%{_datadir}/icons/hicolor/64x64/%{name}.png |
582 |
%{_datadir}/icons/hicolor/72x72/%{name}.png |
583 |
%{_datadir}/icons/hicolor/96x96/%{name}.png |
584 |
%{_datadir}/icons/hicolor/128x128/%{name}.png |
585 |
%{_datadir}/icons/hicolor/192x192/%{name}.png |
586 |
%{_datadir}/icons/hicolor/256x256/%{name}.png |
587 |
|
588 |
|