%bcond_with qt5 # Telegram Desktop's constants... %global appname 64Gram # Reducing debuginfo verbosity... %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %if 0%{?fedora} < 40 %global with_qt5 1 %endif Name: 64Gram Version: 1.1.51 Release: 1%{?dist} # Application and 3rd-party modules licensing: # * Telegram Desktop - GPL-3.0-or-later with OpenSSL exception -- main tarball; # * cld3 - Apache-2.0 -- static dependency; # * libprisma - MIT -- static dependency; # * tgcalls - LGPL-3.0-only -- static dependency; # * plasma-wayland-protocols - LGPL-2.1-or-later -- static dependency; # * wayland-protocols - MIT -- static dependency; License: GPL-3.0-or-later AND Apache-2.0 AND LGPL-3.0-only AND LGPL-2.1-or-later AND MIT URL: https://github.com/TDesktop-x64/tdesktop Summary: Unofficial Telegram Desktop client Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}-full.tar.gz Patch2: 0001-tdesktop-use-system-font-by-default.patch Patch3: 0001-tdesktop-remove-default-font-in-settings.patch Patch100: 1000-tgcalls-fix-libyuv-include.patch Patch101: 1000-lib_tl-fix-cstring-include.patch Patch110: 1000-tdesktop-fix-build-qt5.patch Patch200: https://github.com/AOSC-Dev/aosc-os-abbs/raw/d61403889f94b472398e016bbe9d60f2563ce88e/app-web/telegram-desktop/autobuild/patches/1001-revert-hidpi-handling.patch Patch201: 0001-window-set-minimum-width-to-360px.patch Patch204: 0001-tdesktop-use-native-window-frame.patch # Telegram Desktop require more than 8 GB of RAM on linking stage. # Disabling all low-memory architectures. ExclusiveArch: x86_64 aarch64 # for cppgir generator BuildRequires: python3-rpm-macros %if %{with qt5} BuildRequires: qt5-srpm-macros %else BuildRequires: qt6-srpm-macros %endif BuildRequires: cmake(Microsoft.GSL) >= 4.1.0 BuildRequires: cmake(OpenAL) %if %{with qt5} BuildRequires: cmake(Qt5Concurrent) BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5Gui) BuildRequires: cmake(Qt5Network) BuildRequires: cmake(Qt5OpenGL) BuildRequires: cmake(Qt5Svg) BuildRequires: cmake(Qt5WaylandClient) BuildRequires: cmake(Qt5WaylandCompositor) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Quick) BuildRequires: cmake(Qt5QuickWidgets) BuildRequires: cmake(KF5CoreAddons) %else BuildRequires: cmake(Qt6Concurrent) BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Core5Compat) BuildRequires: cmake(Qt6DBus) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6Network) BuildRequires: cmake(Qt6OpenGL) BuildRequires: cmake(Qt6OpenGLWidgets) BuildRequires: cmake(Qt6Svg) BuildRequires: cmake(Qt6WaylandClient) BuildRequires: cmake(Qt6WaylandCompositor) BuildRequires: cmake(Qt6Quick) BuildRequires: cmake(Qt6QuickWidgets) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(KF6CoreAddons) %endif BuildRequires: cmake(range-v3) BuildRequires: cmake(tg_owt) BuildRequires: cmake(tl-expected) BuildRequires: cmake(rlottie) BuildRequires: cmake(ada) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glibmm-2.68) >= 2.77.0 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(hunspell) BuildRequires: pkgconfig(jemalloc) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libxxhash) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(protobuf-lite) BuildRequires: pkgconfig(rnnoise) BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(webkitgtk-6.0) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-keysyms) BuildRequires: pkgconfig(xcb-record) BuildRequires: pkgconfig(xcb-screensaver) BuildRequires: pkgconfig(xkbcommon) BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: ffmpeg-free-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libappstream-glib BuildRequires: libatomic BuildRequires: libdispatch-devel BuildRequires: libqrcodegencpp-devel BuildRequires: libstdc++-devel BuildRequires: python%{python3_pkgversion} BuildRequires: %{py3_dist packaging} BuildRequires: boost-devel BuildRequires: fmt-devel BuildRequires: gobject-introspection-devel %if %{with qt5} BuildRequires: qt5-qtbase-private-devel %else BuildRequires: qt6-qtbase-private-devel %endif %if 0%{?fedora} >= 41 BuildRequires: openssl-devel-engine %endif BuildRequires: dos2unix %if %{with qt5} Requires: qt5-qtbase%{?_isa} = %{_qt5_version} Requires: qt5-qtimageformats%{?_isa} = %{_qt5_version} %else Requires: qt6-qtbase%{?_isa} = %{_qt6_version} Requires: qt6-qtimageformats%{?_isa} = %{_qt6_version} %endif Recommends: webkitgtk6.0%{?_isa} Conflicts: telegram-desktop%{?_isa} # Short alias for the main package... Provides: telegram = %{?epoch:%{epoch}:}%{version}-%{release} Provides: telegram%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} # Virtual provides for bundled libraries... Provides: bundled(cld3) = 3.0.13~gitb48dc46 Provides: bundled(libtgvoip) = 2.4.4~gite286ab6 Provides: bundled(tgcalls) = 0~g871ea04 Provides: bundled(plasma-wayland-protocols) = 1.10.0 Provides: bundled(libprisma) = 0~gitadf35ba Provides: bundled(minizip) = 1.1 %description Telegram is a messaging app with a focus on speed and security, it’s super fast, simple and free. You can use Telegram on all your devices at the same time — your messages sync seamlessly across any number of your phones, tablets or computers. With Telegram, you can send messages, photos, videos and files of any type (doc, zip, mp3, etc), as well as create groups for up to 50,000 people or channels for broadcasting to unlimited audiences. You can write to your phone contacts and find people by their usernames. As a result, Telegram is like SMS and email combined — and can take care of all your personal or business messaging needs. %prep # Unpacking Telegram Desktop source archive... %autosetup -n %{appname}-%{version}-full -p1 -N # Unbundling libraries... rm -rf Telegram/ThirdParty/{GSL,QR,dispatch,expected,fcitx-qt5,fcitx5-qt,hime,hunspell,scudo,kimageformats,kcoreaddons,lz4,nimf,range-v3,xxHash,rlottie} rm Telegram/lib_ui/fonts/*.ttf # 64Gram: fix inconsistent line ending dos2unix LICENSE LEGAL features.md changelog.txt README.md lib/xdg/* find . -not -type d -exec file "{}" ";" -print0 | grep -z CRLF | cut -d':' -z -f1 | xargs -0 dos2unix %autopatch -p1 %build # Building Telegram Desktop using cmake... %cmake \ -DTDESKTOP_API_ID=611335 \ -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c \ -DTDESKTOP_DISABLE_AUTOUPDATE:BOOL=ON \ -DDESKTOP_APP_USE_PACKAGED:BOOL=ON \ -DDESKTOP_APP_USE_PACKAGED_RLOTTIE:BOOL=ON \ -DDESKTOP_APP_USE_PACKAGED_FONTS:BOOL=ON \ -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION:BOOL=OFF \ -DDESKTOP_APP_DISABLE_X11_INTEGRATION:BOOL=OFF \ -DDESKTOP_APP_DISABLE_CRASH_REPORTS:BOOL=ON %cmake_build %install %cmake_install %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files %doc README.md changelog.txt features.md %license LICENSE LEGAL %{_bindir}/telegram-desktop %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/dbus-1/services/*.service %{_metainfodir}/*.metainfo.xml %changelog * Thu Nov 28 2024 Zephyr Lykos - 1.1.51-1 - new version * Tue Nov 26 2024 Zephyr Lykos - 1.1.50-1 - new version * Wed Nov 20 2024 Zephyr Lykos - 1.1.49-1 - new version * Mon Nov 18 2024 Zephyr Lykos - 1.1.48-1 - new version * Fri Nov 08 2024 Zephyr Lykos - 1.1.46-1 - new version * Sat Nov 02 2024 Zephyr Lykos - 1.1.45-1 - new version * Fri Nov 01 2024 Zephyr Lykos - 1.1.44-1 - new version - Rebuild with upstream GSL * Thu Oct 17 2024 Zephyr Lykos - 1.1.43-2 - rebuilt * Wed Oct 16 2024 Zephyr Lykos - 1.1.43-1 - new version * Wed Oct 09 2024 Zephyr Lykos - 1.1.41-1 - new version * Sun Oct 06 2024 Zephyr Lykos - 1.1.40-1 - new version * Fri Sep 13 2024 Zephyr Lykos - 1.1.39-1 - new version * Fri Sep 13 2024 Zephyr Lykos - 1.1.38-1 - new version * Wed Sep 11 2024 Zephyr Lykos - 1.1.37-1 - new version * Tue Sep 10 2024 Zephyr Lykos - 1.1.36-1 - new version * Sun Sep 08 2024 Zephyr Lykos - 1.1.35-1 - new version * Mon Sep 02 2024 Zephyr Lykos - 1.1.34-2 - rebuilt * Sat Aug 24 2024 Zephyr Lykos - 1.1.34-1 - new version * Fri Aug 16 2024 Zephyr Lykos - 1.1.33-1 - new version * Mon Aug 05 2024 Zephyr Lykos - 1.1.32-1 - new version * Wed Jul 10 2024 Zephyr Lykos - 1.1.31-2 - Use openssl-devel-engine on F41+ * Tue Jul 09 2024 Zephyr Lykos - 1.1.31-1 - new version * Thu Jul 04 2024 Zephyr Lykos - 1.1.30-1 - new version * Tue Jun 18 2024 Zephyr Lykos - 1.1.29-1 - new version * Mon Jun 10 2024 Zephyr Lykos - 1.1.28-1 - new version * Fri Jun 07 2024 Zephyr Lykos - 1.1.27-1 - new version * Sun Jun 02 2024 Zephyr Lykos - 1.1.26-1 - new version * Wed May 29 2024 Zephyr Lykos - 1.1.24-1 - new version * Mon May 27 2024 Zephyr Lykos - 1.1.23-2 - Use bundled minizip, attempt to fix theme loading * Sat May 25 2024 Zephyr Lykos - 1.1.23-1 - new version - Remove confusing desktop-app "default" (Open Sans) font setting * Mon May 06 2024 Zephyr Lykos - 1.1.22-1 - new version - Fix for font family metrics calculation. * Sat May 04 2024 Zephyr Lykos - 1.1.21-2 - Fixed a regression where Open Sans is used by default. * Sat May 04 2024 Zephyr Lykos - 1.1.21-1 - new version * Fri May 03 2024 Zephyr Lykos - 1.1.20-1 - new version * Sun Apr 28 2024 Zephyr Lykos - 1.1.19-2 - Fix building on Fedora 39 * Sat Apr 20 2024 Zephyr Lykos - 1.1.19-1 - new version * Wed Apr 17 2024 Zephyr Lykos - 1.1.18-1 - new version * Wed Apr 10 2024 Zephyr Lykos - 1.1.17-1 - new version * Sun Apr 07 2024 Zephyr Lykos - 1.1.16-2 - rebuilt * Wed Apr 03 2024 Zephyr Lykos - 1.1.16-1 - new version * Mon Mar 11 2024 Zephyr Lykos - 1.1.15-1 - new version * Mon Feb 19 2024 Zephyr Lykos - 1.1.14-1 - new version * Wed Feb 07 2024 Zephyr Lykos - 1.1.13-2 - rebuilt * Mon Feb 05 2024 Zephyr Lykos - 1.1.13-1 - new version * Fri Feb 02 2024 Zephyr Lykos - 1.1.12-1 - new version * Fri Jan 19 2024 Zephyr Lykos - 1.1.11-1 - new version * Wed Jan 17 2024 Zephyr Lykos - 1.1.10-1 - new version * Tue Jan 09 2024 Zephyr Lykos - 1.1.9-1 - new version * Tue Jan 02 2024 Zephyr Lykos - 1.1.8-1 - new version * Mon Jan 01 2024 Zephyr Lykos - 1.1.7-2 - rebuilt * Mon Jan 01 2024 Zephyr Lykos - 1.1.7-1 - new version * Wed Dec 27 2023 Zephyr Lykos - 1.1.6-1 - rebuild * Wed Dec 27 2023 Zephyr Lykos - 1.1.6-1 - new version * Sun Dec 03 2023 Zephyr Lykos - 1.1.5-1 - new version * Sat Dec 02 2023 Zephyr Lykos - 1.1.4-2 - rebuilt * Tue Nov 14 2023 Zephyr Lykos - 1.1.4-1 - new version - import AOSC patches - unbundle fonts * Fri Nov 10 2023 Zephyr Lykos - 1.1.3-1 - new version * Tue Nov 07 2023 Zephyr Lykos - 1.1.2-1 - new version * Fri Nov 03 2023 Zephyr Lykos - 1.1.1-1 - new version * Thu Nov 02 2023 Zephyr Lykos - 1.1.0-2 - Cleanup bundled dependency and update license - Update bundled provides version * Wed Nov 01 2023 Zephyr Lykos - 1.1.0-1 - new version * Fri Oct 27 2023 Zephyr Lykos - 1.0.99-1 - new version * Mon Oct 23 2023 Zephyr Lykos - 1.0.98-3 - rebuild for GSL * Mon Oct 23 2023 Zephyr Lykos - 1.0.98-2 - rebuild for qt6 * Sun Oct 01 2023 Zephyr Lykos - 1.0.98-1 - new version * Tue Sep 26 2023 Zephyr Lykos - 1.0.97-1 - new version * Sat Sep 23 2023 Zephyr Lykos - 1.0.96-1 - new version * Wed Sep 20 2023 Zephyr Lykos - 1.0.95-1 - new version * Sun Sep 17 2023 Zephyr Lykos - 1.0.94-1 - new version * Tue Sep 05 2023 Zephyr Lykos - 1.0.92-1 - new version * Wed Aug 23 2023 Zephyr Lykos - 1.0.90-1 * Wed Aug 16 2023 Zephyr Lykos - 1.0.89-1 - Updated to version 1.0.89 * Sat Jul 29 2023 Zephyr Lykos - 1.0.88-1 - Updated to version 1.0.88 * Mon Jul 24 2023 Zephyr Lykos - 1.0.86-1 - Updated to version 1.0.86 * Mon Jul 17 2023 Zephyr Lykos - 1.0.85-2 - Rebuild for Qt 6 private API * Sat Jun 10 2023 Zephyr Lykos - 1.0.85-1 - Updated to version 1.0.85 * Thu Jun 01 2023 Zephyr Lykos - 1.0.83-2 - Disable builtin updater - Switch to ffmpeg-free * Mon May 29 2023 Zephyr Lykos - 1.0.83-1 - Switch to 64Gram fork * Sun May 07 2023 Vasiliy Glazov - 4.8.1 -2 - Rebuild for new Qt 6 * Tue Apr 25 2023 Vitaly Zaitsev - 4.8.1-1 - Updated to version 4.8.1. * Sat Apr 22 2023 Vitaly Zaitsev - 4.8.0-1 - Updated to version 4.8.0. * Thu Mar 30 2023 Vitaly Zaitsev - 4.7.1-2 - Rebuilt due to Qt 6.4.3 update. * Wed Mar 22 2023 Vitaly Zaitsev - 4.7.1-1 - Updated to version 4.7.1. * Mon Mar 20 2023 Vitaly Zaitsev - 4.7.0-1 - Updated to version 4.7.0. - Switched to modern ffmpeg and OpenSSL. * Sun Feb 26 2023 Vitaly Zaitsev - 4.6.5-1 - Updated to version 4.6.5. * Thu Feb 16 2023 Vitaly Zaitsev - 4.6.3-1 - Updated to version 4.6.3. * Thu Feb 09 2023 Vitaly Zaitsev - 4.6.2-1 - Updated to version 4.6.2. * Tue Feb 07 2023 Vitaly Zaitsev - 4.6.1-1 - Updated to version 4.6.1. * Mon Feb 06 2023 Vitaly Zaitsev - 4.6.0-1 - Updated to version 4.6.0. * Wed Feb 01 2023 Vitaly Zaitsev - 4.5.3-2 - Rebuilt due to Qt 6.4.2 update. * Sat Jan 07 2023 Vitaly Zaitsev - 4.5.3-1 - Updated to version 4.5.3. * Wed Jan 04 2023 Vitaly Zaitsev - 4.5.2-2 - Removed explicit dependency on compat-ffmpeg4. * Tue Jan 03 2023 Vitaly Zaitsev - 4.5.2-1 - Updated to version 4.5.2. * Mon Jan 02 2023 Vitaly Zaitsev - 4.5.1-1 - Updated to version 4.5.1. * Sat Dec 31 2022 Vitaly Zaitsev - 4.5.0-1 - Updated to version 4.5.0. * Thu Dec 08 2022 Vitaly Zaitsev - 4.4.1-1 - Updated to version 4.4.1. * Sat Nov 26 2022 Vitaly Zaitsev - 4.3.4-1 - Updated to version 4.3.4. * Tue Nov 08 2022 Vitaly Zaitsev - 4.3.1-1 - Updated to version 4.3.1. * Sun Nov 06 2022 Vitaly Zaitsev - 4.3.0-1 - Updated to version 4.3.0.