]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without numpy # without numpy features | |
4 | # | |
5 | # todo: extensions? | |
6 | ||
7 | %define module pygtk | |
8 | Summary: Python bindings for GTK+ 2.x libraries | |
9 | Summary(pl.UTF-8): Wiązania Pythona do bibliotek GTK+ 2.x | |
10 | Name: python-%{module} | |
11 | Version: 2.24.0 | |
12 | Release: 2 | |
13 | Epoch: 2 | |
14 | License: LGPL v2.1+ | |
15 | Group: Libraries/Python | |
16 | Source0: http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/%{module}-%{version}.tar.bz2 | |
17 | # Source0-md5: a1051d5794fd7696d3c1af6422d17a49 | |
18 | Source1: %{name}-python.m4 | |
19 | Source2: %{name}-jhflags.m4 | |
20 | Patch0: %{name}-pyc.patch | |
21 | Patch1: %{name}-python27.patch | |
22 | URL: http://www.pygtk.org/ | |
23 | BuildRequires: atk-devel >= 1:1.12.0 | |
24 | BuildRequires: autoconf >= 2.52 | |
25 | BuildRequires: automake >= 1:1.7 | |
26 | BuildRequires: glib2-devel >= 1:2.8.0 | |
27 | BuildRequires: gtk+2-devel >= 2:2.24.0 | |
28 | BuildRequires: libglade2-devel >= 1:2.6.2 | |
29 | BuildRequires: libtool | |
30 | BuildRequires: pango-devel >= 1:1.16.0 | |
31 | BuildRequires: pkgconfig | |
32 | BuildRequires: python-devel >= 1:2.3.5 | |
33 | %{?with_numpy:BuildRequires: python-numpy-devel >= 1:1.0} | |
34 | BuildRequires: python-pycairo-devel >= 1.2.6 | |
35 | BuildRequires: python-pygobject-devel >= 2.22.0 | |
36 | # needs /usr/share/doc/gtk-doc/html/pygobject/style.css | |
37 | BuildRequires: python-pygobject-apidocs | |
38 | BuildRequires: rpm-pythonprov | |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
42 | Python bindings for GTK+ 2.x libraries. This package contains | |
43 | documentation and examples. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Wiązania Pythona do bibliotek GTK+ 2.x. Pakiet zawiera dokumentację | |
47 | oraz przykłady. | |
48 | ||
49 | %package devel | |
50 | Summary: Python bindings for GTK+ 2.x libraries - development files | |
51 | Summary(pl.UTF-8): Wiązania Pythona do bibliotek GTK+ 2.x - część rozwojowa | |
52 | Group: Development/Languages/Python | |
53 | Requires: %{name}-atk = %{epoch}:%{version}-%{release} | |
54 | Requires: %{name}-glade = %{epoch}:%{version}-%{release} | |
55 | Requires: %{name}-gtk = %{epoch}:%{version}-%{release} | |
56 | Requires: %{name}-pango = %{epoch}:%{version}-%{release} | |
57 | Requires: gtk+2-devel >= 2:2.24.0 | |
58 | Requires: python-devel >= 1:2.3.5 | |
59 | Requires: python-pygobject-devel >= 2.22.0 | |
60 | Obsoletes: python-pygtk < 2:2.12.1-2 | |
61 | ||
62 | %description devel | |
63 | This package contains files required to build wrappers for GTK+ addon | |
64 | libraries so that they interoperate with Python bindings. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pakiet zawiera pliki wymagane do zbudowania funkcji do bibliotek GTK+, | |
68 | tak by mogły te biblioteki kooperować z wiązaniami Pythona. | |
69 | ||
70 | %package examples | |
71 | Summary: Example programs for pygtk | |
72 | Summary(pl.UTF-8): Programy przykładowe do pygtk | |
73 | Group: Development/Languages/Python | |
74 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
75 | ||
76 | %description examples | |
77 | This package contains example programs for pygtk. | |
78 | ||
79 | %description examples -l pl.UTF-8 | |
80 | Ten pakiet zawiera przykładowe programy dla pygtk. | |
81 | ||
82 | %package gtk | |
83 | Summary: Python bindings for GTK+ library | |
84 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GTK+ | |
85 | Group: Libraries/Python | |
86 | Requires: %{name}-atk = %{epoch}:%{version}-%{release} | |
87 | Requires: %{name}-pango = %{epoch}:%{version}-%{release} | |
88 | Requires: gtk+2 >= 2:2.24.0 | |
89 | Requires: python-pycairo >= 1.2.6 | |
90 | Obsoletes: python-pygtk-glarea | |
91 | Conflicts: python-pygtk < 1:1.0 | |
92 | ||
93 | %description gtk | |
94 | Python bindings for GTK+ library. | |
95 | ||
96 | %description gtk -l pl.UTF-8 | |
97 | Wiązania Pythona do biblioteki GTK+. | |
98 | ||
99 | %package atk | |
100 | Summary: Python bindings for ATK library | |
101 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki ATK | |
102 | Group: Libraries/Python | |
103 | Requires: atk >= 1:1.12.0 | |
104 | Requires: python-pygobject >= 2.22.0 | |
105 | ||
106 | %description atk | |
107 | Python bindings for ATK library. | |
108 | ||
109 | %description atk -l pl.UTF-8 | |
110 | Wiązania Pythona do biblioteki ATK. | |
111 | ||
112 | %package pango | |
113 | Summary: Python bindings for Pango library | |
114 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki Pango | |
115 | Group: Libraries/Python | |
116 | Requires: pango >= 1:1.16.0 | |
117 | Requires: python-pycairo >= 1.2.6 | |
118 | Requires: python-pygobject >= 2.22.0 | |
119 | ||
120 | %description pango | |
121 | Python bindings for Pango library. | |
122 | ||
123 | %description pango -l pl.UTF-8 | |
124 | Wiązania Pythona do biblioteki Pango. | |
125 | ||
126 | %package glade | |
127 | Summary: Python bindings for Glade library | |
128 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki Glade | |
129 | Group: Libraries/Python | |
130 | Requires: %{name}-gtk = %{epoch}:%{version}-%{release} | |
131 | Requires: libglade2 >= 1:2.6.2 | |
132 | Obsoletes: python-pygtk-libglade < 1:1.0 | |
133 | ||
134 | %description glade | |
135 | Python bindings for Glade library. | |
136 | ||
137 | %description glade -l pl.UTF-8 | |
138 | Wiązania Pythona do biblioteki Glade. | |
139 | ||
140 | %package apidocs | |
141 | Summary: pygtk API documentation | |
142 | Summary(pl.UTF-8): Dokumentacja API pygtk | |
143 | Group: Documentation | |
144 | Requires: gtk-doc-common | |
145 | %if "%{_rpmversion}" >= "5" | |
146 | BuildArch: noarch | |
147 | %endif | |
148 | ||
149 | %description apidocs | |
150 | pygtk API documentation. | |
151 | ||
152 | %description apidocs -l pl.UTF-8 | |
153 | Dokumentacja API pygtk. | |
154 | ||
155 | %prep | |
156 | %setup -q -n %{module}-%{version} | |
157 | %patch0 -p1 | |
158 | %patch1 -p1 | |
159 | ||
160 | # don't remove it | |
161 | #mkdir m4 | |
162 | #cp %{SOURCE1} m4/python.m4 | |
163 | #cp %{SOURCE2} m4/jhflags.m4 | |
164 | ||
165 | %build | |
166 | %{__libtoolize} | |
167 | %{__aclocal} -I m4 | |
168 | %{__autoconf} | |
169 | %{__autoheader} | |
170 | %{__automake} | |
171 | %configure \ | |
172 | --enable-thread \ | |
173 | %{!?with_numpy:--disable-numpy} | |
174 | %{__make} | |
175 | ||
176 | %install | |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
179 | ||
180 | %{__make} install \ | |
181 | DESTDIR=$RPM_BUILD_ROOT \ | |
182 | TARGET_DIR='%{_gtkdocdir}/%{name}' | |
183 | ||
184 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
185 | ||
186 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/{*.la,*/*.la} | |
187 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0/gtk/*.py | |
188 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/pygtk/2.0/{demos,pygtk-demo*} | |
189 | ||
190 | %clean | |
191 | rm -rf $RPM_BUILD_ROOT | |
192 | ||
193 | %files devel | |
194 | %defattr(644,root,root,755) | |
195 | %attr(755,root,root) %{_bindir}/pygtk-codegen-2.0 | |
196 | %attr(755,root,root) %{_bindir}/pygtk-demo | |
197 | %dir %{_datadir}/pygtk | |
198 | %dir %{_datadir}/pygtk/2.0 | |
199 | %dir %{_datadir}/pygtk/2.0/defs | |
200 | %{_datadir}/pygtk/2.0/defs/*.defs | |
201 | %{_datadir}/pygtk/2.0/defs/*.override | |
202 | %{_includedir}/pygtk-2.0 | |
203 | %{_pkgconfigdir}/pygtk-2.0.pc | |
204 | ||
205 | %files examples | |
206 | %defattr(644,root,root,755) | |
207 | %{_examplesdir}/%{name}-%{version} | |
208 | ||
209 | %files gtk | |
210 | %defattr(644,root,root,755) | |
211 | %dir %{py_sitedir}/gtk-2.0/gtk | |
212 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/_gtk.so | |
213 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtkunixprint.so | |
214 | %{py_sitedir}/gtk-2.0/gtk/*.py[co] | |
215 | ||
216 | %files atk | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/atk.so | |
219 | ||
220 | %files pango | |
221 | %defattr(644,root,root,755) | |
222 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/pango.so | |
223 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/pangocairo.so | |
224 | ||
225 | %files glade | |
226 | %defattr(644,root,root,755) | |
227 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/gtk/glade.so | |
228 | ||
229 | %files apidocs | |
230 | %defattr(644,root,root,755) | |
231 | %{_gtkdocdir}/%{name} |