]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module PyOpenGL | |
7 | Summary: OpenGL bindings for Python | |
8 | Summary(pl.UTF-8): Dowiązania do OpenGL dla Pythona | |
9 | Name: python-%{module} | |
10 | Version: 3.0.1 | |
11 | Release: 9 | |
12 | Epoch: 1 | |
13 | License: LGPL | |
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 | |
22 | %if %{with python2} | |
23 | BuildRequires: python-numpy-devel | |
24 | BuildRequires: python-devel | |
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 | |
32 | %pyrequires_eq python-libs | |
33 | BuildRequires: rpm-pythonprov | |
34 | BuildRequires: rpmbuild(macros) >= 1.219 | |
35 | Requires: python-numpy | |
36 | Obsoletes: PyOpenGL | |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %define _noautoreqdep libGL.so.1 libGLU.so.1 | |
40 | ||
41 | %description | |
42 | OpenGL bindings for Python including support for GL extensions, GLU, | |
43 | WGL, GLUT, GLE, and Tk. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Dowiązania do OpenGL dla Pythona wraz z rozszerzeniami GL, GLU, WGL, | |
47 | GLUT, GLE i Tk. | |
48 | ||
49 | %package examples | |
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} | |
54 | ||
55 | %description examples | |
56 | Demos for PyOpenGL. | |
57 | ||
58 | %description examples -l pl.UTF-8 | |
59 | Programy demonstracyjne dla pakietu PyOpenGL. | |
60 | ||
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 | ||
87 | %prep | |
88 | %setup -q -n %{module}-%{version} -a 1 | |
89 | ||
90 | %build | |
91 | %if %{with python2} | |
92 | %py_build | |
93 | ||
94 | cd %{module}-Demo-%{version}a1 | |
95 | %py_build | |
96 | cd .. | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %py3_build | |
101 | ||
102 | cd %{module}-Demo-%{version}a1 | |
103 | %py_build --build-base build-3 | |
104 | %endif | |
105 | ||
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %if %{with python2} | |
110 | %py_install | |
111 | ||
112 | cd %{module}-Demo-%{version}a1 | |
113 | %py_install | |
114 | cd .. | |
115 | ||
116 | %py_postclean | |
117 | ||
118 | #{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/OpenGL/{Demo,doc} | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %py3_install | |
123 | ||
124 | cd %{module}-Demo-%{version}a1 | |
125 | %py3_install | |
126 | ||
127 | #{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/OpenGL/{Demo,doc} | |
128 | %endif | |
129 | ||
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %if %{with python2} | |
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc PKG-INFO | |
137 | %{py_sitescriptdir}/OpenGL | |
138 | %if "%{py_ver}" > "2.4" | |
139 | %{py_sitescriptdir}/*.egg-info | |
140 | %endif | |
141 | ||
142 | %files examples | |
143 | %defattr(644,root,root,755) | |
144 | %{py_sitescriptdir}/PyOpenGL-Demo | |
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 |