File telegram-desktop.spec of Package telegram-desktop

%define __builder ninja
%define api_id    611335
%define api_hash  d524b414d21f4d37f08684c1df41ac9c

Name:           telegram-desktop
Version:        6.2.3
Release:        0
Summary:        Messaging application with a focus on speed and security
License:        GPL-3.0-only
URL:            https://github.com/telegramdesktop/tdesktop
Source0:        https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/tdesktop-%{version}-full.tar.gz

BuildRequires:  python3
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6Gui)
BuildRequires:  cmake(Qt6OpenGL)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  cmake(Qt6OpenGLWidgets)
BuildRequires:  cmake(Qt6Network)
BuildRequires:  cmake(Qt6Svg)
BuildRequires:  cmake(Qt6Quick)
BuildRequires:  cmake(Qt6WaylandClient)
BuildRequires:  cmake(Qt6DBus)
BuildRequires:  kf6-kcoreaddons-devel
BuildRequires:  cmake(tg_owt)
BuildRequires:  ada-url-devel-static
BuildRequires:  cmake(tde2e)

BuildRequires:  pkgconfig(hunspell)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(liblz4)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xcb-record)
BuildRequires:  pkgconfig(xcb-screensaver)
BuildRequires:  pkgconfig(webkitgtk-6.0)
BuildRequires:  pkgconfig(rnnoise)
BuildRequires:  pkgconfig(protobuf)
BuildRequires:  pkgconfig(openh264)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  qt6-gui-private-devel
BuildRequires:  qt6-widgets-private-devel
BuildRequires:  QR-Code-generator-devel
BuildRequires:  range-v3-devel
BuildRequires:  xxhash-devel
BuildRequires:  libjpeg-devel
BuildRequires:  ffmpeg-7-libavdevice-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  pkgconfig

Requires:       qt6-imageformats


%description
Telegram is a non-profit cloud-based instant messaging service.
Users can send messages and exchange photos, videos, stickers, audio and files of any type.
Its client-side code is open-source software but the source code for recent versions is not
always immediately published, whereas its server-side code is closed-source and proprietary.
The service also provides APIs to independent developers.

%prep
%autosetup -n tdesktop-%{version}-full


%build
%cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_AR=%{_bindir}/gcc-ar \
    -DCMAKE_RANLIB=%{_bindir}/gcc-ranlib \
    -DCMAKE_NM=%{_bindir}/gcc-nm \
    -DTDESKTOP_API_ID=%{api_id} \
    -DTDESKTOP_API_HASH=%{api_hash} \
    -DDESKTOP_APP_USE_PACKAGED:BOOL=ON \
    -DDESKTOP_APP_USE_PACKAGED_FONTS:BOOL=OFF \
    -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION:BOOL=OFF \
    -DDESKTOP_APP_DISABLE_X11_INTEGRATION:BOOL=OFF \
    -DDESKTOP_APP_DISABLE_CRASH_REPORTS:BOOL=ON \
    -DDESKTOP_APP_DISABLE_QT_PLUGINS:BOOL=ON 
%cmake_build


%install
%cmake_install


%files
%license LICENSE LEGAL
%doc README.md changelog.txt
%{_bindir}/Telegram
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.telegram.desktop.service
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_datadir}/metainfo/*.metainfo.xml

%changelog
openSUSE Build Service is sponsored by