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