File yafray.spec of Package yafray

#
# spec file for package yafray
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           yafray
BuildRequires:  OpenEXR-devel
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  scons
BuildRequires:  zlib-devel
Version:        0.0.9
Release:        0
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-gcc4-64bit.patch
Patch1:         %{name}-%{version}-gcc-warning.patch
Patch2:         %{name}-%{version}-includes.patch
Patch3:         %{name}-%{version}-scons.patch
Patch32:        %{name}-%{version}-linux-settings.patch
Patch64:        %{name}-%{version}-linux-settings64.patch
Patch65:        yafray-0.0.9-const-char.patch
Patch66:        yafray-0.0.9-linux3.patch
Patch67:        yafray-gcc47.patch
Url:            http://www.yafray.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        YafRay: Yet Another Free RAYtracer
License:        LGPL-2.1+
Group:          Productivity/Graphics/Visualization/Raytracers

%description
A raytracer that cooperates well with the Blender package.

%prep
%setup -q -n %{name}
chmod -x AUTHORS ChangeLog LICENSE README
%patch0
%patch1
%patch2
%patch3
if [ "%_lib" = "lib64" ]; then
%patch64
else
%patch32
fi
%patch65
%patch66
%patch67 -p1

%build
scons prefix=%{_prefix} %{?jobs:--jobs=%jobs}

%install
scons destdir=$RPM_BUILD_ROOT prefix=%{_prefix} install
# find $RPM_BUILD_ROOT -name .sconsign -exec rm {} \;

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog LICENSE README
%config %{_sysconfdir}/*
%{_bindir}/*
%{_libdir}/*.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so

%changelog