]>
Commit | Line | Data |
---|---|---|
4bdc2559 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module pyglet | |
770077cd | 7 | Summary: A cross-platform windowing and multimedia library for Python |
8 | Summary(pl.UTF-8): Międzyplatformowa biblioteka Pythona do obsługi okien i multimediów | |
9 | Name: python-%{module} | |
4989003f | 10 | Version: 1.1.4 |
77210f5c | 11 | Release: 7 |
fad7263f | 12 | License: BSD |
770077cd | 13 | Group: Development/Languages/Python |
14 | Source0: http://pyglet.googlecode.com/files/%{module}-%{version}.tar.gz | |
4989003f | 15 | # Source0-md5: b2363642dc3832e95dc4e63a6793467f |
770077cd | 16 | URL: http://www.pyglet.org/ |
4bdc2559 | 17 | %if %{with python2} |
770077cd | 18 | BuildRequires: python-devel >= 1:2.5 |
4bdc2559 JR |
19 | %endif |
20 | %if %{with python3} | |
21 | BuildRequires: python3-devel | |
22 | BuildRequires: python3-distribute | |
23 | BuildRequires: python3-modules | |
24 | %endif | |
770077cd | 25 | BuildRequires: rpm-pythonprov |
26 | BuildRequires: rpmbuild(macros) >= 1.219 | |
3f67a2c1 | 27 | Suggests: python-PyOpenAL |
770077cd | 28 | Requires: python-PyOpenGL |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | pyglet provides an object-oriented programming interface for | |
34 | developing games and other visually-rich applications. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | pyglet dostarcza interfejs do programowania zorientowanego obiektowo | |
38 | dla rozwoju gier i innych aplikacji wizualnych. | |
39 | ||
4bdc2559 JR |
40 | %package -n python3-%{module} |
41 | Summary: A cross-platform windowing and multimedia library for Python | |
42 | Summary(pl.UTF-8): Międzyplatformowa biblioteka Pythona do obsługi okien i multimediów | |
43 | Group: Libraries/Python | |
4bdc2559 JR |
44 | Requires: python3-PyOpenGL |
45 | ||
46 | %description -n python3-%{module} | |
47 | pyglet provides an object-oriented programming interface for | |
48 | developing games and other visually-rich applications. | |
49 | ||
50 | %description -n python3-%{module} -l pl.UTF-8 | |
51 | pyglet dostarcza interfejs do programowania zorientowanego obiektowo | |
52 | dla rozwoju gier i innych aplikacji wizualnych. | |
53 | ||
770077cd | 54 | %prep |
55 | %setup -q -n %{module}-%{version} | |
56 | ||
57 | %build | |
4bdc2559 | 58 | %if %{with python2} |
9b4ed0a6 | 59 | %py_build |
4bdc2559 JR |
60 | %endif |
61 | ||
62 | %if %{with python3} | |
9b4ed0a6 | 63 | %py3_build |
4bdc2559 | 64 | %endif |
770077cd | 65 | |
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
4bdc2559 JR |
68 | |
69 | %if %{with python2} | |
9b4ed0a6 | 70 | %py_install |
770077cd | 71 | |
770077cd | 72 | %py_postclean |
4bdc2559 JR |
73 | %endif |
74 | ||
75 | %if %{with python3} | |
9b4ed0a6 | 76 | %py3_install |
4bdc2559 | 77 | %endif |
770077cd | 78 | |
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
4bdc2559 | 82 | %if %{with python2} |
770077cd | 83 | %files |
84 | %defattr(644,root,root,755) | |
85 | %doc CHANGELOG NOTICE README PKG-INFO doc examples | |
86 | %dir %{py_sitescriptdir}/%{module} | |
87 | %{py_sitescriptdir}/pyglet/*.py[co] | |
88 | %dir %{py_sitescriptdir}/%{module}/app | |
89 | %{py_sitescriptdir}/pyglet/app/* | |
90 | %dir %{py_sitescriptdir}/%{module}/font | |
91 | %{py_sitescriptdir}/pyglet/font/* | |
92 | %dir %{py_sitescriptdir}/%{module}/gl | |
93 | %{py_sitescriptdir}/pyglet/gl/* | |
94 | %dir %{py_sitescriptdir}/%{module}/graphics | |
95 | %{py_sitescriptdir}/pyglet/graphics/* | |
96 | %dir %{py_sitescriptdir}/%{module}/image | |
97 | %{py_sitescriptdir}/pyglet/image/* | |
98 | %dir %{py_sitescriptdir}/%{module}/media | |
99 | %{py_sitescriptdir}/pyglet/media/* | |
100 | %dir %{py_sitescriptdir}/%{module}/text | |
101 | %{py_sitescriptdir}/pyglet/text/* | |
102 | %dir %{py_sitescriptdir}/%{module}/window | |
103 | %{py_sitescriptdir}/pyglet/window/* | |
104 | %{py_sitescriptdir}/*.egg-info | |
4bdc2559 JR |
105 | %endif |
106 | ||
107 | %if %{with python3} | |
108 | %files -n python3-%{module} | |
109 | %defattr(644,root,root,755) | |
110 | %doc CHANGELOG NOTICE README PKG-INFO doc examples | |
111 | %{py3_sitescriptdir}/%{module} | |
112 | %{py3_sitescriptdir}/*.egg-info | |
113 | %endif |