]> git.pld-linux.org Git - packages/python-gstreamer.git/blob - python-gstreamer.spec
rebuild with tests and docs
[packages/python-gstreamer.git] / python-gstreamer.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # CPython 2.x module and plugin
4 %bcond_without  python3         # CPython 3.x module and plugin
5
6 %define         gst_ver 1.16.3
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
11 # keep 1.16.x here (1.18+ is python3-only, see python3-gstreamer.spec)
12 Version:        1.16.3
13 Release:        5
14 License:        LGPL v2+
15 Group:          Libraries/Python
16 Source0:        https://gstreamer.freedesktop.org/src/gst-python/%{pname}-%{version}.tar.xz
17 # Source0-md5:  326f4f4c23e2477bf3d5839c465a42ca
18 Patch0:         %{name}-nosegv.patch
19 URL:            https://gstreamer.freedesktop.org/modules/gst-python.html
20 BuildRequires:  autoconf >= 2.68
21 BuildRequires:  automake >= 1:1.11
22 BuildRequires:  gstreamer-devel >= %{gst_ver}
23 BuildRequires:  libtool >= 2:2.2.6
24 BuildRequires:  pkgconfig >= 1:0.9.0
25 %if %{with python2}
26 BuildRequires:  python-devel >= 1:2.7
27 BuildRequires:  python-pygobject3-devel >= 3.8
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-devel >= 1:3.3
31 BuildRequires:  python3-pygobject3-devel >= 3.8
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.612
35 BuildRequires:  tar >= 1:1.22
36 BuildRequires:  xz
37 Requires:       gstreamer >= %{gst_ver}
38 Requires:       python-pygobject3 >= 3.8
39 Obsoletes:      python-gstreamer-devel < 1
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 GStreamer Python 2 bindings.
44
45 %description -l pl.UTF-8
46 Wiązania języka Python 2 do GStreamera.
47
48 %package -n gstreamer-python
49 Summary:        GStreamer plugin to load plugins written in Python 2
50 Summary(pl.UTF-8):      Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 2
51 Group:          Libraries
52 Requires:       python-gstreamer = %{version}-%{release}
53
54 %description -n gstreamer-python
55 GStreamer plugin to load plugins written in Python 2.
56
57 %description -n gstreamer-python -l pl.UTF-8
58 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 2.
59
60 %package -n python3-gstreamer
61 Summary:        GStreamer Python 3 bindings
62 Summary(pl.UTF-8):      Wiązania języka Python 3 do GStreamera
63 Group:          Libraries/Python
64 Requires:       gstreamer >= %{gst_ver}
65 Requires:       python3-pygobject3 >= 3.8
66
67 %description -n python3-gstreamer
68 GStreamer Python 3 bindings.
69
70 %description -n python3-gstreamer -l pl.UTF-8
71 Wiązania języka Python 3 do GStreamera.
72
73 %package -n gstreamer-python3
74 Summary:        GStreamer plugin to load plugins written in Python 3
75 Summary(pl.UTF-8):      Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3
76 Group:          Libraries
77 Requires:       python3-gstreamer = %{version}-%{release}
78
79 %description -n gstreamer-python3
80 GStreamer plugin to load plugins written in Python 3.
81
82 %description -n gstreamer-python3 -l pl.UTF-8
83 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3.
84
85 %prep
86 %setup -q -n %{pname}-%{version}
87 %patch0 -p1
88
89 %build
90 %{__libtoolize}
91 %{__aclocal} -I common/m4
92 %{__autoconf}
93 %{__autoheader}
94 %{__automake}
95
96 %if %{with python2}
97 install -d python2
98 cd python2
99 ../%configure \
100         PYTHON="%{__python}" \
101         --disable-silent-rules
102 %{__make}
103 cd ..
104 %endif
105
106 %if %{with python3}
107 install -d python3
108 cd python3
109 ../%configure \
110         PYTHON="%{__python3}" \
111         --disable-silent-rules
112 %{__make}
113 cd ..
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %{__make} -C python2 install \
121         DESTDIR=$RPM_BUILD_ROOT
122
123 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
124 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
125 %py_postclean
126 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/overrides/*.la
127 %endif
128
129 %if %{with python3}
130 %{__make} -C python3 install \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/overrides/*.la
134 %endif
135
136 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstpython.la
137 install -d $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/python
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with python2}
143 %files
144 %defattr(644,root,root,755)
145 %doc AUTHORS ChangeLog NEWS TODO
146 %attr(755,root,root) %{py_sitedir}/gi/overrides/_gi_gst.so
147 %{py_sitedir}/gi/overrides/Gst.py[co]
148 %{py_sitedir}/gi/overrides/GstPbutils.py[co]
149
150 %files -n gstreamer-python
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpython.so
153 %dir %{_libdir}/gstreamer-1.0/python
154 %endif
155
156 %if %{with python3}
157 %files -n python3-gstreamer
158 %defattr(644,root,root,755)
159 %doc AUTHORS ChangeLog NEWS TODO
160 %attr(755,root,root) %{py3_sitedir}/gi/overrides/_gi_gst.cpython-*.so
161 %{py3_sitedir}/gi/overrides/Gst.py
162 %{py3_sitedir}/gi/overrides/GstPbutils.py
163 %{py3_sitedir}/gi/overrides/__pycache__/Gst.*.py[co]
164 %{py3_sitedir}/gi/overrides/__pycache__/GstPbutils.*.py[co]
165
166 %files -n gstreamer-python3
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpython.cpython-3*.so
169 %dir %{_libdir}/gstreamer-1.0/python
170 %endif
This page took 0.093396 seconds and 3 git commands to generate.