File telegram-desktop.spec of Package telegram-desktop

#
# spec file for package telegram-desktop
#
# Copyright (c) 2021 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/
#

Name:           telegram-desktop
Version:        3.3.0
Release:        1%{?dist}
Summary:        Yes
License:        GPLv3
Source0:        https://updates.tdesktop.com/tlinux/tsetup.%{version}.tar.xz
BuildRequires:  make
#Requires:       

%description
A demo RPM build

%prep
%setup -n Telegram

%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
install -m 755 Telegram $RPM_BUILD_ROOT/%{_bindir}/telegram-desktop
install -m 755 Updater $RPM_BUILD_ROOT/%{_bindir}/telegram-desktop-updater
mkdir -p %{buildroot}/%{_datadir}/applications/
cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop <<'EOF'
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=telegram-desktop
Exec=telegram-desktop -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true
EOF

%files
/usr/bin/telegram-desktop
/usr/bin/telegram-desktop-updater
/usr/share/applications/telegram-desktop.desktop
#%changelog
openSUSE Build Service is sponsored by