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