-
-# chyba nie mo¿emy tego udostêpniaæ na naszym FTP
-# przynajmniej ja tak rozumiem fragment copyright.txt:
-#
-# "Distributing the Software 'bundled' in with ANY product is
-# considered to be a 'commercial purpose'."
-
-
-%ifarch %{ix86}
-%define arch_name blender%{version}-linux-glibc2.1.2-i386
-%endif
-%ifarch %{alpha}
-%define arch_name blender%{version}-linux-glibc2.1.3-alpha
-%endif
-
+# TODO:
+# - enable internalization support (BR libftgl)
+# - libsolid/libqhull/libode BR ?
Summary: 3D modeling, rendering, animation and game creation package
-Summary(pl): Pakiet do tworzenia animacji 3D oraz robienia gier
+Summary(pl.UTF-8): Pakiet do tworzenia animacji 3D oraz gier
Name: blender
-Version: 2.20
+Version: 2.49b
Release: 1
-License: Free for use
-Group: Applications/Graphics
-Group(de): Applikationen/Grafik
-Group(pl): Aplikacje/Grafika
-Vendor: NaN Technologies B.V.
-Source0: ftp://ftp.blender.nl/pub/%{arch_name}.tar.gz
-Source1: %{name}.defaults
-Source2: %{name}.sh
-Patch0: %{name}-bmake.patch
-URL: http://www.blender.nl
+License: GPL
+Group: X11/Applications/Graphics
+Source0: http://download.blender.org/source/%{name}-%{version}.tar.gz
+# Source0-md5: 718eef6a4ff377989e829b92a886cc5b
+Source1: %{name}.desktop
+Source2: %{name}.png
+Source4: %{name}-wrapper
+Source5: %{name}.manpage
+Patch0: %{name}-po_and_locale_names.patch
+Patch1: %{name}-noxml-yafray.patch
+URL: http://www.blender.org/
+BuildRequires: OpenAL-devel
+BuildRequires: OpenEXR-devel
+BuildRequires: OpenGL-devel
+BuildRequires: SDL-devel
+#BuildRequires: esound-devel
+BuildRequires: ffmpeg-devel >= 0.4.9-4.20080930.1
+BuildRequires: freealut-devel
+BuildRequires: freetype-devel
+BuildRequires: ftgl-devel
+BuildRequires: gcc >= 5:3.4.0
+BuildRequires: gettext-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libtiff-devel
+BuildRequires: libtool
+BuildRequires: libvorbis-devel
+BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: python-devel >= 1:2.3
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.385
+BuildRequires: scons
+BuildRequires: sed >= 4.0
+#BuildRequires: smpeg-devel
+BuildRequires: xorg-lib-libXi-devel
+BuildRequires: zlib-devel
+Requires(post,postun): desktop-file-utils
Requires: OpenGL
+Requires: freetype
+Requires: python-modules
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautoreqdep libGL.so.1 libGLU.so.1
-%define _prefix /usr/X11R6
%description
Blender is a free and fully functional 3D modeling, rendering,
animation and game creation package for Unix, Windows and BeOS
-systems. Blender is distributed without sources, it is exclusively
-developed and maintained by the Dutch company NaN Technologies B.V.
+systems.
-%description -l pl
-Blender to darmowy i w pe³ni funkcjonalny pakiet do tworzenia animacji
-3D oraz robienia gier, dostêpny dla systemów Unix, Windows i BeOS.
-Blender jest rozpowszechniany bez ¼róde³. Jest rozwijany przez
-holendersk± firmê NaN Technologies B.V.
+%description -l pl.UTF-8
+Blender to darmowy i w pełni funkcjonalny pakiet do tworzenia animacji
+3D oraz gier, dostępny dla systemów Unix, Windows i BeOS.
%prep
-%setup -qn %{arch_name}
+%setup -q
%patch0 -p1
+%patch1 -p1
-%build
-cd plugins
-%{__make} clean
-%{__make} OPTFLAGS="%{rpmcflags}"
+rm -f missing
+rm -f user-config.py
+rm -rf bin/.blender/locale
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/blender/plugins/{sequence,texture}}
-install -d $RPM_BUILD_ROOT{%{_datadir}/blender/{textures,sounds},%{_includedir}/blender}
-install -d $RPM_BUILD_ROOT%{_examplesdir}/blender/plugins/{sequence,texture}
+sed 's/\(BUILD_REV :=\).*/\1 unknown/' -i source/Makefile
+sed 's/\(build_rev =\).*/\1 "unknown"/' -i tools/Blender.py
-install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/blender
+RPMCFLAGS="\"`echo %{rpmcflags}|sed 's/ /\",\"/g'`\""
+RPMLDFLAGS="\"`echo %{rpmldflags}|sed 's/ /\",\"/g'`\""
-install blender $RPM_BUILD_ROOT%{_libdir}/blender
-install plugins/sequence/*.so $RPM_BUILD_ROOT%{_libdir}/blender/plugins/sequence
-install plugins/texture/*.so $RPM_BUILD_ROOT%{_libdir}/blender/plugins/texture
+cat > user-config.py <<END
+CCFLAGS = [$RPMCFLAGS, "-funsigned-char", "-fPIC"]
+CXXFLAGS = [$RPMCFLAGS, "-funsigned-char", "-fPIC"]
+LDFLAGS = [$RPMLDFLAGS]
+TARGET_CC = '%{__cc}'
+TARGET_CXX = '%{__cxx}'
-install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/blender/defaults
+BF_PYTHON_VERSION = '%{py_ver}'
-install plugins/include/* $RPM_BUILD_ROOT%{_includedir}/blender
+BF_FFMPEG = '%{_prefix}'
+BF_FFMPEG_INC = '%{_includedir}/ffmpeg'
+BF_FFMPEG_LIBPATH = '%{_libdir}'
+BF_FFMPEG_LIB = 'avformat avcodec avdevice swscale avutil'
-install plugins/{Makefile,bmake} $RPM_BUILD_ROOT%{_examplesdir}/blender/plugins
-install plugins/sequence/{Makefile,*.c} $RPM_BUILD_ROOT%{_examplesdir}/blender/plugins/sequence
-install plugins/texture/{Makefile,*.c} $RPM_BUILD_ROOT%{_examplesdir}/blender/plugins/texture
+LCGDIR = 'lib/linux2'
+BF_BUILDDIR = 'build/linux2'
+BF_INSTALLDIR = 'install/linux2'
+END
-gzip -9nf README copyright.txt
+%build
+%scons BF_OPENGL_LIBPATH=%{_x_libraries}
+%{__make} -C po \
+ OCGDIR=.. \
+ SRCHOME=$(pwd)/source \
+ NANBLENDERHOME=$(pwd)
+
+install -d release/plugins/include
+install source/blender/blenpluginapi/*.h release/plugins/include
+chmod +x release/plugins/bmake
+%{__make} -C release/plugins/
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_datadir},%{_desktopdir},%{_pixmapsdir},%{_bindir}} \
+ $RPM_BUILD_ROOT%{_datadir}/blender/bpydata
+
+install ./install/linux2/blender $RPM_BUILD_ROOT%{_bindir}/blender-bin
+install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/blender
+#install blenderplayer $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
+install -d $RPM_BUILD_ROOT%{_libdir}/blender/plugins/sequence
+install -d $RPM_BUILD_ROOT%{_libdir}/blender/plugins/texture
+install ./release/plugins/sequence/*.so $RPM_BUILD_ROOT%{_libdir}/blender/plugins/sequence
+install ./release/plugins/texture/*.so $RPM_BUILD_ROOT%{_libdir}/blender/plugins/texture
+install -d $RPM_BUILD_ROOT%{_datadir}/blender
+cp -aR ./release/scripts $RPM_BUILD_ROOT%{_datadir}/blender
+install ./release/VERSION $RPM_BUILD_ROOT%{_datadir}/blender
+install ./bin/.blender/.Blanguages $RPM_BUILD_ROOT%{_datadir}/blender
+install ./bin/.blender/.bfont.ttf $RPM_BUILD_ROOT%{_datadir}/blender
+cp -a bin/.blender/locale $RPM_BUILD_ROOT%{_datadir}
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/blender.1
+
+%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
-%files
+%post
+%update_desktop_database_post
+
+%postun
+%update_desktop_database_postun
+
+%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc *.gz
-%attr(755,root,root) %{_bindir}/blender
-%dir %{_libdir}/blender
-%attr(755,root,root) %{_libdir}/blender/blender
-%{_libdir}/blender/plugins
-%{_datadir}/blender
-%{_includedir}/blender
-%dir %{_examplesdir}/blender
-%dir %{_examplesdir}/blender/plugins
-%attr(755,root,root) %{_examplesdir}/blender/plugins/bmake
-%attr(755,root,root) %{_examplesdir}/blender/plugins/Makefile
-%{_examplesdir}/blender/plugins/texture
-%{_examplesdir}/blender/plugins/sequence
+%doc README doc/bf-members.txt doc/python-dev-guide.txt doc/oldbugs.txt doc/interface_API.txt
+%doc release/text/{blender.html,release*.txt}
+%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_datadir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}
+%{_desktopdir}/*.desktop
+%{_pixmapsdir}/*.png
+%{_mandir}/man1/*