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