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