]>
Commit | Line | Data |
---|---|---|
0a584574 | 1 | # |
7a5831db JB |
2 | # Conditional build: |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
a1521d85 | 5 | # |
0a584574 | 6 | %define module pygobject |
7 | # | |
8 | Summary: Python bindings for GObject library | |
2cdd04b8 | 9 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject |
0a584574 | 10 | Name: python-%{module} |
5a0f1c33 | 11 | Version: 2.28.6 |
2a5c91cf | 12 | Release: 4 |
e4e2e839 | 13 | License: LGPL v2+ |
0a584574 | 14 | Group: Libraries/Python |
5a0f1c33 JB |
15 | Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/%{module}-%{version}.tar.xz |
16 | # Source0-md5: 9415cb7f2b3a847f2310ccea258b101e | |
21a966bd | 17 | Patch0: %{name}-pc.patch |
b02ddf04 | 18 | Patch1: %{name}-pyc.patch |
ba5bf5ff | 19 | Patch2: gio.patch |
7a5831db | 20 | Patch3: %{name}-pycairo.patch |
0a584574 | 21 | URL: http://www.pygtk.org/ |
22 | BuildRequires: autoconf >= 2.52 | |
d316a47d | 23 | BuildRequires: automake >= 1:1.7 |
5a0f1c33 | 24 | BuildRequires: glib2-devel >= 1:2.24.0 |
c79d4059 | 25 | BuildRequires: gobject-introspection-devel >= 0.10.2 |
63b9ab8d | 26 | BuildRequires: libffi-devel >= 3.0 |
0a584574 | 27 | BuildRequires: libtool |
e4e2e839 | 28 | BuildRequires: libxslt-progs >= 1.1.22 |
c92dc8c2 | 29 | BuildRequires: pkgconfig |
a1521d85 | 30 | BuildRequires: rpm-pythonprov |
5a0f1c33 JB |
31 | BuildRequires: tar >= 1:1.22 |
32 | BuildRequires: xz | |
a1521d85 | 33 | %if %{with python2} |
a79efc8f | 34 | BuildRequires: python-devel >= 1:2.5.2 |
5a0f1c33 | 35 | BuildRequires: python-pycairo-devel >= 1.2.0 |
a79efc8f | 36 | %pyrequires_eq python-modules |
a1521d85 AF |
37 | %endif |
38 | %if %{with python3} | |
39 | BuildRequires: python3 | |
40 | BuildRequires: python3-devel | |
41 | BuildRequires: python3-modules | |
c79d4059 | 42 | BuildRequires: python3-pycairo-devel >= 1.8.10 |
a1521d85 | 43 | %endif |
5a0f1c33 | 44 | Requires: glib2 >= 1:2.24.0 |
80fcd2e7 | 45 | Requires: gobject-introspection >= 0.9.5 |
d0769ffd | 46 | Provides: python-pygtk-gobject |
0a584574 | 47 | Obsoletes: python-pygtk-glarea |
48 | Obsoletes: python-pygtk-gobject | |
b02ddf04 | 49 | Conflicts: python-pygtk < 1:1.0 |
0a584574 | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
eee09ad7 | 52 | # python provides Py* and _Py* symbols at runtime |
ba5bf5ff | 53 | %define skip_post_check_so libpyglib-2.0-python3?.so.* |
e3c2e3f2 | 54 | |
0a584574 | 55 | %description |
56 | Python bindings for GObject library. | |
57 | ||
1e5a13f0 JR |
58 | %description -l pl.UTF-8 |
59 | Wiązania Pythona do biblioteki GObject. | |
0a584574 | 60 | |
61 | %package devel | |
62 | Summary: Python bindings for GObject library | |
2cdd04b8 | 63 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject |
0a584574 | 64 | Group: Development/Languages/Python |
65 | Requires: %{name} = %{version}-%{release} | |
5a0f1c33 | 66 | Requires: glib2-devel >= 1:2.24.0 |
63b9ab8d | 67 | Requires: libffi-devel >= 3.0 |
a79efc8f | 68 | Requires: python-devel >= 1:2.5.2 |
0a584574 | 69 | |
70 | %description devel | |
71 | This package contains files required to build wrappers for GObject | |
72 | addon libraries so that they interoperate with Python bindings. | |
73 | ||
1e5a13f0 | 74 | %description devel -l pl.UTF-8 |
0a584574 | 75 | Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki |
1e5a13f0 | 76 | GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona. |
0a584574 | 77 | |
ba5bf5ff AF |
78 | %package -n python3-pygobject |
79 | Summary: Python 3.x bindings for GObject library | |
80 | Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject | |
81 | Group: Libraries/Python | |
82 | ||
83 | %description -n python3-pygobject | |
84 | Python 3.x bindings for GObject library. | |
85 | ||
ea043c53 | 86 | %description -n python3-pygobject -l pl.UTF-8 |
ba5bf5ff AF |
87 | Wiązania Pythona 3.x do biblioteki GObject. |
88 | ||
c79d4059 | 89 | %package -n python3-pygobject-devel |
90 | Summary: Python bindings for GObject library | |
91 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
92 | Group: Development/Languages/Python | |
5a0f1c33 | 93 | Requires: glib2-devel >= 1:2.24.0 |
c79d4059 | 94 | Requires: libffi-devel >= 3.0 |
95 | Requires: python3-devel | |
96 | Requires: python3-pygobject = %{version}-%{release} | |
97 | ||
98 | %description -n python3-pygobject-devel | |
99 | This package contains files required to build wrappers for GObject | |
100 | addon libraries so that they interoperate with Python bindings. | |
101 | ||
102 | %description -n python3-pygobject-devel -l pl.UTF-8 | |
103 | Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki | |
104 | GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona. | |
105 | ||
0a584574 | 106 | %package examples |
107 | Summary: Example programs for GObject library | |
2cdd04b8 | 108 | Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject |
0a584574 | 109 | Group: Development/Languages/Python |
110 | Requires: %{name}-devel = %{version}-%{release} | |
111 | Obsoletes: python-pygtk | |
112 | ||
113 | %description examples | |
114 | This package contains example programs for GObject library. | |
115 | ||
1e5a13f0 JR |
116 | %description examples -l pl.UTF-8 |
117 | Ten pakiet zawiera przykładowe programy dla biblioteki GObject. | |
0a584574 | 118 | |
e591eb27 | 119 | %package apidocs |
120 | Summary: pygobject API documentation | |
2cdd04b8 | 121 | Summary(pl.UTF-8): Dokumentacja API pygobject |
e591eb27 | 122 | Group: Documentation |
123 | Requires: gtk-doc-common | |
124 | ||
125 | %description apidocs | |
126 | pygobject API documentation. | |
127 | ||
1e5a13f0 | 128 | %description apidocs -l pl.UTF-8 |
e591eb27 | 129 | Dokumentacja API pygobject. |
130 | ||
0a584574 | 131 | %prep |
132 | %setup -q -n %{module}-%{version} | |
21a966bd | 133 | %patch0 -p1 |
b02ddf04 | 134 | %patch1 -p1 |
ba5bf5ff | 135 | %patch2 -p1 |
7a5831db | 136 | %patch3 -p1 |
0a584574 | 137 | |
0a584574 | 138 | %build |
139 | %{__libtoolize} | |
140 | %{__aclocal} -I m4 | |
141 | %{__autoconf} | |
142 | %{__autoheader} | |
143 | %{__automake} | |
a1521d85 | 144 | %if %{with python3} |
ba5bf5ff AF |
145 | mkdir py3 |
146 | cd py3 | |
147 | ../%configure \ | |
148 | PYTHON=/usr/bin/python3 \ | |
cb2f161e | 149 | --disable-introspection \ |
ba5bf5ff | 150 | --disable-silent-rules |
a1521d85 | 151 | %{__make} |
ba5bf5ff | 152 | cd .. |
a1521d85 AF |
153 | %endif |
154 | %if %{with python2} | |
ba5bf5ff AF |
155 | mkdir py2 |
156 | cd py2 | |
157 | ../%configure \ | |
158 | PYTHON=%{__python} \ | |
cb2f161e | 159 | --disable-introspection \ |
a79efc8f | 160 | --disable-silent-rules |
a1521d85 | 161 | %{__make} |
ba5bf5ff | 162 | cd .. |
a1521d85 | 163 | %endif |
0a584574 | 164 | |
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
b02ddf04 | 167 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
0a584574 | 168 | |
a1521d85 | 169 | %if %{with python3} |
7a5831db | 170 | %{__make} -C py3 -j 1 install \ |
133c66a8 | 171 | DESTDIR=$RPM_BUILD_ROOT \ |
e4e2e839 | 172 | TARGET_DIR=%{_gtkdocdir}/%{module} |
a1521d85 AF |
173 | %endif |
174 | %if %{with python2} | |
7a5831db | 175 | %{__make} -C py2 -j 1 install \ |
ba5bf5ff AF |
176 | DESTDIR=$RPM_BUILD_ROOT \ |
177 | TARGET_DIR=%{_gtkdocdir}/%{module} | |
a1521d85 | 178 | %endif |
0a584574 | 179 | |
b02ddf04 | 180 | cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
c8cce660 | 181 | |
7badeb3a | 182 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
b02ddf04 | 183 | |
a1521d85 | 184 | %if %{with python2} |
7badeb3a | 185 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/{gtk-2.0/,}*/*.la |
7c4a7622 AF |
186 | %py_comp $RPM_BUILD_ROOT%{_datadir}/%{module}/2.0/codegen |
187 | %py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{module}/2.0/codegen | |
b02ddf04 | 188 | %py_postclean %{_datadir}/%{module}/2.0/codegen |
a1521d85 AF |
189 | %endif |
190 | %if %{with python3} | |
7badeb3a | 191 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*/*.la |
a1521d85 | 192 | %endif |
0a584574 | 193 | |
194 | %clean | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
2e6dab46 | 197 | %post -p /sbin/ldconfig |
198 | %postun -p /sbin/ldconfig | |
199 | ||
a1521d85 | 200 | %if %{with python2} |
0a584574 | 201 | %files |
202 | %defattr(644,root,root,755) | |
203 | %doc AUTHORS ChangeLog NEWS README | |
5ce00d47 | 204 | %attr(755,root,root) %{_libdir}/libpyglib-2.0-python.so.*.*.* |
205 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-2.0-python.so.0 | |
0a584574 | 206 | %dir %{py_sitedir}/gtk-2.0 |
2e6dab46 | 207 | %dir %{py_sitedir}/gtk-2.0/gio |
b02ddf04 MB |
208 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/gio/_gio.so |
209 | %attr(755,root,root) %{py_sitedir}/gtk-2.0/gio/unix.so | |
2e6dab46 | 210 | %{py_sitedir}/gtk-2.0/gio/*.py[co] |
c79d4059 | 211 | %dir %{py_sitedir}/glib |
212 | %attr(755,root,root) %{py_sitedir}/glib/_glib.so | |
213 | %{py_sitedir}/glib/*.py[co] | |
214 | %dir %{py_sitedir}/gobject | |
215 | %attr(755,root,root) %{py_sitedir}/gobject/_gobject.so | |
216 | %{py_sitedir}/gobject/*.py[co] | |
0a584574 | 217 | %{py_sitedir}/gtk-2.0/*.py[co] |
a79efc8f | 218 | %{py_sitedir}/pygtk.py[co] |
0a584574 | 219 | %{py_sitedir}/pygtk.pth |
67b4ad40 | 220 | %dir %{_datadir}/%{module} |
221 | %dir %{_datadir}/%{module}/xsl | |
0a584574 | 222 | |
223 | %files devel | |
224 | %defattr(644,root,root,755) | |
b02ddf04 | 225 | %attr(755,root,root) %{_bindir}/pygobject-codegen-2.0 |
5ce00d47 | 226 | %attr(755,root,root) %{_libdir}/libpyglib-2.0-python.so |
0a584574 | 227 | %{_includedir}/pygtk-2.0 |
a79efc8f | 228 | %{_pkgconfigdir}/pygobject-2.0.pc |
b02ddf04 MB |
229 | %dir %{_datadir}/%{module}/2.0 |
230 | %dir %{_datadir}/%{module}/2.0/codegen | |
231 | %{_datadir}/%{module}/2.0/codegen/*.py[co] | |
232 | %dir %{_datadir}/%{module}/2.0/defs | |
233 | %{_datadir}/%{module}/2.0/defs/*.defs | |
234 | %{_datadir}/%{module}/2.0/defs/*.override | |
eed9edcf | 235 | %{_datadir}/%{module}/xsl/*.py |
67b4ad40 | 236 | %{_datadir}/%{module}/xsl/*.xsl |
a1521d85 | 237 | %endif |
0a584574 | 238 | |
a1521d85 | 239 | %if %{with python3} |
ba5bf5ff AF |
240 | %files -n python3-pygobject |
241 | %defattr(644,root,root,755) | |
242 | %doc AUTHORS ChangeLog NEWS README | |
243 | %attr(755,root,root) %{_libdir}/libpyglib-2.0-python3.so.*.*.* | |
244 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-2.0-python3.so.0 | |
245 | %dir %{py3_sitedir}/gtk-2.0 | |
246 | %dir %{py3_sitedir}/gtk-2.0/gio | |
7e8fbfd7 JK |
247 | %{py3_sitedir}/gtk-2.0/gio/*.py* |
248 | #%{py3_sitedir}/gtk-2.0/gio/__pycache__ | |
c79d4059 | 249 | %dir %{py3_sitedir}/glib |
7e8fbfd7 JK |
250 | %attr(755,root,root) %{py3_sitedir}/glib/_glib.*so |
251 | %{py3_sitedir}/glib/*.py* | |
252 | #%{py3_sitedir}/glib/__pycache__ | |
c79d4059 | 253 | %dir %{py3_sitedir}/gobject |
7e8fbfd7 JK |
254 | %attr(755,root,root) %{py3_sitedir}/gobject/_gobject.*so |
255 | %{py3_sitedir}/gobject/*.py* | |
256 | #%{py3_sitedir}/gobject/__pycache__ | |
257 | %{py3_sitedir}/gtk-2.0/*.py* | |
258 | #%{py3_sitedir}/gtk-2.0/__pycache__ | |
259 | %{py3_sitedir}/pygtk.py* | |
ba5bf5ff | 260 | %{py3_sitedir}/pygtk.pth |
7e8fbfd7 | 261 | #%{py3_sitedir}/__pycache__ |
c79d4059 | 262 | |
263 | %files -n python3-pygobject-devel | |
264 | %defattr(644,root,root,755) | |
265 | %attr(755,root,root) %{_libdir}/libpyglib-2.0-python3.so | |
a1521d85 | 266 | %endif |
c79d4059 | 267 | |
0a584574 | 268 | %files examples |
269 | %defattr(644,root,root,755) | |
270 | %{_examplesdir}/%{name}-%{version} | |
e591eb27 | 271 | |
272 | %files apidocs | |
273 | %defattr(644,root,root,755) | |
19e038b8 | 274 | %{_gtkdocdir}/%{module} |