3 %bcond_without python2 # CPython 2.x module and plugin
4 %bcond_without python3 # CPython 3.x module and plugin
7 %define pname gst-python
8 Summary: GStreamer Python 2 bindings
9 Summary(pl.UTF-8): Wiązania języka Python 2 do GStreamera
10 Name: python-gstreamer
14 Group: Libraries/Python
15 Source0: https://gstreamer.freedesktop.org/src/gst-python/%{pname}-%{version}.tar.xz
16 # Source0-md5: c408cad016f9b627e5e5166325b186bd
17 Patch0: %{name}-nosegv.patch
18 URL: https://gstreamer.freedesktop.org/modules/gst-python.html
19 BuildRequires: autoconf >= 2.68
20 BuildRequires: automake >= 1:1.11
21 BuildRequires: gstreamer-devel >= %{gst_ver}
22 BuildRequires: libtool >= 2:2.2.6
23 BuildRequires: pkgconfig >= 1:0.9.0
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-pygobject3-devel >= 3.0
29 BuildRequires: python3-devel >= 1:3.3
30 BuildRequires: python3-pygobject3-devel >= 3.0
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.612
34 BuildRequires: tar >= 1:1.22
36 Requires: gstreamer >= %{gst_ver}
37 Requires: python-pygobject3 >= 3.0
38 Obsoletes: python-gstreamer-devel
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 GStreamer Python 2 bindings.
44 %description -l pl.UTF-8
45 Wiązania języka Python 2 do GStreamera.
47 %package -n gstreamer-python
48 Summary: GStreamer plugin to load plugins written in Python 2
49 Summary(pl.UTF-8): Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 2
51 Requires: python-gstreamer = %{version}-%{release}
53 %description -n gstreamer-python
54 GStreamer plugin to load plugins written in Python 2.
56 %description -n gstreamer-python -l pl.UTF-8
57 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 2.
59 %package -n python3-gstreamer
60 Summary: GStreamer Python 3 bindings
61 Summary(pl.UTF-8): Wiązania języka Python 3 do GStreamera
62 Group: Libraries/Python
63 Requires: gstreamer >= %{gst_ver}
64 Requires: python3-pygobject3 >= 3.0
66 %description -n python3-gstreamer
67 GStreamer Python 3 bindings.
69 %description -n python3-gstreamer -l pl.UTF-8
70 Wiązania języka Python 3 do GStreamera.
72 %package -n gstreamer-python3
73 Summary: GStreamer plugin to load plugins written in Python 3
74 Summary(pl.UTF-8): Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3
76 Requires: python3-gstreamer = %{version}-%{release}
78 %description -n gstreamer-python3
79 GStreamer plugin to load plugins written in Python 3.
81 %description -n gstreamer-python3 -l pl.UTF-8
82 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3.
85 %setup -q -n %{pname}-%{version}
90 %{__aclocal} -I common/m4
99 PYTHON="%{__python}" \
100 --disable-silent-rules
109 PYTHON="%{__python3}" \
110 --disable-silent-rules
116 rm -rf $RPM_BUILD_ROOT
119 %{__make} -C python2 install \
120 DESTDIR=$RPM_BUILD_ROOT
122 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
123 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
125 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/overrides/*.la
129 %{__make} -C python3 install \
130 DESTDIR=$RPM_BUILD_ROOT
132 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/overrides/*.la
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstpythonplugin.la
136 install -d $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/python
139 rm -rf $RPM_BUILD_ROOT
143 %defattr(644,root,root,755)
144 %doc AUTHORS ChangeLog NEWS TODO
145 %attr(755,root,root) %{py_sitedir}/gi/overrides/_gi_gst.so
146 %{py_sitedir}/gi/overrides/Gst.py[co]
147 %{py_sitedir}/gi/overrides/GstPbutils.py[co]
149 %files -n gstreamer-python
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpythonplugin.so
152 %dir %{_libdir}/gstreamer-1.0/python
156 %files -n python3-gstreamer
157 %defattr(644,root,root,755)
158 %doc AUTHORS ChangeLog NEWS TODO
159 %attr(755,root,root) %{py3_sitedir}/gi/overrides/_gi_gst.cpython-*.so
160 %{py3_sitedir}/gi/overrides/Gst.py
161 %{py3_sitedir}/gi/overrides/GstPbutils.py
162 %{py3_sitedir}/gi/overrides/__pycache__/Gst.*.py[co]
163 %{py3_sitedir}/gi/overrides/__pycache__/GstPbutils.*.py[co]
165 %files -n gstreamer-python3
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpythonplugin.cpython-3*.so
168 %dir %{_libdir}/gstreamer-1.0/python