# Documentation release version. %define documentation_version 5.2.0 Name: mediastreamer2 Version: 5.2.45 Release: 1%{?dist} Summary: Audio/Video real-time streaming License: AGPL-3.0-or-later URL: https://linphone.org/technical-corner/mediastreamer2 Source: https://gitlab.linphone.org/BC/public/mediastreamer2/-/archive/%{version}/%{name}-%{version}.tar.bz2 # Patches. Patch00: 0001_mediastreamer2_set_current_version.patch Patch01: 0002_mediastreamer2_fix_pkgconfig_file_install.patch Patch02: 0003_mediastreamer2_change_cmake_files_default_install_location.patch # Patch03 from OpenSUSE - Bjørn Lie Patch03: 0004_mediastreamer2_fix_ffmpeg_ftbfs.patch Patch04: 0005_mediastreamer2_suppress_cmake_find_libyuv_warning.patch Patch05: 0006_mediastreamer2_do_not_use_bundled_opengl_headers.patch BuildRequires: cmake >= 3.2 BuildRequires: doxygen BuildRequires: gawk BuildRequires: gcc-c++ BuildRequires: graphviz BuildRequires: gsm-devel BuildRequires: libpcap-devel BuildRequires: libsqlite3x-devel BuildRequires: libv4l-devel BuildRequires: libvpx-devel BuildRequires: libxml2-devel BuildRequires: spandsp-devel BuildRequires: turbojpeg-devel BuildRequires: vim BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(bctoolbox) >= 5.2.45 BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libbcg729) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libupnp) %if 0%{?fedora} BuildRequires: pkgconfig(libyuv) %endif BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(ortp) >= 5.2.45 BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(theora) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xv) %description Mediastreamer2 is a library to make audio and video real-time streaming and processing. It is written in pure C and based upon the oRTP library. %package doc Summary: Documentation for the mediastreamer2 library Requires: %{name} = %{version}-%{release} %description doc Mediastreamer2 is a library to make audio and video real-time streaming and processing. It is written in pure C and based upon the oRTP library. This package contains documentation files %package devel Summary: Headers and libraries for the mediastreamer2 library Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Mediastreamer2 is a library to make audio and video real-time streaming and processing. It is written in pure C and based upon the oRTP library. This package contains header files and development libraries needed to develop programs using the mediastreamer2 library. %prep %autosetup -p1 %build # Do not error/break compilation, just warn. %set_build_flags CFLAGS="$CFLAGS -Wno-error=unused-parameter -Wunused-parameter \ -Wno-error=discarded-qualifiers -Wdiscarded-qualifiers \ -Wno-error=unused-variable -Wunused-variable \ -Wno-error=implicit-function-declaration -Wimplicit-function-declaration" CXXFLAGS="$CXXFLAGS -Wno-error=unused-parameter -Wunused-parameter \ -Wno-error=unused-variable -Wunused-variable" %cmake \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DENABLE_STATIC=NO \ -DENABLE_STRICT=YES \ -DENABLE_BV16=NO \ -DENABLE_MKV=NO \ -DENABLE_ZRTP=NO \ -DENABLE_QRCODE=NO \ -DENABLE_FFMPEG=YES \ -DENABLE_X11=YES \ -DENABLE_XV=YES \ -DENABLE_GL=YES \ %if 0%{?fedora} -DENABLE_LIBYUV=YES %else -DENABLE_LIBYUV=NO %endif %cmake_build %install %cmake_install # FIXME: Should not need to move this. mv -T %{buildroot}/pkgconfig/ %{buildroot}%{_libdir}/pkgconfig/ # Move html documentation to version series folder. mkdir -p %{buildroot}%{_docdir}/%{name}-%{documentation_version}/ mv -T %{buildroot}%{_datadir}/doc/%{name}-%{version}/ \ %{buildroot}%{_docdir}/%{name}-%{documentation_version}/ %files %license LICENSE.txt %{_bindir}/mediastream %{_bindir}/mkvstream %{_libdir}/libmediastreamer.so.11* %files doc %doc README.md %doc %{_docdir}/%{name}-%{documentation_version}/ %dir %{_datadir}/images/ %{_datadir}/images/nowebcamCIF.jpg %files devel %{_bindir}/mediastreamer2_tester %{_datadir}/mediastreamer2_tester/ %{_includedir}/mediastreamer2/ # Do not install bundled OpenGL and related header files. %exclude %{_includedir}/OpenGL/ %{_libdir}/libmediastreamer.so %{_libdir}/cmake/mediastreamer2/ # Exclude from package at this time. %exclude %{_libdir}/pkgconfig/mediastreamer.pc %changelog * Sat May 20 2023 Phil Wyett - 5.2.45-1 - Initial package.