File python-opengl.spec of Package python-opengl
#
# spec file for package python-opengl (Version 3.0.1)
#
# Copyright (c) 2010 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: 3.0.1
Release: 1
Source0: %{tarname}-%{version}.tar.bz2
License: BSD3c(or similar)
Group: Development/Libraries/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: %{_prefix}
%{py_requires}
Requires: tk >= 8.1
Url: http://pyopengl.sourceforge.net
# this is only noarch as long as the accelerator module is missing
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%endif
%description
OpenGL bindings for Python including support for GL extensions, GLU,
WGL, GLUT, GLE, and Tk.
%prep
%setup -q -n %{tarname}-%{version}
#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
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc ChangeLog.txt license.txt
%changelog