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