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