File telegram.spec of Package telegram
#
# spec file for package telegram
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global debug_package "%{nil}"
%global __strip "%{_bindir}/true"
%define original_name Telegram
%define source_name tdesktop
%define archive_name tsetup
Name: telegram
Version: 5.15.4
Release: 0
Summary: A cloud-based mobile and desktop messaging app focusing on security and speed
License: GPL-3.0-only
URL: https://desktop.telegram.org
Source0: https://github.com/telegramdesktop/%{source_name}/releases/download/v%{version}/%{archive_name}.%{version}.tar.xz#/%{name}-%{version}.tar.xz
Source1: https://raw.githubusercontent.com/telegramdesktop/%{source_name}/refs/heads/dev/changelog.txt#/CHANGELOG
Source2: https://raw.githubusercontent.com/telegramdesktop/%{source_name}/refs/heads/dev/README.md
Source3: https://raw.githubusercontent.com/telegramdesktop/%{source_name}/refs/heads/dev/LICENSE
Source4: https://raw.githubusercontent.com/telegramdesktop/%{source_name}/refs/heads/dev/LEGAL
BuildRequires: coreutils
BuildRequires: tar
Requires: icu
# Spell checker for SUSE-Based Linux Distributions
%if 0%{?suse_version} > 1600 || 0%{?suse_version} == 1600 && 0%{?is_opensuse} || 0%{?sle_version} == 150600 && 0%{?is_opensuse} || 0%{?sle_version} == 150500 && 0%{?is_opensuse}
Requires: (aspell or hunspell or ispell or myspell-en)
%endif
#
# Spell checker for FEDORA-Based Linux Distributions
%if 0%{?fedora} || 0%{?mageia}
Requires: (aspell or hunspell)
%endif
#
# Spell checker for DEB-Based Linux Distributions
%if "%{_vendor}" == "debbuild" || 0%{?debian} || 0%{?ubuntu}
Requires: enchant-2
# DebBuild does not support brackets `Requires: (Dependency or Dependency)`; Selecting `HunSpell` by Default then #
Requires: hunspell
%endif
#
# Only for SUSE TumbleWeed
%if 0%{?suse_version} > 1600
Suggests: telegram-theme-adapta
#Suggests: telegram-theme-plata # Non-existing anymore #
%endif
#
Conflicts: telegram-desktop
ExclusiveArch: x86_64
%description
Telegram Desktop is a free and secure messaging app for
Windows, MAC OS, and Linux. It lets you send messages,
photos, videos, and files to other Telegram users,
as well as create groups and channels for larger communities.
It focuses on speed and security,
offering features like end-to-end encryption for secret chats.
%prep
%autosetup -n %{original_name}
# Copy SOURCEs from SOURCES Directory to BUILD Directory
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
-t %{_builddir}/%{original_name}/
#
%build
#
# Nothing to BUILD; This Telegram Desktop for LINUX comes as pre-built BINARY
#
%install
install -Dm755 %{original_name} %{buildroot}/%{_bindir}/%{name}
%check
touch -c %{buildroot}/%{_bindir}/%{name}
test -e %{buildroot}/%{_bindir}/%{name}
test -x %{buildroot}/%{_bindir}/%{name}
%post
touch %{_bindir}/%{name}
echo -e \
" -> In order to show the application desktop icon in your desktop's Application MENU; execute: \n \
-> *[%{_bindir}/%{name}]* from terminal as a currently running HOME *[USER]* <- "
%files
%defattr(-,root,root)
%license LICENSE LEGAL
%doc CHANGELOG "README.md"
%{_bindir}/%{name}
%changelog