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