]>
Commit | Line | Data |
---|---|---|
02509566 JB |
1 | # |
2 | # Conditional build: | |
81a9e032 JB |
3 | %bcond_without python2 # CPython 2.x module and plugin |
4 | %bcond_without python3 # CPython 3.x module and plugin | |
02509566 | 5 | |
5f791ccf | 6 | %define gst_ver 1.12.0 |
f1c5246f | 7 | %define pname gst-python |
02509566 JB |
8 | Summary: GStreamer Python 2 bindings |
9 | Summary(pl.UTF-8): Wiązania języka Python 2 do GStreamera | |
d20b7e2c | 10 | Name: python-gstreamer |
5f791ccf JB |
11 | Version: 1.12.0 |
12 | Release: 1 | |
6642afce | 13 | License: LGPL v2+ |
d20b7e2c | 14 | Group: Libraries/Python |
8c966675 | 15 | Source0: https://gstreamer.freedesktop.org/src/gst-python/%{pname}-%{version}.tar.xz |
5f791ccf | 16 | # Source0-md5: e530d074582229099cad4ca361e9f399 |
81a9e032 | 17 | Patch0: %{name}-nosegv.patch |
8c966675 | 18 | URL: https://gstreamer.freedesktop.org/modules/gst-python.html |
2f88f036 JB |
19 | BuildRequires: autoconf >= 2.68 |
20 | BuildRequires: automake >= 1:1.11 | |
21 | BuildRequires: gstreamer-devel >= %{gst_ver} | |
22 | BuildRequires: libtool >= 2:2.2.6 | |
f8cf144d | 23 | BuildRequires: pkgconfig >= 1:0.9.0 |
02509566 | 24 | %if %{with python2} |
f0a2fa22 | 25 | BuildRequires: python-devel >= 1:2.7 |
59c6a27b | 26 | BuildRequires: python-pygobject3-devel >= 3.0 |
02509566 JB |
27 | %endif |
28 | %if %{with python3} | |
2f88f036 | 29 | BuildRequires: python3-devel >= 1:3.3 |
02509566 JB |
30 | BuildRequires: python3-pygobject3-devel >= 3.0 |
31 | %endif | |
25f04e46 | 32 | BuildRequires: rpm-pythonprov |
02509566 | 33 | BuildRequires: rpmbuild(macros) >= 1.612 |
2f88f036 JB |
34 | BuildRequires: tar >= 1:1.22 |
35 | BuildRequires: xz | |
36 | Requires: gstreamer >= %{gst_ver} | |
59c6a27b JB |
37 | Requires: python-pygobject3 >= 3.0 |
38 | Obsoletes: python-gstreamer-devel | |
d20b7e2c | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
02509566 | 42 | GStreamer Python 2 bindings. |
d20b7e2c | 43 | |
49c8ea79 | 44 | %description -l pl.UTF-8 |
02509566 JB |
45 | Wiązania języka Python 2 do GStreamera. |
46 | ||
81a9e032 JB |
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 | |
50 | Group: Libraries | |
51 | Requires: python-gstreamer = %{version}-%{release} | |
52 | ||
53 | %description -n gstreamer-python | |
54 | GStreamer plugin to load plugins written in Python 2. | |
55 | ||
56 | %description -n gstreamer-python -l pl.UTF-8 | |
57 | Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 2. | |
58 | ||
02509566 JB |
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 | |
2f88f036 | 63 | Requires: gstreamer >= %{gst_ver} |
02509566 JB |
64 | Requires: python3-pygobject3 >= 3.0 |
65 | ||
66 | %description -n python3-gstreamer | |
67 | GStreamer Python 3 bindings. | |
68 | ||
69 | %description -n python3-gstreamer -l pl.UTF-8 | |
70 | Wiązania języka Python 3 do GStreamera. | |
d20b7e2c | 71 | |
81a9e032 JB |
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 | |
2f88f036 | 75 | Group: Libraries |
81a9e032 | 76 | Requires: python3-gstreamer = %{version}-%{release} |
2f88f036 | 77 | |
81a9e032 JB |
78 | %description -n gstreamer-python3 |
79 | GStreamer plugin to load plugins written in Python 3. | |
2f88f036 | 80 | |
81a9e032 JB |
81 | %description -n gstreamer-python3 -l pl.UTF-8 |
82 | Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3. | |
2f88f036 | 83 | |
d20b7e2c | 84 | %prep |
85 | %setup -q -n %{pname}-%{version} | |
81a9e032 | 86 | %patch0 -p1 |
d20b7e2c | 87 | |
88 | %build | |
194c73c8 JB |
89 | %{__libtoolize} |
90 | %{__aclocal} -I common/m4 | |
fe2fc325 | 91 | %{__autoconf} |
92 | %{__autoheader} | |
93 | %{__automake} | |
02509566 JB |
94 | |
95 | %if %{with python2} | |
96 | install -d python2 | |
97 | cd python2 | |
98 | ../%configure \ | |
99 | PYTHON="%{__python}" \ | |
369bd817 | 100 | --disable-silent-rules |
02509566 JB |
101 | %{__make} |
102 | cd .. | |
103 | %endif | |
d20b7e2c | 104 | |
02509566 JB |
105 | %if %{with python3} |
106 | install -d python3 | |
107 | cd python3 | |
108 | ../%configure \ | |
109 | PYTHON="%{__python3}" \ | |
110 | --disable-silent-rules | |
d20b7e2c | 111 | %{__make} |
02509566 JB |
112 | cd .. |
113 | %endif | |
d20b7e2c | 114 | |
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
d20b7e2c | 117 | |
02509566 JB |
118 | %if %{with python2} |
119 | %{__make} -C python2 install \ | |
59c6a27b | 120 | DESTDIR=$RPM_BUILD_ROOT |
d20b7e2c | 121 | |
fdba0bd9 PZ |
122 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
123 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
fd6228d8 | 124 | %py_postclean |
59c6a27b | 125 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/overrides/*.la |
02509566 JB |
126 | %endif |
127 | ||
128 | %if %{with python3} | |
129 | %{__make} -C python3 install \ | |
130 | DESTDIR=$RPM_BUILD_ROOT | |
131 | ||
132 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/overrides/*.la | |
133 | %endif | |
d20b7e2c | 134 | |
2f88f036 JB |
135 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstpythonplugin.la |
136 | install -d $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/python | |
137 | ||
d20b7e2c | 138 | %clean |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
02509566 | 141 | %if %{with python2} |
d20b7e2c | 142 | %files |
143 | %defattr(644,root,root,755) | |
59c6a27b JB |
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] | |
81a9e032 JB |
148 | |
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 | |
02509566 JB |
153 | %endif |
154 | ||
155 | %if %{with python3} | |
156 | %files -n python3-gstreamer | |
157 | %defattr(644,root,root,755) | |
158 | %doc AUTHORS ChangeLog NEWS TODO | |
488e7ac6 | 159 | %attr(755,root,root) %{py3_sitedir}/gi/overrides/_gi_gst.cpython-*.so |
02509566 JB |
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] | |
2f88f036 | 164 | |
81a9e032 | 165 | %files -n gstreamer-python3 |
2f88f036 | 166 | %defattr(644,root,root,755) |
81a9e032 | 167 | %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpythonplugin.cpython-3*.so |
2f88f036 | 168 | %dir %{_libdir}/gstreamer-1.0/python |
81a9e032 | 169 | %endif |