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