]>
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 | |
decdeaaa | 10 | Version: 3.8.0 |
26d401ad | 11 | Release: 1 |
a5fba226 AF |
12 | License: LGPL v2+ |
13 | Group: Libraries/Python | |
decdeaaa ŁK |
14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.8/%{module}-%{version}.tar.xz |
15 | # Source0-md5: 5a1dc34c787b4320da032e87412caca4 | |
03a4e676 | 16 | URL: https://live.gnome.org/PyGObject |
f6b2e85a | 17 | Patch0: link.patch |
decdeaaa ŁK |
18 | BuildRequires: autoconf >= 2.68 |
19 | BuildRequires: automake >= 1:1.11.1 | |
590b40c5 | 20 | BuildRequires: cairo-gobject-devel |
decdeaaa | 21 | BuildRequires: glib2-devel >= 1:2.34.2 |
9cb81703 | 22 | BuildRequires: gobject-introspection-devel >= 1.34.1.1 |
a5fba226 | 23 | BuildRequires: libffi-devel >= 3.0 |
decdeaaa | 24 | BuildRequires: libtool >= 2.2.6 |
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 | 32 | BuildRequires: python-pycairo-devel >= 1.2.0 |
decdeaaa | 33 | Requires: python-modules |
a5fba226 AF |
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 |
decdeaaa | 41 | Requires: glib2 >= 1:2.34.2 |
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} | |
decdeaaa | 57 | Requires: glib2-devel >= 1:2.34.2 |
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} |
decdeaaa | 76 | Requires: glib2-devel >= 1:2.34.2 |
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 | |
decdeaaa | 92 | Requires: glib2 >= 1:2.34.2 |
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} |
decdeaaa | 107 | Requires: glib2-devel >= 1:2.34.2 |
a5fba226 | 108 | Requires: libffi-devel >= 3.0 |
decdeaaa | 109 | Requires: python3-devel >= 3.2 |
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 | ||
a5fba226 AF |
132 | %prep |
133 | %setup -q -n %{module}-%{version} | |
f6b2e85a | 134 | %patch0 -p1 |
a5fba226 AF |
135 | |
136 | %build | |
137 | %{__libtoolize} | |
138 | %{__aclocal} -I m4 | |
139 | %{__autoconf} | |
140 | %{__autoheader} | |
141 | %{__automake} | |
142 | %if %{with python3} | |
143 | mkdir py3 | |
144 | cd py3 | |
145 | ../%configure \ | |
146 | PYTHON=/usr/bin/python3 \ | |
f6b2e85a | 147 | PYTHON_LIBS=-lpython3 \ |
a5fba226 AF |
148 | --disable-silent-rules |
149 | %{__make} | |
150 | cd .. | |
151 | %endif | |
152 | %if %{with python2} | |
153 | mkdir py2 | |
154 | cd py2 | |
155 | ../%configure \ | |
156 | PYTHON=%{__python} \ | |
f6b2e85a | 157 | PYTHON_LIBS=-lpython \ |
a5fba226 AF |
158 | --disable-silent-rules |
159 | %{__make} | |
160 | cd .. | |
161 | %endif | |
162 | ||
163 | %install | |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
166 | ||
167 | %if %{with python3} | |
168 | %{__make} -C py3 -j 1 install \ | |
169 | DESTDIR=$RPM_BUILD_ROOT \ | |
170 | TARGET_DIR=%{_gtkdocdir}/%{module} | |
171 | %endif | |
172 | %if %{with python2} | |
173 | %{__make} -C py2 -j 1 install \ | |
174 | DESTDIR=$RPM_BUILD_ROOT \ | |
175 | TARGET_DIR=%{_gtkdocdir}/%{module} | |
176 | %endif | |
177 | ||
178 | cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
179 | ||
180 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
181 | ||
182 | %if %{with python2} | |
183 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/{*/,}/*.la | |
e9ba7e96 | 184 | %py_postclean |
a5fba226 AF |
185 | %endif |
186 | %if %{with python3} | |
187 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/{*/,}*.la | |
188 | %endif | |
189 | ||
190 | %clean | |
191 | rm -rf $RPM_BUILD_ROOT | |
192 | ||
193 | %post -p /sbin/ldconfig | |
194 | %postun -p /sbin/ldconfig | |
195 | ||
63e1dd2b ER |
196 | %post -n python3-pygobject3 -p /sbin/ldconfig |
197 | %postun -n python3-pygobject3 -p /sbin/ldconfig | |
198 | ||
a5fba226 AF |
199 | %if %{with python2} |
200 | %files | |
201 | %defattr(644,root,root,755) | |
202 | %doc AUTHORS ChangeLog NEWS README | |
203 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python.so.*.*.* | |
204 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-gi-2.0-python.so.0 | |
a5fba226 | 205 | %dir %{py_sitedir}/gi |
decdeaaa ŁK |
206 | %attr(755,root,root) %{py_sitedir}/gi/_gi.so |
207 | %attr(755,root,root) %{py_sitedir}/gi/_gi_cairo.so | |
208 | %{py_sitedir}/gi/*.py[co] | |
a5fba226 AF |
209 | %dir %{py_sitedir}/gi/overrides |
210 | %{py_sitedir}/gi/overrides/*.py[co] | |
211 | %dir %{py_sitedir}/gi/repository | |
212 | %{py_sitedir}/gi/repository/*.py[co] | |
a5fba226 AF |
213 | %dir %{py_sitedir}/gi/_glib |
214 | %attr(755,root,root) %{py_sitedir}/gi/_glib/_glib.so | |
215 | %{py_sitedir}/gi/_glib/*.py[co] | |
216 | %dir %{py_sitedir}/gi/_gobject | |
217 | %attr(755,root,root) %{py_sitedir}/gi/_gobject/_gobject.so | |
218 | %{py_sitedir}/gi/_gobject/*.py[co] | |
decdeaaa ŁK |
219 | %dir %{py_sitedir}/pygtkcompat |
220 | %{py_sitedir}/pygtkcompat/*.py[co] | |
9cb81703 | 221 | %{py_sitedir}/pygobject-%{version}-py*.egg-info |
a5fba226 | 222 | |
3955a8b7 | 223 | %files common-devel |
a5fba226 | 224 | %defattr(644,root,root,755) |
a5fba226 AF |
225 | %{_includedir}/pygobject-3.0 |
226 | %{_pkgconfigdir}/pygobject-3.0.pc | |
3955a8b7 AF |
227 | |
228 | %files devel | |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python.so | |
a5fba226 AF |
231 | %endif |
232 | ||
233 | %if %{with python3} | |
234 | %files -n python3-pygobject3 | |
235 | %defattr(644,root,root,755) | |
236 | %doc AUTHORS ChangeLog NEWS README | |
237 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python3.so.*.*.* | |
238 | %attr(755,root,root) %ghost %{_libdir}/libpyglib-gi-2.0-python3.so.0 | |
239 | %dir %{py3_sitedir}/gi | |
decdeaaa ŁK |
240 | %attr(755,root,root) %{py3_sitedir}/gi/_gi.*so |
241 | %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.*so | |
242 | %{py3_sitedir}/gi/*.py* | |
243 | %{py3_sitedir}/gi/__pycache__ | |
a5fba226 AF |
244 | %dir %{py3_sitedir}/gi/overrides |
245 | %{py3_sitedir}/gi/overrides/*.py* | |
decdeaaa | 246 | %{py3_sitedir}/gi/overrides/__pycache__ |
a5fba226 AF |
247 | %dir %{py3_sitedir}/gi/repository |
248 | %{py3_sitedir}/gi/repository/*.py* | |
decdeaaa | 249 | %{py3_sitedir}/gi/repository/__pycache__ |
a5fba226 AF |
250 | %dir %{py3_sitedir}/gi/_glib |
251 | %attr(755,root,root) %{py3_sitedir}/gi/_glib/_glib.*so | |
252 | %{py3_sitedir}/gi/_glib/*.py* | |
decdeaaa | 253 | %{py3_sitedir}/gi/_glib/__pycache__ |
a5fba226 AF |
254 | %dir %{py3_sitedir}/gi/_gobject |
255 | %attr(755,root,root) %{py3_sitedir}/gi/_gobject/_gobject.*so | |
256 | %{py3_sitedir}/gi/_gobject/*.py* | |
decdeaaa ŁK |
257 | %{py3_sitedir}/gi/_gobject/__pycache__ |
258 | %dir %{py3_sitedir}/pygtkcompat | |
259 | %{py3_sitedir}/pygtkcompat/*.py* | |
260 | %{py3_sitedir}/pygtkcompat/__pycache__ | |
9cb81703 | 261 | %{py3_sitedir}/pygobject-%{version}-py*.egg-info |
a5fba226 AF |
262 | |
263 | %files -n python3-pygobject3-devel | |
264 | %defattr(644,root,root,755) | |
265 | %attr(755,root,root) %{_libdir}/libpyglib-gi-2.0-python3.so | |
266 | %endif | |
267 | ||
268 | %files examples | |
269 | %defattr(644,root,root,755) | |
270 | %{_examplesdir}/%{name}-%{version} |