]>
Commit | Line | Data |
---|---|---|
f47042cd JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
cc8b386e | 6 | %define module PyOpenGL |
5e5b16b4 | 7 | Summary: OpenGL bindings for Python |
b0e7aa0f | 8 | Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona |
5e5b16b4 | 9 | Name: python-%{module} |
29aaa0b7 | 10 | Version: 3.0.1 |
31e19e0d | 11 | Release: 9 |
0e091076 | 12 | Epoch: 1 |
5e5b16b4 AM |
13 | License: LGPL |
14 | Group: Development/Languages/Python | |
eff6a30c | 15 | Source0: http://downloads.sourceforge.net/pyopengl/%{module}-%{version}.tar.gz |
29aaa0b7 | 16 | # Source0-md5: 221d4a6a0928fcfeef26751370ec5f52 |
17 | Source1: http://downloads.sourceforge.net/pyopengl/%{module}-Demo-%{version}a1.tar.gz | |
cc8b386e | 18 | # Source1-md5: 75b66abdf2d0e5003798c0fa12abee6e |
5e5b16b4 | 19 | URL: http://pyopengl.sourceforge.net/ |
861d3682 | 20 | BuildRequires: OpenGL-GLU-devel |
58c3fba7 | 21 | BuildRequires: OpenGL-glut-devel |
f47042cd | 22 | %if %{with python2} |
5ef1fb99 | 23 | BuildRequires: python-numpy-devel |
cc8b386e | 24 | BuildRequires: python-devel |
f47042cd JR |
25 | %endif |
26 | %if %{with python3} | |
27 | BuildRequires: python3-devel | |
28 | BuildRequires: python3-distribute | |
29 | BuildRequires: python3-modules | |
30 | BuildRequires: python3-numpy-devel | |
31 | %endif | |
58c3fba7 | 32 | %pyrequires_eq python-libs |
44b3a963 | 33 | BuildRequires: rpm-pythonprov |
06d1bbff | 34 | BuildRequires: rpmbuild(macros) >= 1.219 |
5ef1fb99 | 35 | Requires: python-numpy |
861d3682 | 36 | Obsoletes: PyOpenGL |
9b5306c4 | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
5e5b16b4 | 38 | |
58c3fba7 | 39 | %define _noautoreqdep libGL.so.1 libGLU.so.1 |
5e5b16b4 AM |
40 | |
41 | %description | |
42 | OpenGL bindings for Python including support for GL extensions, GLU, | |
43 | WGL, GLUT, GLE, and Tk. | |
44 | ||
f64240f2 JR |
45 | %description -l pl.UTF-8 |
46 | Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL, | |
58c3fba7 JB |
47 | GLUT, GLE i Tk. |
48 | ||
0c7b5aa8 AG |
49 | %package examples |
50 | Summary: Demos for PyOpenGL | |
51 | Summary(pl.UTF-8): Programy demonstracyjne dla pakietu PyOpenGL | |
52 | Group: Development/Languages/Python | |
fe6972ac | 53 | Requires: %{name} = %{epoch}:%{version}-%{release} |
0c7b5aa8 AG |
54 | |
55 | %description examples | |
56 | Demos for PyOpenGL. | |
57 | ||
58 | %description examples -l pl.UTF-8 | |
59 | Programy demonstracyjne dla pakietu PyOpenGL. | |
60 | ||
f47042cd JR |
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 | |
66 | ||
67 | %description -n python3-%{module} | |
68 | OpenGL bindings for Python including support for GL extensions, GLU, | |
69 | WGL, GLUT, GLE, and Tk. | |
70 | ||
71 | %description -n python3-%{module} -l pl.UTF-8 | |
72 | Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL, | |
73 | GLUT, GLE i Tk. | |
74 | ||
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} | |
80 | ||
81 | %description -n python3-%{module}-examples | |
82 | Demos for PyOpenGL. | |
83 | ||
84 | %description -n python3-%{module}-examples -l pl.UTF-8 | |
85 | Programy demonstracyjne dla pakietu PyOpenGL. | |
86 | ||
5e5b16b4 | 87 | %prep |
06d1bbff | 88 | %setup -q -n %{module}-%{version} -a 1 |
5e5b16b4 AM |
89 | |
90 | %build | |
f47042cd | 91 | %if %{with python2} |
87c537d3 | 92 | %py_build |
f47042cd JR |
93 | |
94 | cd %{module}-Demo-%{version}a1 | |
87c537d3 | 95 | %py_build |
f47042cd JR |
96 | cd .. |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
87c537d3 | 100 | %py3_build |
06d1bbff | 101 | |
29aaa0b7 | 102 | cd %{module}-Demo-%{version}a1 |
87c537d3 | 103 | %py_build --build-base build-3 |
f47042cd | 104 | %endif |
5e5b16b4 AM |
105 | |
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
f47042cd | 109 | %if %{with python2} |
87c537d3 | 110 | %py_install |
06d1bbff | 111 | |
29aaa0b7 | 112 | cd %{module}-Demo-%{version}a1 |
87c537d3 | 113 | %py_install |
f47042cd | 114 | cd .. |
5e5b16b4 | 115 | |
58c3fba7 JB |
116 | %py_postclean |
117 | ||
f47042cd JR |
118 | #{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/OpenGL/{Demo,doc} |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
87c537d3 | 122 | %py3_install |
f47042cd JR |
123 | |
124 | cd %{module}-Demo-%{version}a1 | |
87c537d3 | 125 | %py3_install |
f47042cd JR |
126 | |
127 | #{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/OpenGL/{Demo,doc} | |
128 | %endif | |
0c7b5aa8 | 129 | |
5e5b16b4 AM |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
f47042cd | 133 | %if %{with python2} |
5e5b16b4 AM |
134 | %files |
135 | %defattr(644,root,root,755) | |
06d1bbff | 136 | %doc PKG-INFO |
137 | %{py_sitescriptdir}/OpenGL | |
cc8b386e | 138 | %if "%{py_ver}" > "2.4" |
06d1bbff | 139 | %{py_sitescriptdir}/*.egg-info |
cc8b386e | 140 | %endif |
0c7b5aa8 AG |
141 | |
142 | %files examples | |
143 | %defattr(644,root,root,755) | |
06d1bbff | 144 | %{py_sitescriptdir}/PyOpenGL-Demo |
f47042cd JR |
145 | %endif |
146 | ||
147 | %if %{with python3} | |
148 | %files -n python3-%{module} | |
149 | %defattr(644,root,root,755) | |
150 | %doc PKG-INFO | |
151 | %{py3_sitescriptdir}/OpenGL | |
152 | %{py3_sitescriptdir}/*.egg-info | |
153 | ||
154 | %files -n python3-%{module}-examples | |
155 | %defattr(644,root,root,755) | |
156 | %{py3_sitescriptdir}/PyOpenGL-Demo | |
157 | %endif |