]>
Commit | Line | Data |
---|---|---|
a5fba226 AF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
63e1dd2b | 5 | |
a5fba226 | 6 | %define module pygobject |
a5fba226 AF |
7 | Summary: Python bindings for GObject library |
8 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
9 | Name: python-%{module}3 | |
26d401ad JB |
10 | Version: 3.4.2 |
11 | Release: 1 | |
a5fba226 AF |
12 | License: LGPL v2+ |
13 | Group: Libraries/Python | |
5882833c | 14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.4/%{module}-%{version}.tar.xz |
26d401ad | 15 | # Source0-md5: a17b3897507f179d643e02f5abf111ac |
03a4e676 | 16 | URL: https://live.gnome.org/PyGObject |
f6b2e85a | 17 | Patch0: link.patch |
a5fba226 | 18 | BuildRequires: autoconf >= 2.52 |
3955a8b7 | 19 | BuildRequires: automake >= 1:1.11 |
590b40c5 | 20 | BuildRequires: cairo-gobject-devel |
5882833c | 21 | BuildRequires: glib2-devel >= 1:2.34.0 |
9cb81703 | 22 | BuildRequires: gobject-introspection-devel >= 1.34.1.1 |
a5fba226 AF |
23 | BuildRequires: libffi-devel >= 3.0 |
24 | BuildRequires: libtool | |
a5fba226 | 25 | BuildRequires: pkgconfig |
81604870 | 26 | BuildRequires: pkgconfig(libffi) >= 3.0 |
a5fba226 AF |
27 | BuildRequires: rpm-pythonprov |
28 | BuildRequires: tar >= 1:1.22 | |
29 | BuildRequires: xz | |
30 | %if %{with python2} | |
bebf1ce0 | 31 | BuildRequires: python-devel >= 1:2.6 |
a5fba226 AF |
32 | BuildRequires: python-pycairo-devel >= 1.2.0 |
33 | %pyrequires_eq python-modules | |
34 | %endif | |
35 | %if %{with python3} | |
f6b2e85a AF |
36 | BuildRequires: python3 >= 3.2.2-3 |
37 | BuildRequires: python3-devel >= 3.2.2-3 | |
38 | BuildRequires: python3-modules >= 3.2.2-3 | |
3955a8b7 | 39 | BuildRequires: python3-pycairo-devel >= 1.10.0 |
a5fba226 | 40 | %endif |
5882833c | 41 | Requires: glib2 >= 1:2.34.0 |
9cb81703 | 42 | Requires: gobject-introspection >= 1.34.1.1 |
23ea25eb | 43 | Conflicts: python-pygobject < 2.28.6-3 |
a5fba226 AF |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
a5fba226 AF |
46 | %description |
47 | Python bindings for GObject library. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Wiązania Pythona do biblioteki GObject. | |
51 | ||
3955a8b7 AF |
52 | %package common-devel |
53 | Summary: Python bindings for GObject library | |
54 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
55 | Group: Development/Languages/Python | |
56 | Requires: %{name} = %{version}-%{release} | |
5882833c | 57 | Requires: glib2-devel >= 1:2.34.0 |
3955a8b7 AF |
58 | Requires: libffi-devel >= 3.0 |
59 | ||
d1050d12 | 60 | %description common-devel |
538a43f0 ŁK |
61 | This package contains headers files required to build wrappers for |
62 | GObject addon libraries so that they interoperate with Python | |
3955a8b7 AF |
63 | bindings. |
64 | ||
d1050d12 | 65 | %description common-devel -l pl.UTF-8 |
538a43f0 ŁK |
66 | Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do |
67 | biblioteki GObject, tak by mogły te biblioteki kooperowaći z | |
68 | wiązaniami Pythona. | |
3955a8b7 | 69 | |
a5fba226 AF |
70 | %package devel |
71 | Summary: Python bindings for GObject library | |
72 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
73 | Group: Development/Languages/Python | |
74 | Requires: %{name} = %{version}-%{release} | |
3955a8b7 | 75 | Requires: %{name}-common-devel = %{version}-%{release} |
5882833c | 76 | Requires: glib2-devel >= 1:2.34.0 |
a5fba226 | 77 | Requires: libffi-devel >= 3.0 |
bebf1ce0 | 78 | Requires: python-devel >= 1:2.6 |
a5fba226 AF |
79 | |
80 | %description devel | |
81 | This package contains files required to build wrappers for GObject | |
82 | addon libraries so that they interoperate with Python bindings. | |
83 | ||
84 | %description devel -l pl.UTF-8 | |
85 | Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki | |
86 | GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona. | |
87 | ||
88 | %package -n python3-pygobject3 | |
89 | Summary: Python 3.x bindings for GObject library | |
90 | Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject | |
91 | Group: Libraries/Python | |
bebf1ce0 | 92 | Requires: glib2 >= 1:2.34.0 |
9cb81703 | 93 | Requires: gobject-introspection >= 1.34.1.1 |
538a43f0 | 94 | Conflicts: python3-pygobject < 2.28.6-3 |
a5fba226 AF |
95 | |
96 | %description -n python3-pygobject3 | |
97 | Python 3.x bindings for GObject library. | |
98 | ||
99 | %description -n python3-pygobject3 -l pl.UTF-8 | |
100 | Wiązania Pythona 3.x do biblioteki GObject. | |
101 | ||
102 | %package -n python3-pygobject3-devel | |
103 | Summary: Python bindings for GObject library | |
104 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
105 | Group: Development/Languages/Python | |
538a43f0 | 106 | Requires: %{name}-common-devel = %{version}-%{release} |
5882833c | 107 | Requires: glib2-devel >= 1:2.34.0 |
a5fba226 | 108 | Requires: libffi-devel >= 3.0 |
3955a8b7 | 109 | Requires: python3-devel >= 3.1 |
97dc7172 | 110 | Requires: python3-pygobject3 = %{version}-%{release} |
a5fba226 AF |
111 | |
112 | %description -n python3-pygobject3-devel | |
113 | This package contains files required to build wrappers for GObject | |
114 | addon libraries so that they interoperate with Python bindings. | |
115 | ||
116 | %description -n python3-pygobject3-devel -l pl.UTF-8 | |
117 | Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki | |
118 | GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona. | |
119 | ||
120 | %package examples | |
121 | Summary: Example programs for GObject library | |
122 | Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject | |
123 | Group: Development/Languages/Python | |
124 | Requires: %{name}-devel = %{version}-%{release} | |
a5fba226 AF |
125 | |
126 | %description examples | |
127 | This package contains example programs for GObject library. | |
128 | ||
129 | %description examples -l pl.UTF-8 | |
130 | Ten pakiet zawiera przykładowe programy dla biblioteki GObject. | |
131 | ||
132 | %package apidocs | |
133 | Summary: pygobject API documentation | |
134 | Summary(pl.UTF-8): Dokumentacja API pygobject | |
135 | Group: Documentation | |
136 | Requires: gtk-doc-common | |
137 | ||
138 | %description apidocs | |
139 | pygobject API documentation. | |
140 | ||
141 | %description apidocs -l pl.UTF-8 | |
142 | Dokumentacja API pygobject. | |
143 | ||
144 | %prep | |
145 | %setup -q -n %{module}-%{version} | |
f6b2e85a | 146 | %patch0 -p1 |
a5fba226 AF |
147 | |
148 | %build | |
149 | %{__libtoolize} | |
150 | %{__aclocal} -I m4 | |
151 | %{__autoconf} | |
152 | %{__autoheader} | |
153 | %{__automake} | |
154 | %if %{with python3} | |
155 | mkdir py3 | |
156 | cd py3 | |
157 | ../%configure \ | |
158 | PYTHON=/usr/bin/python3 \ | |
f6b2e85a | 159 | PYTHON_LIBS=-lpython3 \ |
a5fba226 AF |
160 | --disable-silent-rules |
161 | %{__make} | |
162 | cd .. | |
163 | %endif | |
164 | %if %{with python2} | |
165 | mkdir py2 | |
166 | cd py2 | |
167 | ../%configure \ | |
168 | PYTHON=%{__python} \ | |
f6b2e85a | 169 | PYTHON_LIBS=-lpython \ |
a5fba226 AF |
170 | --disable-silent-rules |
171 | %{__make} | |
172 | cd .. | |
173 | %endif | |
174 | ||
175 | %install | |
176 | rm -rf $RPM_BUILD_ROOT | |
177 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
178 | ||
179 | %if %{with python3} | |
180 | %{__make} -C py3 -j 1 install \ | |
181 | DESTDIR=$RPM_BUILD_ROOT \ | |
182 | TARGET_DIR=%{_gtkdocdir}/%{module} | |
183 | %endif | |
184 | %if %{with python2} | |
185 | %{__make} -C py2 -j 1 install \ | |
186 | DESTDIR=$RPM_BUILD_ROOT \ | |
187 | TARGET_DIR=%{_gtkdocdir}/%{module} | |
188 | %endif | |
189 | ||
190 | cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
191 | ||
192 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
193 | ||
194 | %if %{with python2} | |
195 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/{*/,}/*.la | |
e9ba7e96 | 196 | %py_postclean |
a5fba226 AF |
197 | %endif |
198 | %if %{with python3} | |
199 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/{*/,}*.la | |
200 | %endif | |
201 | ||
202 | %clean | |
203 | rm -rf $RPM_BUILD_ROOT | |
204 | ||
205 | %post -p /sbin/ldconfig | |
206 | %postun -p /sbin/ldconfig | |
207 | ||
63e1dd2b ER |
208 | %post -n python3-pygobject3 -p /sbin/ldconfig |
209 | %postun -n python3-pygobject3 -p /sbin/ldconfig | |
210 | ||
a5fba226 AF |
211 | %if %{with python2} |
212 | %files | |
213 | %defattr(644,root,root,755) | |
214 | %doc AUTHORS ChangeLog NEWS README | |
215 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python.so.*.*.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-gi-2.0-python.so.0 | |
a5fba226 AF |
217 | %dir %{py_sitedir}/gi |
218 | %dir %{py_sitedir}/gi/overrides | |
219 | %{py_sitedir}/gi/overrides/*.py[co] | |
220 | %dir %{py_sitedir}/gi/repository | |
221 | %{py_sitedir}/gi/repository/*.py[co] | |
222 | %{py_sitedir}/gi/*.py[co] | |
223 | %attr(755,root,root) %{py_sitedir}/gi/_gi.so | |
224 | %attr(755,root,root) %{py_sitedir}/gi/_gi_cairo.so | |
225 | %dir %{py_sitedir}/gi/_glib | |
226 | %attr(755,root,root) %{py_sitedir}/gi/_glib/_glib.so | |
227 | %{py_sitedir}/gi/_glib/*.py[co] | |
228 | %dir %{py_sitedir}/gi/_gobject | |
229 | %attr(755,root,root) %{py_sitedir}/gi/_gobject/_gobject.so | |
230 | %{py_sitedir}/gi/_gobject/*.py[co] | |
9cb81703 | 231 | %{py_sitedir}/pygobject-%{version}-py*.egg-info |
a5fba226 | 232 | |
3955a8b7 | 233 | %files common-devel |
a5fba226 | 234 | %defattr(644,root,root,755) |
a5fba226 AF |
235 | %{_includedir}/pygobject-3.0 |
236 | %{_pkgconfigdir}/pygobject-3.0.pc | |
3955a8b7 AF |
237 | |
238 | %files devel | |
239 | %defattr(644,root,root,755) | |
240 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python.so | |
a5fba226 AF |
241 | %endif |
242 | ||
243 | %if %{with python3} | |
244 | %files -n python3-pygobject3 | |
245 | %defattr(644,root,root,755) | |
246 | %doc AUTHORS ChangeLog NEWS README | |
247 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python3.so.*.*.* | |
248 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-gi-2.0-python3.so.0 | |
249 | %dir %{py3_sitedir}/gi | |
250 | %dir %{py3_sitedir}/gi/overrides | |
251 | %{py3_sitedir}/gi/overrides/*.py* | |
252 | #%{py3_sitedir}/gi/overrides/__pycache__ | |
253 | %dir %{py3_sitedir}/gi/repository | |
254 | %{py3_sitedir}/gi/repository/*.py* | |
255 | #%{py3_sitedir}/gi/repository/__pycache__ | |
256 | %{py3_sitedir}/gi/*.py* | |
257 | #%{py3_sitedir}/gi/__pycache__ | |
258 | %attr(755,root,root) %{py3_sitedir}/gi/_gi.*so | |
259 | %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.*so | |
260 | %dir %{py3_sitedir}/gi/_glib | |
261 | %attr(755,root,root) %{py3_sitedir}/gi/_glib/_glib.*so | |
262 | %{py3_sitedir}/gi/_glib/*.py* | |
a5fba226 AF |
263 | #%{py3_sitedir}/glib/__pycache__ |
264 | %dir %{py3_sitedir}/gi/_gobject | |
265 | %attr(755,root,root) %{py3_sitedir}/gi/_gobject/_gobject.*so | |
266 | %{py3_sitedir}/gi/_gobject/*.py* | |
267 | #%{py3_sitedir}/gobject/__pycache__ | |
9cb81703 | 268 | %{py3_sitedir}/pygobject-%{version}-py*.egg-info |
a5fba226 AF |
269 | |
270 | %files -n python3-pygobject3-devel | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python3.so | |
273 | %endif | |
274 | ||
275 | %files examples | |
276 | %defattr(644,root,root,755) | |
277 | %{_examplesdir}/%{name}-%{version} | |
278 | ||
e9ba7e96 AF |
279 | #%files apidocs |
280 | #%defattr(644,root,root,755) | |
281 | #%{_gtkdocdir}/%{module} |