]>
Commit | Line | Data |
---|---|---|
9bee86e5 JB |
1 | # TODO: |
2 | # - BV16 (https://gitlab.linphone.org/BC/public/external/bv16-floatingpoint or BroadVoice16OpenSource.v1.2.zip from Broadcom) | |
3 | # - bcmatroska2 | |
2adf1e07 JB |
4 | # |
5 | # Conditional build: | |
9bee86e5 JB |
6 | %bcond_with pcap # audio playing from PCAP files |
7 | %bcond_without static_libs # static library | |
8 | # transport | |
b49a5518 | 9 | %bcond_without srtp # SRTP (secure RTP) support |
d1086c6e | 10 | %bcond_without zrtp # support for RFC 6189: Media Path Key Agreement for Unicast Secure RTP |
574e0d82 JB |
11 | # audio I/O |
12 | %bcond_without alsa # ALSA sound I/O support | |
13 | %bcond_with arts # aRts sound I/O support | |
9bee86e5 | 14 | %bcond_with oss # OSS support (deprecated) |
574e0d82 JB |
15 | %bcond_with portaudio # PortAudio sound I/O support |
16 | %bcond_without pulseaudio # PulseAudio sound I/O support | |
9bee86e5 JB |
17 | # audio codecs |
18 | %bcond_without bcg729 # support for G279AnnexB in RTC3389 implementation of Comfort Noise Payload | |
19 | %bcond_without spandsp # G726 codec support via spandsp | |
20 | # video I/O | |
21 | %bcond_without opengl # X11+OpenGL rendering support | |
b4167869 | 22 | %bcond_without sdl # SDL support |
9bee86e5 JB |
23 | # video codecs |
24 | %bcond_without matroska # Matroska support via libebml2/libmatroska2 | |
25 | %bcond_without zxing # QRcode support via zxing-cpp | |
2adf1e07 | 26 | # |
bbb0ffde | 27 | Summary: Audio/Video real-time streaming |
2adf1e07 | 28 | Summary(pl.UTF-8): Przesyłanie strumieni audio/video w czasie rzeczywistym |
bbb0ffde | 29 | Name: mediastreamer |
5bc87a06 | 30 | Version: 4.5.22 |
348172d7 JB |
31 | Release: 1 |
32 | License: GPL v3+ | |
bbb0ffde | 33 | Group: Libraries |
348172d7 JB |
34 | #Source0Download: https://gitlab.linphone.org/BC/public/mediastreamer2/tags |
35 | Source0: https://gitlab.linphone.org/BC/public/mediastreamer2/-/archive/%{version}/mediastreamer2-%{version}.tar.bz2 | |
5bc87a06 | 36 | # Source0-md5: 3cdcfb0a1e3bd1b2774ca1da6316dae6 |
c28fe572 | 37 | Patch0: build.patch |
9bee86e5 | 38 | Patch1: %{name}-cmake-link.patch |
d8296b8a | 39 | Patch2: libupnp-1.14.patch |
9bee86e5 JB |
40 | Patch3: %{name}-cmake-datadir.patch |
41 | Patch4: %{name}-cmake-install-pkgconfig.patch | |
b4167869 JB |
42 | Patch5: %{name}-cmake-SDL.patch |
43 | Patch6: %{name}-types.patch | |
fc50abc3 | 44 | Patch7: %{name}-gsm.patch |
b49a5518 | 45 | URL: http://www.linphone.org/technical-corner/mediastreamer2/overview |
2adf1e07 | 46 | %{?with_opengl:BuildRequires: OpenGL-GLX-devel} |
9bee86e5 | 47 | %{?with_sdl:BuildRequires: SDL-devel >= 1.2.0} |
574e0d82 JB |
48 | %{?with_alsa:BuildRequires: alsa-lib-devel} |
49 | %{?with_arts:BuildRequires: artsc-devel} | |
348172d7 | 50 | %{?with_bcg729:BuildRequires: bcg729-devel >= 1.0.1} |
67eb68d6 | 51 | BuildRequires: bctoolbox-devel >= 0.4.0 |
9bee86e5 JB |
52 | %{?with_zrtp:BuildRequires: bzrtp-devel >= 4.5.15-1} |
53 | BuildRequires: cmake >= 3.1 | |
bbb0ffde | 54 | BuildRequires: doxygen |
2adf1e07 | 55 | # libavcodec >= 51.0.0, libswscale >= 0.7.0 |
bbb0ffde | 56 | BuildRequires: ffmpeg-devel |
c07fcbab | 57 | BuildRequires: gettext-tools |
2adf1e07 | 58 | %{?with_opengl:BuildRequires: glew-devel >= 1.5} |
2adf1e07 | 59 | BuildRequires: intltool >= 0.40 |
bbb0ffde | 60 | BuildRequires: libgsm-devel |
9bee86e5 | 61 | BuildRequires: libjpeg-turbo-devel |
2adf1e07 | 62 | %{?with_pcap:BuildRequires: libpcap-devel} |
348172d7 | 63 | BuildRequires: libstdc++-devel >= 6:5 |
2adf1e07 | 64 | BuildRequires: libtheora-devel >= 1.0-0.alpha7 |
9bee86e5 JB |
65 | # upnp not included in cmake |
66 | #BuildRequires: libupnp-devel >= 1.8 | |
bbb0ffde | 67 | BuildRequires: libv4l-devel |
2adf1e07 | 68 | BuildRequires: libvpx-devel >= 0.9.6 |
b49a5518 | 69 | %{?with_matroska:BuildRequires: matroska-foundation-devel} |
2adf1e07 | 70 | BuildRequires: opus-devel >= 0.9.0 |
9bee86e5 | 71 | BuildRequires: ortp-devel >= 4.5.15-1 |
bbb0ffde | 72 | BuildRequires: pkgconfig |
574e0d82 | 73 | %{?with_portaudio:BuildRequires: portaudio-devel} |
2adf1e07 | 74 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.21} |
9bee86e5 | 75 | BuildRequires: python3 >= 1:3 |
61d85515 | 76 | BuildRequires: sed >= 4.0 |
9bee86e5 | 77 | %{?with_spandsp:BuildRequires: spandsp-devel >= 0.0.6} |
f52b820a | 78 | BuildRequires: speex-devel >= 1:1.2-beta3 |
fed1d2a7 | 79 | BuildRequires: speexdsp-devel >= 1.2-beta3 |
c28fe572 | 80 | %{?with_srtp:BuildRequires: libsrtp2-devel} |
bbb0ffde | 81 | BuildRequires: xorg-lib-libX11-devel |
61d85515 | 82 | BuildRequires: xorg-lib-libXv-devel |
9bee86e5 | 83 | %{?with_zxing:BuildRequires: zxing-cpp-devel} |
348172d7 | 84 | %{?with_bcg729:Requires: bcg729 >= 1.0.1} |
67eb68d6 | 85 | Requires: bctoolbox >= 0.4.0 |
9bee86e5 | 86 | %{?with_zrtp:Requires: bzrtp >= 4.5} |
2adf1e07 JB |
87 | %{?with_opengl:Requires: glew >= 1.5} |
88 | Requires: libtheora >= 1.0-0.alpha7 | |
2adf1e07 JB |
89 | Requires: libvpx >= 0.9.6 |
90 | Requires: opus >= 0.9.0 | |
9bee86e5 | 91 | Requires: ortp >= 4.5 |
2adf1e07 | 92 | %{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.21} |
e6d0cfff | 93 | Requires: spandsp >= 0.0.6 |
f52b820a | 94 | Requires: speex >= 1:1.2-beta3 |
fed1d2a7 | 95 | Requires: speexdsp >= 1.2-beta3 |
9bee86e5 | 96 | Obsoletes: mediastreamer-plugin-msbcg729 < 1.1 |
bbb0ffde AM |
97 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
98 | ||
99 | %description | |
100 | Mediastreamer2 is a GPL licensed library to make audio and video | |
101 | real-time streaming and processing. Written in pure C, it is based | |
102 | upon the oRTP library. | |
103 | ||
2adf1e07 JB |
104 | %description -l pl.UTF-8 |
105 | Mediastreamer2 to udostępniona na licencji GPL biblioteka do | |
106 | przesyłania i przetwarzania strumieni audio/video w czasie | |
107 | rzeczywistym. Jest napisana w czystym C, oparta na bibliotece oRTP. | |
108 | ||
bbb0ffde | 109 | %package devel |
210be78d JB |
110 | Summary: Header files and development documentation for mediastreamer libraries |
111 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do bibliotek mediastreamer | |
bbb0ffde | 112 | Group: Development/Libraries |
2adf1e07 JB |
113 | Requires: %{name} = %{version}-%{release} |
114 | %{?with_opengl:Requires: OpenGL-devel} | |
574e0d82 | 115 | %{?with_alsa:Requires: alsa-lib-devel} |
348172d7 | 116 | %{?with_bcg729:Requires: bcg729-devel >= 1.0.1} |
67eb68d6 | 117 | Requires: bctoolbox-devel >= 0.4.0 |
9bee86e5 | 118 | %{?with_zrtp:Requires: bzrtp-devel >= 4.5.15-1} |
2adf1e07 JB |
119 | Requires: ffmpeg-devel |
120 | %{?with_opengl:Requires: glew-devel >= 1.5} | |
121 | Requires: libtheora-devel >= 1.0-0.alpha7 | |
9bee86e5 | 122 | #Requires: libupnp-devel |
2adf1e07 JB |
123 | Requires: libv4l-devel |
124 | Requires: libvpx-devel >= 0.9.6 | |
b49a5518 | 125 | %{?with_matroska:Requires: matroska-foundation-devel} |
2adf1e07 | 126 | Requires: opus-devel >= 0.9.0 |
9bee86e5 | 127 | Requires: ortp-devel >= 4.5.15-1 |
574e0d82 | 128 | %{?with_portaudio:Requires: portaudio-devel} |
2adf1e07 JB |
129 | %{?with_pulseaudio:Requires: pulseaudio-devel >= 0.9.21} |
130 | Requires: spandsp-devel >= 0.0.6 | |
f52b820a | 131 | Requires: speex-devel >= 1:1.2-beta3 |
fed1d2a7 | 132 | Requires: speexdsp-devel >= 1.2-beta3 |
c28fe572 | 133 | %{?with_srtp:Requires: libsrtp2-devel} |
2adf1e07 JB |
134 | Requires: xorg-lib-libX11-devel |
135 | Requires: xorg-lib-libXv-devel | |
bbb0ffde AM |
136 | |
137 | %description devel | |
210be78d JB |
138 | Header files and development documentation for mediastreamer |
139 | libraries. | |
2adf1e07 JB |
140 | |
141 | %description devel -l pl.UTF-8 | |
210be78d | 142 | Pliki nagłówkowe i dokumentacja do bibliotek mediastreamer. |
bbb0ffde AM |
143 | |
144 | %package static | |
210be78d JB |
145 | Summary: Static mediastreamer libraries |
146 | Summary(pl.UTF-8): Statyczne biblioteki mediastreamer | |
bbb0ffde | 147 | Group: Development/Libraries |
2adf1e07 | 148 | Requires: %{name}-devel = %{version}-%{release} |
bbb0ffde AM |
149 | |
150 | %description static | |
210be78d | 151 | Static mediastreamer libraries. |
bbb0ffde | 152 | |
2adf1e07 | 153 | %description static -l pl.UTF-8 |
210be78d | 154 | Statyczne biblioteki mediastreamer. |
2adf1e07 | 155 | |
bbb0ffde | 156 | %prep |
348172d7 | 157 | %setup -q -n mediastreamer2-%{version} |
9a501a0e | 158 | %patch0 -p1 |
9bee86e5 | 159 | %patch1 -p1 |
d8296b8a | 160 | %patch2 -p1 |
9bee86e5 JB |
161 | %patch3 -p1 |
162 | %patch4 -p1 | |
b4167869 JB |
163 | %patch5 -p1 |
164 | %patch6 -p1 | |
fc50abc3 | 165 | %patch7 -p1 |
c28fe572 | 166 | |
9bee86e5 JB |
167 | # cmake checks for python3, so don't require python 2 as well |
168 | %{__sed} -i -e '1s,/usr/bin/python$,%{__python3},' tools/xxd.py | |
bbb0ffde AM |
169 | |
170 | %build | |
9bee86e5 JB |
171 | install -d build |
172 | cd build | |
173 | # NLS missing in cmake | |
174 | CPPFLAGS="%{rpmcppflags} -DENABLE_NLS=1 -DGETTEXT_PACKAGE=\"mediastreamer\" -DLOCALEDIR=\"%{_localedir}\"" | |
175 | # note: NON_FREE_CODECS refer to H263, H264, MPEG4 via libavcodec | |
176 | %cmake .. \ | |
177 | -DCMAKE_INSTALL_INCLUDEDIR=include \ | |
178 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
179 | %{!?with_alsa:-DENABLE_ALSA=OFF} \ | |
180 | %{?with_arts:-DENABLE_ARTSC=ON} \ | |
181 | %{?with_spandsp:-DENABLE_G726=ON} \ | |
182 | %{!?with_bcg729:-DENABLE_G729=OFF} \ | |
183 | %{?with_bcg729:-DENABLE_G729B_CNG=ON} \ | |
184 | %{!?with_opengl:-DENABLE_GL=OFF} \ | |
185 | %{!?with_opengl:-DENABLE_GLX=OFF} \ | |
186 | %{!?with_matroska:-DENABLE_MKV=OFF} \ | |
187 | -DENABLE_NON_FREE_CODECS=ON \ | |
188 | %{?with_oss:-DENABLE_OSS=ON} \ | |
189 | %{?with_pcap:-DENABLE_PCAP=ON} \ | |
190 | %{?with_portaudio:-DENABLE_PORTAUDIO=ON} \ | |
191 | %{?with_pulseaudio:-DENABLE_PULSEAUDIO=ON} \ | |
192 | %{!?with_zxing:-DENABLE_QRCODE=OFF} \ | |
193 | %{?with_sdl:-DENABLE_SDL=ON} \ | |
194 | %{!?with_srtp:-DENABLE_SRTP=OFF} \ | |
195 | %{!?with_static_libs:-DENABLE_STATIC=OFF} \ | |
196 | -DENABLE_UNIT_TESTS=OFF \ | |
197 | %{!?with_zrtp:-DENABLE_ZRTP=OFF} | |
61d85515 | 198 | |
bbb0ffde AM |
199 | %{__make} |
200 | ||
201 | %install | |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
9bee86e5 JB |
204 | %{__make} -C build install \ |
205 | DESTDIR=$RPM_BUILD_ROOT | |
206 | ||
207 | # disable completeness check incompatible with split packaging | |
208 | %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/Mediastreamer2/cmake/Mediastreamer2Targets.cmake | |
209 | ||
210 | # missing from install in cmake | |
211 | install build/tools/msaudiocmp $RPM_BUILD_ROOT%{_bindir} | |
212 | %if %{with pcap} | |
213 | install build/tools/pcap_playback $RPM_BUILD_ROOT%{_bindir} | |
214 | %endif | |
215 | for f in po/*.po ; do | |
216 | lang=$(basename "$f" .po) | |
217 | install -d $RPM_BUILD_ROOT%{_localedir}/${lang}/LC_MESSAGES | |
218 | msgfmt -v -o $RPM_BUILD_ROOT%{_localedir}/${lang}/LC_MESSAGES/%{name}.mo "$f" | |
219 | done | |
bbb0ffde | 220 | |
86721f5d | 221 | # for external plugins |
dcc81caa | 222 | install -d $RPM_BUILD_ROOT%{_libdir}/mediastreamer/plugins |
86721f5d | 223 | |
61d85515 | 224 | # Remove duplicated documentation |
9bee86e5 | 225 | %{__rm} -r $RPM_BUILD_ROOT/usr/share/doc/mediastreamer2-4.5.0/html |
61d85515 | 226 | |
227 | %find_lang %{name} | |
228 | ||
bbb0ffde AM |
229 | %clean |
230 | rm -rf $RPM_BUILD_ROOT | |
231 | ||
232 | %post -p /sbin/ldconfig | |
233 | %postun -p /sbin/ldconfig | |
234 | ||
61d85515 | 235 | %files -f %{name}.lang |
bbb0ffde | 236 | %defattr(644,root,root,755) |
348172d7 | 237 | %doc CHANGELOG.md README.md |
2adf1e07 | 238 | %attr(755,root,root) %{_bindir}/mediastream |
9bee86e5 | 239 | %attr(755,root,root) %{_bindir}/mkvstream |
574e0d82 | 240 | %attr(755,root,root) %{_bindir}/msaudiocmp |
2adf1e07 | 241 | %{?with_pcap:%attr(755,root,root) %{_bindir}/pcap_playback} |
9bee86e5 | 242 | %attr(755,root,root) %{_libdir}/libmediastreamer.so.11 |
dcc81caa JB |
243 | %dir %{_libdir}/mediastreamer |
244 | %dir %{_libdir}/mediastreamer/plugins | |
348172d7 | 245 | %{_datadir}/mediastreamer |
bbb0ffde AM |
246 | |
247 | %files devel | |
248 | %defattr(644,root,root,755) | |
9bee86e5 JB |
249 | %doc build/help/doc/html/*.{css,html,js,png} |
250 | %attr(755,root,root) %{_libdir}/libmediastreamer.so | |
bbb0ffde AM |
251 | %{_includedir}/mediastreamer2 |
252 | %{_pkgconfigdir}/mediastreamer.pc | |
9bee86e5 JB |
253 | %dir %{_datadir}/Mediastreamer2 |
254 | %{_datadir}/Mediastreamer2/cmake | |
bbb0ffde | 255 | |
210be78d | 256 | %if %{with static_libs} |
bbb0ffde AM |
257 | %files static |
258 | %defattr(644,root,root,755) | |
9bee86e5 | 259 | %{_libdir}/libmediastreamer.a |
210be78d | 260 | %endif |