%if 0%{?fedora} > 12 || 0%{?rhel} > 6 %global with_python3 1 %endif %global modname sfml # get rid of private-shared-object-provides rpmlint warning %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } Name: python-sfml Version: 1.3.0 Release: 1%{?dist} Summary: Simple and Fast Multimedia Library - Official Python bindings License: LGPLv3+ URL: http://www.python-sfml.org/ Source0: http://python-sfml.org/downloads/pysfml-%{version}.tar.gz Patch0: python-sfml-1.3.0-remove-cython-dependency.patch Patch1: python-sfml-1.3.0-fix-non-executable-script-warnings.patch BuildRequires: freetype-devel BuildRequires: glew-devel BuildRequires: libjpeg-devel BuildRequires: libsndfile-devel BuildRequires: libXrandr-devel BuildRequires: openal-devel BuildRequires: python2-devel %if 0%{?with_python3} BuildRequires: python3-devel %endif Requires: sfml <= 2.0.0 %description SFML is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs. %if 0%{?with_python3} %package -n python3-sfml Summary: Simple and Fast Multimedia Library - Official Python bindings Requires: sfml <= 2.0.0 %description -n python3-sfml SFML is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs. %endif %prep %setup -q -n python-sfml-1.3 %patch0 -p1 %patch1 -p1 %build %{__python} setup.py build %if 0%{?with_python3} %{__python3} setup.py build %endif %install %{__python} setup.py install --skip-build --root=%{buildroot} %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root=%{buildroot} %endif %clean rm -rf build %files %doc README.rst %{python_sitearch}/%{modname} %{python_sitearch}/pySFML-%{version}-* %if 0%{?with_python3} %files -n python3-sfml %doc README.rst %{python3_sitearch}/%{modname} %{python3_sitearch}/pySFML-%{version}-* %endif %changelog * Tue Aug 6 2013 Jonathan De Wachter - 1.3.0-1 - Initial RPM release