Name: tg_owt %global forgeurl0 https://github.com/desktop-app/%{name} %global commit0 afd9d5d31798d3eacf9ed6c30601e91d0f1e4d60 %global _shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global forgeurl1 https://github.com/cisco/libsrtp %global tag1 v2.5.0 %forgemeta -a Version: 0 Release: %autorelease -b 41 # Library and 3rd-party bundled modules licensing: # * tg_owt - BSD-3-Clause -- main tarball; # * base64 - LicenseRef-Fedora-Public-Domain -- static dependency; # * libsrtp - BSD-3-Clause -- static dependency; # * pffft - BSD-3-Clause -- static dependency; # * sigslot - LicenseRef-Fedora-Public-Domain -- static dependency; # * spl_sqrt_floor - LicenseRef-Fedora-Public-Domain -- static dependency. License: BSD-3-Clause AND BSD-2-Clause AND Apache-2.0 AND MIT AND LicenseRef-Fedora-Public-Domain Summary: WebRTC library for the Telegram messenger URL: %{forgeurl0} Source0: %{forgesource0} Source1: %{forgesource1} Patch0: 0001-cmake-format-CMakeLists.txt-add-cmake-format-config.patch Patch1: 0002-build-link-against-more-system-libraries-if-possible.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake(absl) BuildRequires: cmake(Crc32c) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(epoxy) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xrender) BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(libyuv) BuildRequires: pkgconfig(openh264) BuildRequires: pkgconfig(protobuf) Provides: bundled(base64) = 0~git%{_shortcommit0} Provides: bundled(fft) = 0~git%{_shortcommit0} Provides: bundled(g711) = 1.1~git%{_shortcommit0} Provides: bundled(g722) = 1.14~git%{_shortcommit0} Provides: bundled(ooura) = 0~git%{_shortcommit0} Provides: bundled(sigslot) = 0~git%{_shortcommit0} Provides: bundled(spl_sqrt_floor) = 0~git%{_shortcommit0} Provides: bundled(pffft) = 0~git483453d Provides: bundled(rnnoise) = 0~git91ef401 Provides: bundled(libsrtp) = %(v=%{tag1}; echo ${v#v}) # Disabling all low-memory architectures. ExclusiveArch: x86_64 aarch64 %description Fork of the OpenWebRTC library used by Telegram Messenger. %package devel Summary: Header files and development documentation for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: cmake(Crc32c) Requires: cmake(absl) Requires: pkgconfig(libyuv) Requires: pkgconfig(openh264) %description devel Fork of the OpenWebRTC library used by Telegram Messenger. This package contains the header files for %{name}. %prep %forgeautosetup -p1 tar -xf %{SOURCE1} -C src/third_party/libsrtp --strip-components=1 mkdir legal cp -f -p src/third_party/libsrtp/LICENSE legal/LICENSE.libsrtp cp -f -p src/third_party/libsrtp/README.md legal/README.libsrtp cp -f -p src/third_party/pffft/LICENSE legal/LICENSE.pffft cp -f -p src/third_party/pffft/README.chromium legal/README.pffft cp -f -p src/common_audio/third_party/ooura/LICENSE legal/LICENSE.ooura cp -f -p src/common_audio/third_party/ooura/README.chromium legal/README.ooura cp -f -p src/common_audio/third_party/spl_sqrt_floor/LICENSE legal/LICENSE.spl_sqrt_floor cp -f -p src/common_audio/third_party/spl_sqrt_floor/README.chromium legal/README.spl_sqrt_floor cp -f -p src/modules/third_party/fft/LICENSE legal/LICENSE.fft cp -f -p src/modules/third_party/fft/README.chromium legal/README.fft cp -f -p src/modules/third_party/g711/LICENSE legal/LICENSE.g711 cp -f -p src/modules/third_party/g711/README.chromium legal/README.g711 cp -f -p src/modules/third_party/g722/LICENSE legal/LICENSE.g722 cp -f -p src/modules/third_party/g722/README.chromium legal/README.g722 cp -f -p src/rtc_base/third_party/base64/LICENSE legal/LICENSE.base64 cp -f -p src/rtc_base/third_party/base64/README.chromium legal/README.base64 cp -f -p src/rtc_base/third_party/sigslot/LICENSE legal/LICENSE.sigslot cp -f -p src/rtc_base/third_party/sigslot/README.chromium legal/README.sigslot %build # CMAKE_BUILD_TYPE should always be Release due to some hardcoded checks. %cmake -DCMAKE_BUILD_TYPE=Release \ -DTG_OWT_USE_PROTOBUF:BOOL=ON \ -DTG_OWT_PACKAGED_BUILD:BOOL=ON \ -DTG_OWT_DLOPEN_PIPEWIRE:BOOL=OFF %cmake_build %install %cmake_install %files %doc src/AUTHORS src/OWNERS legal/README.* %license LICENSE src/PATENTS legal/LICENSE.* %{_libdir}/lib%{name}.so.0* %files devel %doc src/AUTHORS src/OWNERS legal/README.* %license LICENSE src/PATENTS legal/LICENSE.* %{_includedir}/%{name} %{_libdir}/cmake/%{name} %{_libdir}/lib%{name}.so %changelog * Wed Feb 07 2024 Zephyr Lykos - 0-41-20240207gitafd9d5d.s20231105gitv2.5.0 - Switched to afd9d5d31798d3eacf9ed6c30601e91d0f1e4d60 snapshot. - Rebuild for f40 * Tue Nov 14 2023 Zephyr Lykos - 0-40.20231114git71cce98.s20231105gitv2.5.0 - Link to pipewire directly instead of dlopen * Tue Nov 14 2023 Zephyr Lykos - 0-39.20231114git71cce98.s20231105gitv2.5.0 - Switched to 71cce98c5fb1d9328892d55f70db711afd5b1aef snapshot. * Sun May 21 2023 Vitaly Zaitsev - 0-31.20230501gitdcb5069 - Switched to dcb5069ff76bd293e86928804208737e6cee2ccc snapshot. * Sat Apr 22 2023 Vitaly Zaitsev - 0-30.20230418gitfe316b0 - Switched to fe316b0c5a155cceb2ddecee70d7b582cadfa225 snapshot. * Mon Mar 20 2023 Vitaly Zaitsev - 0-29.20230314git1a18da2 - Switched to 1a18da2ed4d5ce134e984d1586b915738e0da257 snapshot. - Switched to modern ffmpeg and OpenSSL.