1 |
Name: blender |
2 |
Version: 2.63a |
3 |
Release: %mkrel 5 |
4 |
Summary: A fully functional 3D modeling/rendering/animation package |
5 |
Group: Graphics |
6 |
Source0: http://download.blender.org/source/blender-%{version}.tar.gz |
7 |
Patch0: blender-2.63-localedir.patch |
8 |
Patch1: blender-2.60-error-when-missing-sse.patch |
9 |
Patch2: blender-2.58-static-lib.patch |
10 |
Patch3: blender-2.61-openjpeg_stdbool.patch |
11 |
# Patch from SuSe |
12 |
Patch5: blender-2.48-undefine-operation.patch |
13 |
# Patch submitted upstream - Blender Patches item #19234, |
14 |
Patch6: blender-2.50-uninit-var.patch |
15 |
Patch7: blender-2.63a-link.patch |
16 |
Patch8: blender-2.63a-ffmpeg-0.11.patch |
17 |
|
18 |
URL: http://www.blender.org/ |
19 |
License: GPLv2+ |
20 |
BuildRequires: cmake >= 2.8 |
21 |
BuildRequires: ffmpeg-devel |
22 |
BuildRequires: glew-devel |
23 |
BuildRequires: OpenEXR-devel |
24 |
BuildRequires: SDL-devel |
25 |
BuildRequires: libx11-devel |
26 |
BuildRequires: libxi-devel |
27 |
BuildRequires: freetype2-devel |
28 |
BuildRequires: libgomp-devel |
29 |
BuildRequires: jpeg-devel |
30 |
BuildRequires: png-devel |
31 |
BuildRequires: openjpeg-devel |
32 |
BuildRequires: openal-devel |
33 |
BuildRequires: libsamplerate-devel |
34 |
BuildRequires: sndfile-devel |
35 |
BuildRequires: tiff-devel |
36 |
BuildRequires: python3-devel >= 3.2 |
37 |
BuildRequires: boost-devel |
38 |
BuildRequires: openimageio-devel |
39 |
Requires: python(abi) >= 3.2 |
40 |
Requires(post,preun): GConf2 |
41 |
|
42 |
%description |
43 |
Blender is the in-house software of a high quality animation studio. |
44 |
It has proven to be an extremely fast and versatile design instrument. |
45 |
The software has a personal touch, offering a unique approach to the |
46 |
world of three dimensions. Blender can be used to create TV |
47 |
commercials, to make technical visualizations or business graphics, to |
48 |
do some morphing, or to design user interfaces. Developers can easily |
49 |
build and manage complex environments. The renderer is versatile and |
50 |
extremely fast. All basic animation principles (curves and keys) are |
51 |
implemented. |
52 |
|
53 |
%prep |
54 |
%setup -qn %{name}-%{version} |
55 |
%patch0 -p0 -b .localedir |
56 |
%patch1 -p0 -b .sse |
57 |
%patch2 -p0 -b .static |
58 |
%patch3 -p1 -b .bool |
59 |
%patch5 -p0 |
60 |
%patch6 -p0 |
61 |
%patch7 -p0 |
62 |
%patch8 -p0 |
63 |
|
64 |
%build |
65 |
%ifarch %{ix86} |
66 |
# build non-sse flavour |
67 |
%cmake -DWITH_INSTALL_PORTABLE=OFF -DWITH_PLAYER=ON \ |
68 |
-DWITH_PYTHON=ON -DWITH_PYTHON_INSTALL=OFF \ |
69 |
-DWITH_BUILTIN_GLEW=OFF \ |
70 |
-DWITH_CODEC_FFMPEG=OFF -DWITH_CODEC_SNDFILE=ON \ |
71 |
-DWITH_RAYOPTIMIZATION=OFF |
72 |
%make |
73 |
cd .. |
74 |
mv build non-sse |
75 |
%endif |
76 |
|
77 |
#build sse flavour |
78 |
%cmake -DWITH_INSTALL_PORTABLE=OFF -DWITH_PLAYER=ON \ |
79 |
-DWITH_PYTHON=ON -DWITH_PYTHON_INSTALL=OFF \ |
80 |
-DWITH_BUILTIN_GLEW=OFF \ |
81 |
-DWITH_CODEC_FFMPEG=OFF -DWITH_CODEC_SNDFILE=ON \ |
82 |
-DWITH_RAYOPTIMIZATION=ON |
83 |
%make |
84 |
|
85 |
%install |
86 |
#install sse flavour |
87 |
%makeinstall_std -C build |
88 |
|
89 |
# Install hicolor icons. |
90 |
for i in 16x16 22x22 32x32 48x48 256x256 ; do |
91 |
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}/apps |
92 |
install -pm 0644 release/freedesktop/icons/${i}/apps/%{name}.png \ |
93 |
%{buildroot}%{_datadir}/icons/hicolor/${i}/apps/%{name}.png |
94 |
done |
95 |
|
96 |
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps |
97 |
install -pm 0644 release/freedesktop/icons/scalable/apps/%{name}.svg \ |
98 |
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg |
99 |
|
100 |
%ifarch %{ix86} |
101 |
mv %buildroot%_bindir/%name %buildroot%_bindir/%name.sse |
102 |
|
103 |
#install non-sse flavour |
104 |
rm -fr build |
105 |
mv non-sse build |
106 |
%makeinstall_std -C build |
107 |
mv %buildroot%_bindir/%name %buildroot%_bindir/%name.nonsse |
108 |
|
109 |
# install wrapper |
110 |
cat >> %{buildroot}%{_bindir}/blender <<EOF |
111 |
if [ -e /proc/cpuinfo ]; then |
112 |
SSE="\`cat /proc/cpuinfo | grep flags | grep sse\`" |
113 |
fi |
114 |
|
115 |
if [ "x\$SSE" == x ]; then |
116 |
%{_bindir}/%{name}.nonsse "\$@" |
117 |
else |
118 |
%{_bindir}/%{name}.sse "\$@" |
119 |
fi |
120 |
EOF |
121 |
chmod 0755 %{buildroot}%{_bindir}/blender |
122 |
%endif |
123 |
|
124 |
sed -i -e 's,#!/usr/bin/python,#!/usr/bin/python3,' %{buildroot}%{_bindir}/blender-thumbnailer.py %{buildroot}%{_datadir}/%{name}/*/scripts/modules/blend_render_info.py |
125 |
|
126 |
%find_lang %name |
127 |
|
128 |
%clean |
129 |
rm -rf %{buildroot} |
130 |
|
131 |
%post |
132 |
if [ -x %{_gconftool_bin} ]; then |
133 |
%{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --type boolean --set /desktop/gnome/thumbnailers/application@x-blender/enable true |
134 |
%{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --type string --set /desktop/gnome/thumbnailers/application@x-blender/command "blender-thumbnailer.py %u %o" |
135 |
fi |
136 |
|
137 |
%preun |
138 |
if [ "$1" = "0" -a -x %{_gconftool_bin} ]; then |
139 |
%{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --unset /desktop/gnome/thumbnailers/application@x-blender/enable |
140 |
%{_gconftool_bin} --direct --config-source xml:readwrite:%{_sysconfdir}/gconf/gconf.xml.defaults --unset /desktop/gnome/thumbnailers/application@x-blender/command |
141 |
fi |
142 |
|
143 |
%files -f %name.lang |
144 |
%defattr(-,root,root) |
145 |
%doc release/text/* |
146 |
%{_bindir}/* |
147 |
%{_datadir}/applications/*.desktop |
148 |
%{_datadir}/%{name} |
149 |
%{_mandir}/man1/%{name}.1.* |
150 |
%{_iconsdir}/hicolor/*/apps/%{name}.* |