]> git.pld-linux.org Git - packages/python-gstreamer.git/blob - python-gstreamer.spec
20665e5aaaa0761104812007ea5b6c73003548d6
[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.8.0
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 Version:        1.8.1
12 Release:        2
13 License:        LGPL v2+
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
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-pygobject3-devel >= 3.0
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.3
30 BuildRequires:  python3-pygobject3-devel >= 3.0
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.612
34 BuildRequires:  tar >= 1:1.22
35 BuildRequires:  xz
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)
40
41 %description
42 GStreamer Python 2 bindings.
43
44 %description -l pl.UTF-8
45 Wiązania języka Python 2 do GStreamera.
46
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
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
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.
71
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
75 Group:          Libraries
76 Requires:       python3-gstreamer = %{version}-%{release}
77
78 %description -n gstreamer-python3
79 GStreamer plugin to load plugins written in Python 3.
80
81 %description -n gstreamer-python3 -l pl.UTF-8
82 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3.
83
84 %prep
85 %setup -q -n %{pname}-%{version}
86 %patch0 -p1
87
88 %build
89 %{__libtoolize}
90 %{__aclocal} -I common/m4
91 %{__autoconf}
92 %{__autoheader}
93 %{__automake}
94
95 %if %{with python2}
96 install -d python2
97 cd python2
98 ../%configure \
99         PYTHON="%{__python}" \
100         --disable-silent-rules
101 %{__make}
102 cd ..
103 %endif
104
105 %if %{with python3}
106 install -d python3
107 cd python3
108 ../%configure \
109         PYTHON="%{__python3}" \
110         --disable-silent-rules
111 %{__make}
112 cd ..
113 %endif
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117
118 %if %{with python2}
119 %{__make} -C python2 install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
123 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
124 %py_postclean
125 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/overrides/*.la
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
134
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstpythonplugin.la
136 install -d $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/python
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
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]
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
153 %endif
154
155 %if %{with python3}
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]
164
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
169 %endif
This page took 0.065329 seconds and 2 git commands to generate.