3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module PyOpenGL
7 Summary: OpenGL bindings for Python
8 Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona
14 Group: Development/Languages/Python
15 Source0: http://downloads.sourceforge.net/pyopengl/%{module}-%{version}.tar.gz
16 # Source0-md5: 221d4a6a0928fcfeef26751370ec5f52
17 Source1: http://downloads.sourceforge.net/pyopengl/%{module}-Demo-%{version}a1.tar.gz
18 # Source1-md5: 75b66abdf2d0e5003798c0fa12abee6e
19 URL: http://pyopengl.sourceforge.net/
20 BuildRequires: OpenGL-GLU-devel
21 BuildRequires: OpenGL-glut-devel
23 BuildRequires: python-numpy-devel
24 BuildRequires: python-devel
27 BuildRequires: python3-devel
28 BuildRequires: python3-distribute
29 BuildRequires: python3-modules
30 BuildRequires: python3-numpy-devel
32 %pyrequires_eq python-libs
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.710
35 Requires: python-numpy
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _noautoreqdep libGL.so.1 libGLU.so.1
42 OpenGL bindings for Python including support for GL extensions, GLU,
43 WGL, GLUT, GLE, and Tk.
45 %description -l pl.UTF-8
46 Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL,
50 Summary: Demos for PyOpenGL
51 Summary(pl.UTF-8): Programy demonstracyjne dla pakietu PyOpenGL
52 Group: Development/Languages/Python
53 Requires: %{name} = %{epoch}:%{version}-%{release}
58 %description examples -l pl.UTF-8
59 Programy demonstracyjne dla pakietu PyOpenGL.
61 %package -n python3-%{module}
62 Summary: OpenGL bindings for Python
63 Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona
64 Group: Libraries/Python
65 Requires: python3-numpy
67 %description -n python3-%{module}
68 OpenGL bindings for Python including support for GL extensions, GLU,
69 WGL, GLUT, GLE, and Tk.
71 %description -n python3-%{module} -l pl.UTF-8
72 Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL,
75 %package -n python3-%{module}-examples
76 Summary: Demos for PyOpenGL
77 Summary(pl.UTF-8): Programy demonstracyjne dla pakietu PyOpenGL
78 Group: Development/Languages/Python
79 Requires: python3-%{module} = %{epoch}:%{version}-%{release}
81 %description -n python3-%{module}-examples
84 %description -n python3-%{module}-examples -l pl.UTF-8
85 Programy demonstracyjne dla pakietu PyOpenGL.
88 %setup -q -n %{module}-%{version} -a 1
94 cd %{module}-Demo-%{version}a1
102 cd %{module}-Demo-%{version}a1
103 %py_build --build-base build-3
107 rm -rf $RPM_BUILD_ROOT
112 cd %{module}-Demo-%{version}a1
118 #{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/OpenGL/{Demo,doc}
124 cd %{module}-Demo-%{version}a1
127 #{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/OpenGL/{Demo,doc}
131 rm -rf $RPM_BUILD_ROOT
135 %defattr(644,root,root,755)
137 %{py_sitescriptdir}/OpenGL
138 %if "%{py_ver}" > "2.4"
139 %{py_sitescriptdir}/*.egg-info
143 %defattr(644,root,root,755)
144 %{py_sitescriptdir}/PyOpenGL-Demo
148 %files -n python3-%{module}
149 %defattr(644,root,root,755)
151 %{py3_sitescriptdir}/OpenGL
152 %{py3_sitescriptdir}/*.egg-info
154 %files -n python3-%{module}-examples
155 %defattr(644,root,root,755)
156 %{py3_sitescriptdir}/PyOpenGL-Demo