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