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