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