Package blender: Specfile

Name: blender
Version: 2.49b
Release: alt1

Summary: 3D modeling, animation, rendering and post-production
License: GPL
Group: Graphics
URL: http://www.blender.org/

Packager: Sergey Kurakin <kurakin@altlinux.org>

Source0: http://download.blender.org/source/%name-%version.tar.gz
Source1: %name-wrapper
Source2: %name.desktop
Source3: %name-win.desktop
Patch1: %name-2.47-alt-libtiff4.patch
Patch2: %name-2.47-alt-usertempdir.patch

Provides: python%__python_version(Blender)

Requires: libtiff >= 3.0
Requires: symlinks

# Automatically added by buildreq on Fri Jun 26 2009
BuildRequires: flex gcc-c++ libGL-devel libSDL-devel libX11-devel libXi-devel libavdevice-devel libavformat-devel libftgl-devel libjpeg-devel libopenal-devel libpng-devel libpth-devel libswscale-devel libtiff-devel openexr-devel python-devel scons swig

%add_python_req_skip bpy

%description
Fully integrated creation suite, offering a broad range of essential
tools for the creation of 3D content, including modeling, uv-mapping,
texturing, rigging, skinning, animation, particle and other simulation,
scripting, rendering, compositing, post-production and game creation

%description -l ru_RU.UTF-8
Полностью интегрированный пакет разработки, предлагающий широкий
выбор инструментов необходимых для создания 3D-графики. Включает
средства моделирования, анимации, рендеринга, постобработки видео,
а также создания интерактивных игр. Пакет имеет такие функции,
как динамика твердых тел, жидкостей и мягких тел, систему горячих
клавиш, большое количество легко доступных расширений, написанных
на языке Python.

%prep
%setup -q -n %name-%version
%patch1 -p1
%patch2 -p1

%build
cat >user-config.py <<__EOF__
BF_PYTHON_VERSION = '%__python_version'

WITH_BF_PLAYER = 'true'

WITH_BF_OPENAL = 'true'

WITH_BF_QUICKTIME = 'false'

WITH_BF_FFMPEG = 'true'
BF_FFMPEG = '%_usr'
BF_FFMPEG_INC = '%_includedir'
BF_FFMPEG_LIBPATH='%_libdir'
BF_FFMPEG_LIB = 'avformat avcodec avutil swscale avdevice'

WITH_BF_ODE = 'true'
BF_ODE = '%_usr'
BF_ODE_INC = '%_includedir/ode'
BF_ODE_LIB = 'ode'

WITH_BF_GAMEENGINE = 'true'

WITH_BF_INTERNATIONAL = 'true'

WITH_BF_ICONV = 'true'
BF_ICONV = '%_libdir/gconv'
BF_ICONV_INC = '%_libdir'
BF_ICONV_LIB = ''
BF_ICONV_LIBPATH = '%_libdir'

WITH_BF_FTGL = 'true'
BF_FTGL = '%_usr'
BF_FTGL_INC = '%_includedir/FTGL'
BF_FTGL_LIB = 'ftgl'

WITH_BF_GETTEXT = 'true'
BF_GETTEXT_LIBPATH='%_libdir'
BF_GETTEXT_INC='%_includedir'

WITH_BF_FREETYPE = 'true'
BF_FREETYPE = '%_usr'
BF_FREETYPE_INC = '%_includedir/freetype2'
BF_FREETYPE_LIB = 'freetype'

BF_BUILDDIR = 'build/linux'
BF_INSTALLDIR='release/linux'

CPPFLAGS = '-I%_includedir/python%__python_version'
__EOF__
scons

pushd release/linux/plugins
/bin/ln -s ../../../source/blender/blenpluginapi include
/bin/chmod +x bmake
%make
popd

%install
/bin/install -pD -m755 release/linux/%name %buildroot%_bindir/%name-bin
/bin/install -pD -m755 release/linux/%{name}player %buildroot%_bindir/%{name}player
/bin/install -pD -m755 %SOURCE1 %buildroot%_bindir/%name
sed -i -e 's|@LIBDIR@|%_libdir|' %buildroot%_bindir/%name

# icons and .desktop files
/bin/install -pD -m644 release/freedesktop/icons/16x16/%name.png %buildroot%_miconsdir/%name.png
/bin/install -pD -m644 release/freedesktop/icons/32x32/%name.png %buildroot%_niconsdir/%name.png
/bin/install -pD -m644 release/freedesktop/icons/scalable/%name.svg %buildroot%_iconsdir/hicolor/scalable/apps/%name.svg
/bin/install -pD -m644 %SOURCE2 %buildroot%_desktopdir/%name.desktop
/bin/install -pD -m644 %SOURCE3 %buildroot%_desktopdir/%name-win.desktop

/bin/install -d %buildroot%_libdir/%name/plugins/sequence
/bin/install -d %buildroot%_libdir/%name/plugins/texture
/bin/install -pD -m644 release/linux/plugins/sequence/*.so %buildroot%_libdir/%name/plugins/sequence
/bin/install -pD -m644 release/linux/plugins/texture/*.so %buildroot%_libdir/%name/plugins/texture

/bin/cp -a release/linux/.blender/scripts %buildroot%_libdir/%name/scripts
/bin/cp -a release/linux/.blender/locale %buildroot%_datadir
/bin/install -m644 bin/.blender/.Blanguages %buildroot%_libdir/%name
/bin/install -m644 bin/.blender/.bfont.ttf %buildroot%_libdir/%name
/bin/install -m644 release/VERSION %buildroot%_libdir/%name
/bin/install -m644 source/blender/python/api2_2x/doc/* %buildroot%_libdir/%name/scripts

%find_lang %name

%files -f %name.lang
%doc README release/linux/*.pdf release/linux/release_*.txt release/linux/blender.html
%_bindir/*
%_desktopdir/*
%dir %_libdir/%name
%dir %_libdir/%name/plugins
%dir %_libdir/%name/plugins/sequence
%dir %_libdir/%name/plugins/texture
%dir %_libdir/%name/scripts
%_libdir/%name/.bfont.ttf
%_libdir/%name/.Blanguages
%_libdir/%name/VERSION
%_libdir/%name/scripts/*
%exclude %_libdir/%name/scripts/textplugin_convert_ge.py
%exclude %_libdir/%name/scripts/SConscript
%_libdir/%name/plugins/sequence/*
%_libdir/%name/plugins/texture/*
%_niconsdir/%name.png
%_miconsdir/%name.png
%_iconsdir/hicolor/scalable/apps/%name.svg

%changelog
* Sat Sep 19 2009 Sergey Kurakin <kurakin@altlinux.org> 2.49b-alt1
- 2.49b: bugfix release

* Thu Jul 23 2009 Sergey Kurakin <kurakin@altlinux.org> 2.49a-alt2
- removed deprecated Requires: python = pyton_version
  (repocop warning)

* Fri Jun 26 2009 Sergey Kurakin <kurakin@altlinux.org> 2.49a-alt1
- 2.49a
- warning: yafray support is completely removed in 2.49
- dropped openal_source patch (fixed in upstream)
- dropped alt-gimp patch (fixed in upstream)
- dropped alt-ffmpeg52 patch (fixed in upstream)
- removed spare BuildRequires

* Tue May  5 2009 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt5
- blender-wrapper fixed on x86_64
- blender-wrapper improved to take care with blender scripts
  from other packages
- Provides: python(Blender) for other packages with blender scripts
- Requires: symlinks (needed for blender-wrapper)
- minor spec cleanup

* Mon Mar 16 2009 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt4
- build fixed (BuldRequires)
- description corrected (russian)

* Thu Feb 12 2009 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt3
- fixed build with libavcodec52

* Tue Dec  9 2008 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt2
- libopenal support enabled again
  (see 2.48a-alt0.1 chengelog entry)

* Fri Nov 28 2008 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt1
- post-scripts removed (update_menus & update_desktopdb)
- additional code in wrapper: move ~/.blender/.B.blend to ~/.B.blend
  (see .B.blend issue in 2.46-alt1 changelog)

* Tue Oct 28 2008 Sergey Kurakin <kurakin@altlinux.org> 2.48a-alt0.1
- 2.48a (bugfix release)
- libopenal support temporary removed
  in order to build with gcc4.3

* Thu Oct 16 2008 Sergey Kurakin <kurakin@altlinux.org> 2.48-alt0.1
- 2.48
- gimp used as external image editor

* Wed Oct 10 2008 Sergey Kurakin <kurakin@altlinux.ru> 2.47-alt2
- summary and description updated
- libtiff4 patch restored and updated,
  fixing libtiff.so.4 loading on x86_64
- new usertempdir patch fixes tmp directory issues
- removed .menu files
- updated .desktop files:
  + fixed repocop warnings
  + #16829
  + run in terminal (for window mode only)
- unnecessary icons removed from sources (included in tarball)
- more spec cleanup

* Mon Aug 25 2008 Sergey Kurakin <kurakin@altlinux.ru> 2.47-alt1
- 2.47

* Mon Jul 14 2008 Sergey Kurakin <kurakin@altlinux.ru> 2.46-alt1
- 2.46
- removed verify_elf_skiplist, useless for now
- removed long list of add_python_req_skip, useless for now
- removed tiff4 patch
- removed fix-temp patch
- user configuration file .B.blend moved back to original
  location $HOME/.B.blend (see 2.45-alt1 changelog entry)
- spec cleanup

* Thu Apr 10 2008 Igor Vlasenko <viy@altlinux.ru> 2.45-alt2.2.1.qa1
- NMU (by repocop): the following fixes applied:
 * desktop-mime-entry for blender

* Fri Feb 29 2008 ALT QA Team Robot <qa-robot@altlinux.org> 2.45-alt2.2.1
- Rebuilt due to libIlmImf.so.4 -> libIlmImf.so.6 soname change.

* Sun Feb 17 2008 Sergei Epiphanov <serpiph@altlinux.ru> 2.45-alt2.2
- Rebuild with libavformat.52

* Fri Jan 25 2008 Grigory Batalov <bga@altlinux.ru> 2.45-alt2.1
- Rebuilt with python-2.5.

* Mon Oct 22 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.45-alt2
- Fix owner/group of plugins

* Sat Oct 13 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.45-alt1
- New version
- Fix temp dir
- Move user defaults file from ~ to ~/.blender
- Fix plugin rights
- Fix execution script
- Fix verify_elf
- Set hard depend to python2.4

* Tue Sep 11 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.44-alt4
- Fix python dependencies

* Fri Jun 29 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.44-alt3
- Swap windowed and fullscreen mode

* Sat May 26 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.44-alt2
- Cleaning .spec
- Add russian description
- Fix build process

* Mon May 14 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.44-alt1
- New version
- Replace illegal Requires with right stuff
- Fix 'blender' script for x86_64

* Mon Mar 12 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.43-alt2
- Fix Provides/Requires section

* Sat Feb 24 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.43-alt1
- New version

* Thu Feb 15 2007 Sergei Epiphanov <serpiph@altlinux.ru> 2.42-alt4
- Add selection between desktop and menu files
- Add blender startup in window mode

* Thu Dec 14 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.42-alt3
- rebuild

* Wed Sep 20 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.42-alt2
- fixing error in build

* Sun Sep 10 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.42-alt1
- New version

* Fri Sep 08 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.41-alt2
- Fixing load of libtiff4.

* Sat Mar 04 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.41-alt1
- New version
- Cleanup spec for X.Org 7.0

* Fri Mar 03 2006 Sergei Epiphanov <serpiph@altlinux.ru> 2.40-alt3
- Correcting spec (correcting icons dir).

* Wed Dec 28 2005 Sergei Epiphanov <serpiph@altlinux.ru> 2.40-alt2
- Correction of blender.menu file

* Mon Dec 26 2005 Sergei Epiphanov <serpiph@altlinux.ru> 2.40-alt1
- New version

* Wed Mar 30 2005 ALT QA Team Robot <qa-robot@altlinux.org> 2.36-alt1.1
- Rebuilt with python-2.4.

* Sun Jan 30 2005 Andrey Astafiev <andrei@altlinux.ru> 2.36-alt1
- 2.36
- Some features incorporated from Debian package.

* Mon Mar 01 2004 Kachalov Anton <mouse@altlinux.ru> 2.32-alt1
- new version 2.32

* Sun Dec 28 2003 Kachalov Anton <mouse@altlinux.ru> 2.30-alt1
- new version 2.30

* Wed Sep 17 2003 Kachalov Anton <mouse@altlinux.ru> 2.28a-alt1
- new version 2.28a

* Tue Jun 24 2003 Kachalov Anton <mouse@altlinux.ru> 2.27-alt1
- new version 2.27

* Mon Jan 20 2003 Kachalov Anton <mouse@altlinux.ru> 2.25b-alt2
- fixed buildrequires

* Tue Nov 12 2002 Kachalov Anton <mouse@altlinux.ru> 2.25b-alt1
- build for Sisyphus