]> git.pld-linux.org Git - packages/python-pygobject3.git/blame - python-pygobject3.spec
BR: cairo-gobject-devel
[packages/python-pygobject3.git] / python-pygobject3.spec
CommitLineData
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
7Summary: Python bindings for GObject library
8Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
9Name: python-%{module}3
26d401ad
JB
10Version: 3.4.2
11Release: 1
a5fba226
AF
12License: LGPL v2+
13Group: Libraries/Python
5882833c 14Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.4/%{module}-%{version}.tar.xz
26d401ad 15# Source0-md5: a17b3897507f179d643e02f5abf111ac
03a4e676 16URL: https://live.gnome.org/PyGObject
f6b2e85a 17Patch0: link.patch
a5fba226 18BuildRequires: autoconf >= 2.52
3955a8b7 19BuildRequires: automake >= 1:1.11
590b40c5 20BuildRequires: cairo-gobject-devel
5882833c 21BuildRequires: glib2-devel >= 1:2.34.0
9cb81703 22BuildRequires: gobject-introspection-devel >= 1.34.1.1
a5fba226
AF
23BuildRequires: libffi-devel >= 3.0
24BuildRequires: libtool
a5fba226 25BuildRequires: pkgconfig
81604870 26BuildRequires: pkgconfig(libffi) >= 3.0
a5fba226
AF
27BuildRequires: rpm-pythonprov
28BuildRequires: tar >= 1:1.22
29BuildRequires: xz
30%if %{with python2}
bebf1ce0 31BuildRequires: python-devel >= 1:2.6
a5fba226
AF
32BuildRequires: python-pycairo-devel >= 1.2.0
33%pyrequires_eq python-modules
34%endif
35%if %{with python3}
f6b2e85a
AF
36BuildRequires: python3 >= 3.2.2-3
37BuildRequires: python3-devel >= 3.2.2-3
38BuildRequires: python3-modules >= 3.2.2-3
3955a8b7 39BuildRequires: python3-pycairo-devel >= 1.10.0
a5fba226 40%endif
5882833c 41Requires: glib2 >= 1:2.34.0
9cb81703 42Requires: gobject-introspection >= 1.34.1.1
23ea25eb 43Conflicts: python-pygobject < 2.28.6-3
a5fba226
AF
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
a5fba226
AF
46%description
47Python bindings for GObject library.
48
49%description -l pl.UTF-8
50Wiązania Pythona do biblioteki GObject.
51
3955a8b7
AF
52%package common-devel
53Summary: Python bindings for GObject library
54Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
55Group: Development/Languages/Python
56Requires: %{name} = %{version}-%{release}
5882833c 57Requires: glib2-devel >= 1:2.34.0
3955a8b7
AF
58Requires: libffi-devel >= 3.0
59
d1050d12 60%description common-devel
538a43f0
ŁK
61This package contains headers files required to build wrappers for
62GObject addon libraries so that they interoperate with Python
3955a8b7
AF
63bindings.
64
d1050d12 65%description common-devel -l pl.UTF-8
538a43f0
ŁK
66Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
67biblioteki GObject, tak by mogły te biblioteki kooperowaći z
68wiązaniami Pythona.
3955a8b7 69
a5fba226
AF
70%package devel
71Summary: Python bindings for GObject library
72Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
73Group: Development/Languages/Python
74Requires: %{name} = %{version}-%{release}
3955a8b7 75Requires: %{name}-common-devel = %{version}-%{release}
5882833c 76Requires: glib2-devel >= 1:2.34.0
a5fba226 77Requires: libffi-devel >= 3.0
bebf1ce0 78Requires: python-devel >= 1:2.6
a5fba226
AF
79
80%description devel
81This package contains files required to build wrappers for GObject
82addon libraries so that they interoperate with Python bindings.
83
84%description devel -l pl.UTF-8
85Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki
86GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona.
87
88%package -n python3-pygobject3
89Summary: Python 3.x bindings for GObject library
90Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
91Group: Libraries/Python
bebf1ce0 92Requires: glib2 >= 1:2.34.0
9cb81703 93Requires: gobject-introspection >= 1.34.1.1
538a43f0 94Conflicts: python3-pygobject < 2.28.6-3
a5fba226
AF
95
96%description -n python3-pygobject3
97Python 3.x bindings for GObject library.
98
99%description -n python3-pygobject3 -l pl.UTF-8
100Wiązania Pythona 3.x do biblioteki GObject.
101
102%package -n python3-pygobject3-devel
103Summary: Python bindings for GObject library
104Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
105Group: Development/Languages/Python
538a43f0 106Requires: %{name}-common-devel = %{version}-%{release}
5882833c 107Requires: glib2-devel >= 1:2.34.0
a5fba226 108Requires: libffi-devel >= 3.0
3955a8b7 109Requires: python3-devel >= 3.1
97dc7172 110Requires: python3-pygobject3 = %{version}-%{release}
a5fba226
AF
111
112%description -n python3-pygobject3-devel
113This package contains files required to build wrappers for GObject
114addon libraries so that they interoperate with Python bindings.
115
116%description -n python3-pygobject3-devel -l pl.UTF-8
117Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki
118GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona.
119
120%package examples
121Summary: Example programs for GObject library
122Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
123Group: Development/Languages/Python
124Requires: %{name}-devel = %{version}-%{release}
a5fba226
AF
125
126%description examples
127This package contains example programs for GObject library.
128
129%description examples -l pl.UTF-8
130Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
131
132%package apidocs
133Summary: pygobject API documentation
134Summary(pl.UTF-8): Dokumentacja API pygobject
135Group: Documentation
136Requires: gtk-doc-common
137
138%description apidocs
139pygobject API documentation.
140
141%description apidocs -l pl.UTF-8
142Dokumentacja 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}
155mkdir py3
156cd py3
157../%configure \
158 PYTHON=/usr/bin/python3 \
f6b2e85a 159 PYTHON_LIBS=-lpython3 \
a5fba226
AF
160 --disable-silent-rules
161%{__make}
162cd ..
163%endif
164%if %{with python2}
165mkdir py2
166cd py2
167../%configure \
168 PYTHON=%{__python} \
f6b2e85a 169 PYTHON_LIBS=-lpython \
a5fba226
AF
170 --disable-silent-rules
171%{__make}
172cd ..
173%endif
174
175%install
176rm -rf $RPM_BUILD_ROOT
177install -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
190cp -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
203rm -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}
This page took 0.159149 seconds and 4 git commands to generate.