# # spec file for package python-opengl (Version 2.0.1.09) # # Copyright (c) 2009 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/ # # norootforbuild Name: python-opengl BuildRequires: freeglut-devel libdrm-devel python-devel python-imaging swig tk-devel xorg-x11 %if %suse_version > 1110 BuildRequires: libgle-devel python-numpy %else BuildRequires: gle python-numeric %endif %define tarname PyOpenGL Summary: OpenGL bindings for Python Version: 2.0.1.09 Release: 275 Source0: %{tarname}-%{version}.tar.bz2 Patch0: %{name}-nodisplay.patch Patch1: %{name}-%{version}-pep353.patch Patch2: %{name}-swigdetect.patch Patch3: %{name}-%{version}-ssize.patch Patch4: %{name}-%{version}-gccwarnings.patch License: BSD 3-Clause Group: Development/Libraries/Python BuildRoot: %{_tmppath}/%{name}-%{version}-build Prefix: %{_prefix} %{py_requires} Requires: tk >= 8.1 Url: http://pyopengl.sourceforge.net %description OpenGL bindings for Python including support for GL extensions, GLU, WGL, GLUT, GLE, and Tk. %prep %setup -q -n %{tarname}-%{version} %patch0 %patch1 %patch4 sed -i '/^library_dirs/ s@/lib@/%{_lib}@g' config/linux.cfg find . -name .cvsignore -type f -print0 | xargs -0 rm -f find . -name CVS -type d -print0 | xargs -0 rm -rf %build CFLAGS="$RPM_OPT_FLAGS -DGLX_GLXEXT_LEGACY" python setup.py build %install python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES # # we don't wan doc here ... grep -v 'OpenGL/doc' < INSTALLED_FILES > INSTALLED_FILES-nodoc # # move documentation install -d -m755 $RPM_BUILD_ROOT/%{_docdir}/%{name} mv -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/OpenGL/doc/* $RPM_BUILD_ROOT/%{_docdir}/%{name}/ chmod 644 $RPM_BUILD_ROOT/%{_docdir}/%{name}/*.* $RPM_BUILD_ROOT/%{_docdir}/%{name}/xhtml/* rmdir $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/OpenGL/doc %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES-nodoc %defattr(-,root,root) %doc %{_docdir}/%{name} %changelog * Wed Jun 10 2009 ro@suse.de - buildreq: replace gle by libgle-devel for >= 11.2 * Mon May 04 2009 ro@suse.de - buildrequires: replace python-numeric by python-numpy for >= 11.2 * Fri Jan 26 2007 jmatejek@suse.cz - removed strict-aliasing warnings - removed invalid operations * Tue Nov 21 2006 prusnak@suse.cz - changes according to PEP353 (pep353.diff) * Mon Sep 11 2006 jmatejek@suse.cz - replaced a mistyped unicode nonbreakspace with a regular space, thus fixing build with python2.5 * Tue Feb 28 2006 jmatejek@suse.cz - updated to reflect python changes due to #149809 * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Mon Jan 23 2006 jmatejek@suse.cz - added build dependency on tk-devel - fixed build not to require X server * Mon Jun 20 2005 ltinkl@suse.cz - added freeglut* packages to fix dependencies (#80605), plus optional (but recommended) dependency on python-imaging (pil) * Tue Nov 23 2004 mcihar@suse.cz - update to 2.0.1.09 - simplified filelist generating * Wed Aug 04 2004 mcihar@suse.cz - update to 2.0.1.08 * Wed Apr 21 2004 mcihar@suse.cz - fix gcc warning - fixed python requires - use sed instead of patch for lib64 * Sat Jan 10 2004 adrian@suse.de - build as user * Mon Jun 16 2003 mcihar@suse.cz - added some magic to generate correct filelist * Mon Jun 09 2003 mcihar@suse.cz - documentation isn't executable * Thu Jun 05 2003 mcihar@suse.cz - rather move documentation than symlink, as otherwise upgrade doesn't work correctly * Tue May 27 2003 mcihar@suse.cz - install documentation only once * Fri Jan 10 2003 mcihar@suse.cz - fixed build for lib64 arches * Mon Jan 06 2003 mcihar@suse.cz - initial package version