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