%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define alpha a5 Name: PyOpenGL Version: 3.0.0 Release: 0.1.%{alpha}%{?dist} Summary: Cross platform Python binding to OpenGL Group: Development/Languages License: BSD URL: http://pyopengl.sourceforge.net/ Source0: http://downloads.sourceforge.net/pyopengl/%{name}-%{version}%{alpha}.tar.gz #md5sum 943c4d7d3d1d97cc7592e61d28918fd2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel,python-setuptools %description PyOpenGL is the cross platform Python binding to OpenGL and related APIs. The binding is created using the SWIG wrapper generator, and is provided under an extremely liberal BSD-style Open-Source license. %package doc Summary: Documentation for PyOpenGL Group: Documentation Requires: PyOpenGL = %{version} %description doc Documentation for PyOpenGL. %prep %setup -q -n %{name}-%{version}%{alpha} %{__sed} -e 's/\#!/\#!\/usr\/bin\/env python/' -i OpenGL/Demo/NeHe/lesson{1,2,3,4,5,6,6-multi,13,18}.py %{__sed} '1i\#\!\/usr\/bin\/env python' -i OpenGL/Demo/GLUT/tom/*py %{__sed} '1i\#\!\/usr\/bin\/env python' -i OpenGL/Demo/NeHe/lesson{41,42,45,43/*,44/*,48/*}.py chmod a+x OpenGL/Demo/NeHe/lesson{1,2,3,4,5,6,6-multi,13,18,41,42,45}.py chmod a+x OpenGL/Demo/NeHe/lesson{43,44,48}/*py chmod a+x OpenGL/Demo/GLUT/tom/*py chmod a-x OpenGL/Demo/NeHe/lesson48/PythonLesson48_Readme.txt %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --single-version-externally-managed --root $RPM_BUILD_ROOT rm $RPM_BUILD_ROOT%{python_sitelib}/OpenGL/Demo/readme.txt chmod a+x $RPM_BUILD_ROOT%{python_sitelib}/OpenGL/{tests/test_glutinit_0args.py,tests/test_tess1.py,Tk/__init__.py} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc license.txt %{python_sitelib}/* %files doc %defattr(-,root,root,-) %doc documentation/* %changelog * Fri Dec 29 2006 Rafał Psota 3.0.0-0.1.a5 - initial release