LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File blender.spec of Package blender (Project graphics:rendering)

#
# spec file for package blender (Version 2.45)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           blender
%define DISTRIBUTABLE 1
# Patched code is built by default.
# Use rpmbuild -D 'DISTRIBUTABLE 0' to build original code.
BuildRequires:  Mesa-devel OpenEXR-devel SDL-devel freealut-devel freetype2-devel ftgl-devel gcc-c++ libao-devel libdrm-devel libpng-devel libquicktime-devel libtiff-devel openal-devel openssl-devel python-devel scons update-desktop-files xorg-x11 yafray
License:        GPL v2 or later
%if %DISTRIBUTABLE <= 0
BuildRequires:  ffmpeg-devel
%endif
Group:          Productivity/Graphics/Visualization/Raytracers
AutoReqProv:    on
Requires:       yafray
Version:        2.46
Release:        73
%if %DISTRIBUTABLE <= 0
Source:         %{name}-%{version}.tar.bz2
%else
# WARNING: This is not a comment, but the real command to repack souce:
#%(sh %{_sourcedir}/%{name}-patch-source %{name}-%{version}.tar.bz2 )
Source:         %{name}-%{version}-patched.tar.bz2
%endif
Source2:        geeko.blend
Source3:        geeko.README
Source4:        blender-sample
Source5:        blenderplayer.desktop
Source6:        blender.xpm
Source7:        blender_wrapper.tar.bz2
#
#skript to repack source
Source8:        blender-patch-source
Source9:        blender.desktop


#Patch1:         %{name}-2.42a-libtiff.patch

Patch3:         blender-2.41-undefined_operation.patch
Patch4:         blender-2.41-uninitialized_variables.patch
#
#only fix issue lib -> lib64 in wrapper
Patch7:         blender-wrapper.patch

Patch8:         blender-bmake.patch
Patch9:         blender-undefined-op.patch
Patch10:        blender-strncat.patch
Patch11:        blender-2.44-gcc43.patch


Url:            http://www.blender.org/
#Icon:           blender.xpm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        3D Animation and Rendering Software

%description
Blender is the open source software for 3D modeling, animation,
rendering, post-production, interactive creation and playback.
Available for all major operating systems under the GNU General Public
License.



Authors:
--------
    Stichting Blender Foundation 
    Frederiksstraat 12-2 
    1054 LC Amsterdam 
    the Netherlands 
    foundation(at)blender(dot)org 

%package      devel
Summary:        3D Animation and Rendering Software
Group:          Productivity/Graphics/Visualization/Raytracers
Requires:       %name = %version

%description devel
Header files for blender %{version} 

	
%prep
%setup -q -a7

#%patch2
%patch3
#%patch4
%if "%_lib" == "lib64"
%patch7
%endif

%patch8
%patch9
%patch10
%patch11


sed -i -e '/LLIBS/s/ c / /' config/linux2-config.py
cat > user-config.py <<EOF
REL_CFLAGS = [$(echo $RPM_OPT_FLAGS | sed -e "s/[^ ]*/'&'/g" -e "s/ /,/g")]
EOF

%build
rm -rf ../build
scons   BF_QUIET=0 \
	BF_PYTHON_VERSION=2.5 \
	BF_PYTHON_INC=/usr/include/python2.5 \
	WITH_BF_OPENAL=yes \
	BF_OPENAL_LIBPATH=/usr/include/AL \
	WITH_BF_SDL=yes \
	BF_PTHREADS=yes \
	WITH_BF_ZLIB=yes \
	WITH_BF_INTERNATIONAL=yes \
	WITH_BF_ICONV=yes \
	WITH_BF_GAMEENGINE=no \
	WITH_BF_ODE=yes \
	WITH_BF_OPENEXR=yes \
	WITH_BF_BULLET=yes \
	WITH_BF_QUICKTIME=no \
	BF_QUICKTIME_INC=/usr/include/quicktime \
	WITH_BF_FTGL=yes \
	WITH_BF_ICONV=no \
%if %DISTRIBUTABLE <= 0
	WITH_BF_FFMPEG=yes \
%else
	WITH_BF_FFMPEG=no \
%endif
	CFLAGS="$RPM_OPT_FLAGS"
%if %DISTRIBUTABLE <= 0
scons   BF_QUIET=0 \
	BF_PYTHON_VERSION=2.5 \
	BF_PYTHON_INC=/usr/include/python2.5 \
	WITH_BF_OPENAL=yes \
	BF_OPENAL_LIBPATH=/usr/include/AL \
	WITH_BF_SDL=yes \
	BF_PTHREADS=yes \
	WITH_BF_ZLIB=yes \
	WITH_BF_INTERNATIONAL=yes \
	WITH_BF_ICONV=yes \
	WITH_BF_GAMEENGINE=no \
	WITH_BF_ODE=yes \
	WITH_BF_OPENEXR=yes \
	WITH_BF_BULLET=yes \
	WITH_BF_QUICKTIME=no \
	BF_QUICKTIME_INC=/usr/include/quicktime \
	WITH_BF_FTGL=yes \
	WITH_BF_ICONV=no \
	WITH_BF_FFMPEG=yes \
	CFLAGS="$RPM_OPT_FLAGS" blenderplayer
%endif
# Build plugins
pushd release/plugins
   if [ -d ./include ]; then
	rm -rf include
   fi
   ln -s ../../source/blender/blenpluginapi include
   chmod +x bmake
   make
popd

%install
install -d $RPM_BUILD_ROOT/usr/bin
install  -m 755 blender $RPM_BUILD_ROOT/usr/bin
install -d $RPM_BUILD_ROOT/%{_docdir}/blender
#
# install
pushd ../install/linux2
install -d $RPM_BUILD_ROOT/%{_libdir}/%{name}
find . -name Makefile -exec rm {} \; 
rm `find . -name "*make*"`
rm `find . -name "*c"`
cp -pR * $RPM_BUILD_ROOT/%{_libdir}/%{name}
cp -pR .blender $RPM_BUILD_ROOT/%{_libdir}/%{name}
popd
#
# plugins
install -d $RPM_BUILD_ROOT/%{_libdir}/%{name}/.blender/plugins
#
# find all plugins create subdirs and cp them one by one
# .blender directory is used for blender to find all nescesary
# plugins and scripts, as blender default serach path is ./.blender
pushd release/plugins
find . -name "*so" | awk -F "/" '{line="";for(i=2;i<NF;i++) line=line $i"/";pole[line]=line} END {for( i in pole) print pole[i]}' | \
	while read line 
	do 
		pushd $line 
		install -d $RPM_BUILD_ROOT/%{_libdir}/%{name}/.blender/plugins/${line}
		cp *.so $RPM_BUILD_ROOT/%{_libdir}/%{name}/.blender/plugins/${line} 
		popd
	done 
popd
#
# fix exutable bit on various scripts (they should not be exutable)
find $RPM_BUILD_ROOT/%{_libdir}/%{name}/.blender -name '*py' -exec chmod u-x,g-x,o-x \{\} \;
#
# copy doc into right place
cp -p %SOURCE2 %SOURCE3 COPYING README doc/*.txt $RPM_BUILD_ROOT/usr/share/doc/packages/blender
cp -p %SOURCE4 $RPM_BUILD_ROOT/usr/bin
chmod ugo+x $RPM_BUILD_ROOT/usr/bin/blender-sample
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 0644 %SOURCE6 \
        $RPM_BUILD_ROOT/usr/share/pixmaps
%suse_update_desktop_file -i %{name} Graphics 3DGraphics

# due to license issues #262776
%if %DISTRIBUTABLE <= 0
ln -s %{_libdir}/%{name}/blenderplayer  ${RPM_BUILD_ROOT}%{_bindir}/blenderplayer
%suse_update_desktop_file -i %{name}player Graphics 3DGraphics
%endif
%find_lang blender

#fix wrong permisions
chmod -x  ${RPM_BUILD_ROOT}%{_datadir}/doc/packages/blender/geeko.*
%clean
rm -rf ../build 
rm -rf $RPM_BUILD_ROOT

%files -f blender.lang
%defattr(-, root, root)
%{_bindir}/*
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/.blender
%dir %{_libdir}/%{name}/.blender/plugins
%dir %{_libdir}/%{name}/.blender/plugins/sequence
%dir %{_libdir}/%{name}/.blender/plugins/texture
%dir %{_libdir}/%{name}/plugins/
%{_libdir}/%{name}/.blender/.Blanguages
%{_libdir}/%{name}/.blender/.bfont.ttf
%{_libdir}/%{name}/blender
%{_libdir}/%{name}/GPL-license.txt
%{_libdir}/%{name}/BlenderQuickStart.pdf
%{_libdir}/%{name}/blender.html
%{_libdir}/%{name}/copyright.txt
%{_libdir}/%{name}/Python-license.txt
%{_libdir}/%{name}/release_246.txt
%{_libdir}/%{name}/.blender/locale
%{_libdir}/%{name}/.blender/scripts/
%{_libdir}/%{name}/.blender/plugins/*/*.so


%{_docdir}/%{name}
/usr/share/applications/blender.desktop
/usr/share/pixmaps/blender.xpm

%files devel
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins/include
%{_libdir}/%{name}/plugins/include/*


%changelog
* Tue Jul 29 2008 - pnemec@suse.cz
- remove python64 and ffmpeg patch
- refresh remaining patches and upstream them
* Mon Jul 28 2008 - pnemec@suse.cz
- remove blender-doc sources from source package
- move blender-doc to BuildService [bnc#410362]
* Tue Jun 24 2008 - pnemec@suse.cz
- updated to 2.46
* Tue Apr 29 2008 pnemec@suse.cz
- fixed off-by-one problem in previous fix
* Fri Apr 18 2008 pnemec@suse.cz
- security fix (bnc#380922)
  new patch: buffer_overflow_380922-2.45.patch
* Fri Jan 04 2008 pnemec@suse.cz
- do not build againt key_internal.h mt19937int.c [#333796]
* Wed Oct 03 2007 coolo@suse.de
- update to 2.45 to fix compilation with gcc43
* Thu Jul 05 2007 coolo@suse.de
- put desktop file into package
* Tue Jun 05 2007 pnemec@suse.cz
- added script, which repack sources to remove uneeded files
* Tue May 29 2007 pnemec@suse.cz
- blenderplayer is no longer build
- fixing exutable flag on python scripts
- updated to 2.4.4
  - sculpt and multires
  - subsurface scattering
  - new composite nodes
  - character animation
* Thu May 24 2007 stbinner@suse.de
- remove X-SuSE-translate from .desktop file
* Thu Apr 12 2007 pnemec@suse.cz
- Repackaged to remove unused source [#262776]
  Binary unchanged.
* Wed Feb 21 2007 pnemec@suse.cz
- updated to 2.4.3
  added new feature: multi-resolution Meshes,
  multi-level UV, multi-layer images and multi-pass rendering,
  Mesh Sculpt and Retopo painting tools
* Mon Nov 06 2006 schwab@suse.de
- Use RPM_OPT_FLAGS.
- Fix bugs found through this.
- Fix linking of shared libraries.
* Tue Oct 24 2006 pnemec@suse.cz
- clean up spec file
  removed build-fix.patch needed for configuration
- added support for openal
* Tue Oct 24 2006 ro@suse.de
- added freealut-devel to buildrequires
* Fri Oct 20 2006 pnemec@suse.cz
- fix path`s in spec file. Plugins and help is now accesible from
  menu #[213228]
* Tue Oct 17 2006 pnemec@suse.cz
- removed ffmepg from requires
* Mon Oct 16 2006 pnemec@suse.cz
- updated to version 2.42 see Changelog for details
- large enhancement in package, whole specfile rewrited
  all patches either removed or rewrited
- new: support for quick time, better support for yafray
- new: package contains several blender scripts and plugins
* Tue Sep 19 2006 pnemec@suse.cz
- fixed amiguous variable evaluation
  (patch -undefined_operation.patch)
* Thu Sep 14 2006 ro@suse.de
- adde ftgl-devel to BuildRequires
* Thu Jun 29 2006 pnemec@suse.cz
- updated to version 2.41
- fixed some minor problems (uninitialized variables #188166)
  added patch uninitialized_variables.patch, missing_header.patch
- splited doc package, removed old documentation added new one #177578
* Sun Jan 29 2006 aj@suse.de
- Fix BuildRequires.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 16 2006 pnemec@suse.cz
- Updated to version 2.40
- Scons patch moved from spec file to Scons.patch
* Tue Sep 20 2005 pnemec@suse.cz
- remove strict aliasing checking
* Tue Jul 26 2005 sbrabec@suse.cz
- Updated to version 2.37a.
* Wed May 18 2005 yxu@suse.de
- fixed serious compiler warnings
* Mon Apr 25 2005 yxu@suse.de
- Fixed for GCC4.
* Thu Jan 06 2005 sbrabec@suse.cz
- Updated to version 2.36.
* Fri Sep 17 2004 sbrabec@suse.cz
- Added yafray to requires.
- Search language setup, locale and font in /usr/share, not $HOME
  (#45201).
* Thu Sep 02 2004 sbrabec@suse.cz
- Updated to version 2.34.
* Fri Apr 09 2004 sbrabec@suse.cz
- Removed no longer needed LC_CTYPE work-around patch.
  http://projects.blender.org/tracker/?func=detail&atid=125&aid=490&group_id=9
* Sat Mar 13 2004 adrian@suse.de
- remove desktop file copy (use the template from KDE)
* Tue Feb 10 2004 ro@suse.de
- fixed patchfile for lib64 patch
* Fri Feb 06 2004 sbrabec@suse.cz
- Updated to version 2.32.
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Wed Oct 08 2003 ro@suse.de
- use SDL-devel-packages in neededforbuild
* Thu Sep 18 2003 meissner@suse.de
- correct lib64 fix, do not modify buildroot.
* Wed Sep 17 2003 adrian@suse.de
- add menu entry
* Thu Sep 11 2003 sbrabec@suse.cz
- Crash on startup LC_CTYPE work-around (bug #30166, Blender bug #490).
* Thu Sep 11 2003 sbrabec@suse.cz
- Crash on startup fix with Python 2.3 from CVS (bug #30166).
* Thu Aug 21 2003 sbrabec@suse.cz
- Updated to version 2.28a.
* Wed Aug 06 2003 sbrabec@suse.cz
- Updated to version 2.28.
* Fri Jun 13 2003 ro@suse.de
- added directory to filelist
* Tue May 27 2003 ro@suse.de
- remove unpackaged files from buildroot
* Wed May 07 2003 ro@suse.de
- build on python-2.3
* Mon Mar 31 2003 ro@suse.de
- use mesa-devel-packages in neededforbuild
* Wed Feb 19 2003 sndirsch@suse.de
- fixed blendercreator-sample (blendercreator no longer exists;
  it's now called blender)
- therefore renamed blendercreator-sample to blender-sample
- adjusted SuSE menu entries in PDB
* Mon Feb 17 2003 sbrabec@suse.cz
- Updated to version 2.26.
- Workaround of linker segfault.
* Fri Jan 17 2003 sbrabec@suse.cz
- Fixed permissions of blendercreator-sample.
* Thu Jan 16 2003 ro@suse.de
- fix for libpng (needs -lm -lz)
- run autogen.sh
* Wed Jan 15 2003 sbrabec@suse.cz
- Added blendercreator-sample binary and usefull links.
* Tue Jan 14 2003 sbrabec@suse.cz
- Added sample geeko.blend.
- Moved documentation to subdir PublisherDoc.
- Removed blendermodule.
* Tue Nov 26 2002 sbrabec@suse.cz
- Workaround biarch bugs in python.m4 (bug 22011) and libtool search
  paths (bug 22010).
* Wed Nov 20 2002 sbrabec@suse.cz
- Added official Blender documentation.
* Tue Nov 05 2002 sbrabec@suse.cz
- Added first public GPL release with unofficial automake support.