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