2017-06-20 19:37:54 +02:00
|
|
|
#
|
|
|
|
# spec file for package telegram-desktop
|
|
|
|
#
|
2020-01-16 11:02:40 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2017-06-20 19:37:54 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-21 20:08:55 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-20 19:37:54 +02:00
|
|
|
#
|
|
|
|
|
2018-10-12 02:46:27 +02:00
|
|
|
|
2019-07-30 20:14:02 +02:00
|
|
|
# Disable LTO on TW due to build failures
|
2019-08-22 16:02:37 +02:00
|
|
|
%if 0%{?suse_version} > 01500
|
2019-07-30 20:14:02 +02:00
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
%endif
|
|
|
|
|
2020-04-01 17:07:01 +02:00
|
|
|
# We need at least gcc8 or higher to build
|
|
|
|
%if 0%{?suse_version} < 01550 && 0%{?is_opensuse}
|
|
|
|
%bcond_without fixed_gcc
|
|
|
|
%else
|
|
|
|
%bcond_with fixed_gcc
|
|
|
|
%endif
|
|
|
|
|
2020-01-24 23:44:24 +01:00
|
|
|
%define __builder ninja
|
|
|
|
|
2017-06-20 19:37:54 +02:00
|
|
|
Name: telegram-desktop
|
2020-04-01 17:07:01 +02:00
|
|
|
Version: 2.0.1
|
2017-06-20 19:37:54 +02:00
|
|
|
Release: 0
|
2018-09-18 15:39:12 +02:00
|
|
|
Summary: Messaging application with a focus on speed and security
|
2018-03-21 18:20:35 +01:00
|
|
|
License: GPL-3.0-only
|
2017-12-11 01:14:03 +01:00
|
|
|
Group: Productivity/Networking/Instant Messenger
|
2018-03-21 18:20:35 +01:00
|
|
|
URL: https://github.com/telegramdesktop/tdesktop
|
2020-01-16 11:02:40 +01:00
|
|
|
Source0: https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/tdesktop-%{version}-full.tar.gz
|
2018-03-21 18:20:35 +01:00
|
|
|
# curl https://codeload.github.com/ericniebler/range-v3/zip/master -o range-v3-master.zip
|
2020-01-16 11:02:40 +01:00
|
|
|
Source1: range-v3-master.zip
|
2020-01-24 23:44:24 +01:00
|
|
|
Patch0: 0000-gtk2-default.patch
|
|
|
|
Patch1: 0001-use-bundled-range.patch
|
|
|
|
BuildRequires: appstream-glib
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: chrpath
|
2020-01-30 10:20:05 +01:00
|
|
|
BuildRequires: cmake >= 3.16
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: desktop-file-utils
|
2020-01-24 23:44:24 +01:00
|
|
|
BuildRequires: enchant-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: ffmpeg-devel
|
|
|
|
BuildRequires: freetype-devel
|
2020-04-01 17:07:01 +02:00
|
|
|
%if %{with fixed_gcc}
|
|
|
|
BuildRequires: gcc9-c++
|
|
|
|
%else
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: gcc-c++
|
2020-04-01 17:07:01 +02:00
|
|
|
%endif
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libQt5Core-private-headers-devel
|
|
|
|
BuildRequires: libQt5Gui-private-headers-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: libjpeg-devel
|
2020-01-16 11:02:40 +01:00
|
|
|
BuildRequires: liblz4-devel
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: libqt5-qtbase-common-devel
|
|
|
|
BuildRequires: libqt5-qtimageformats-devel
|
2020-01-24 23:44:24 +01:00
|
|
|
BuildRequires: memory-constraints
|
2020-01-16 11:02:40 +01:00
|
|
|
BuildRequires: ninja
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: unzip
|
|
|
|
BuildRequires: xorg-x11-devel
|
2020-01-16 11:02:40 +01:00
|
|
|
BuildRequires: xxhash-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: xz
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(Qt5DBus)
|
|
|
|
BuildRequires: pkgconfig(Qt5Network)
|
|
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(alsa)
|
2020-02-12 18:55:33 +01:00
|
|
|
BuildRequires: pkgconfig(dbusmenu-qt5)
|
2019-11-02 12:56:40 +01:00
|
|
|
BuildRequires: pkgconfig(dee-1.0)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(expat)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
|
|
BuildRequires: pkgconfig(freetype2)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
2019-08-23 17:44:17 +02:00
|
|
|
BuildRequires: pkgconfig(gtk+-2.0)
|
2019-08-22 16:02:37 +02:00
|
|
|
BuildRequires: pkgconfig(gtk+-3.0)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(harfbuzz)
|
2020-03-17 15:58:46 +01:00
|
|
|
BuildRequires: pkgconfig(hunspell)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(libavcodec)
|
|
|
|
BuildRequires: pkgconfig(libavdevice)
|
|
|
|
BuildRequires: pkgconfig(libavfilter)
|
|
|
|
BuildRequires: pkgconfig(libavformat)
|
|
|
|
BuildRequires: pkgconfig(libavutil)
|
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
|
|
BuildRequires: pkgconfig(liblzma)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(libmng)
|
|
|
|
BuildRequires: pkgconfig(libpcre)
|
|
|
|
BuildRequires: pkgconfig(libpcre16)
|
|
|
|
BuildRequires: pkgconfig(libpcrecpp)
|
|
|
|
BuildRequires: pkgconfig(libpcreposix)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(libpng)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(libproxy-1.0)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(libpulse)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(libtiff-4)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(libva)
|
|
|
|
BuildRequires: pkgconfig(libva-glx)
|
|
|
|
BuildRequires: pkgconfig(libva-x11)
|
|
|
|
BuildRequires: pkgconfig(libwebp)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(minizip)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(mtdev)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(openal)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(opus)
|
|
|
|
BuildRequires: pkgconfig(opusfile)
|
|
|
|
BuildRequires: pkgconfig(opusurl)
|
|
|
|
BuildRequires: pkgconfig(portaudio-2.0)
|
|
|
|
BuildRequires: pkgconfig(portaudiocpp)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(tslib)
|
2019-11-02 12:56:40 +01:00
|
|
|
BuildRequires: pkgconfig(vdpau)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(xcb-ewmh)
|
|
|
|
BuildRequires: pkgconfig(xcb-icccm)
|
|
|
|
BuildRequires: pkgconfig(xcb-image)
|
|
|
|
BuildRequires: pkgconfig(xcb-keysyms)
|
|
|
|
BuildRequires: pkgconfig(xcb-renderutil)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(xcb-util)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(xfixes)
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: pkgconfig(xkbcommon)
|
|
|
|
BuildRequires: pkgconfig(xkbcommon-x11)
|
2019-06-11 20:22:44 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2016-11-13 03:07:38 +01:00
|
|
|
# Runtime requirements
|
2017-06-20 19:37:54 +02:00
|
|
|
Requires: ffmpeg
|
|
|
|
Requires: hicolor-icon-theme
|
|
|
|
Requires: icu
|
2018-03-21 18:20:35 +01:00
|
|
|
Requires: openssl
|
2017-06-20 19:37:54 +02:00
|
|
|
ExclusiveArch: x86_64
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%description
|
2018-03-21 18:20:35 +01:00
|
|
|
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.
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%prep
|
2020-01-16 11:02:40 +01:00
|
|
|
%setup -q -n tdesktop-%{version}-full
|
2019-06-11 20:22:44 +02:00
|
|
|
|
2020-01-16 11:02:40 +01:00
|
|
|
unzip %{_sourcedir}/range-v3-master.zip -d %{_builddir}/Libraries/
|
|
|
|
mv %{_builddir}/Libraries/range-v3-master %{_builddir}/Libraries/range-v3
|
2019-07-30 20:14:02 +02:00
|
|
|
|
2018-05-25 09:00:24 +02:00
|
|
|
%patch0 -p1
|
2019-11-06 11:29:52 +01:00
|
|
|
%patch1 -p1
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%build
|
2020-01-24 23:44:24 +01:00
|
|
|
%limit_build -m 2048
|
2020-04-01 17:07:01 +02:00
|
|
|
%if %{with fixed_gcc}
|
|
|
|
export CC=/usr/bin/gcc-9
|
|
|
|
export CXX=/usr/bin/g++-9
|
|
|
|
%endif
|
2019-06-11 20:22:44 +02:00
|
|
|
|
2020-01-24 23:44:24 +01:00
|
|
|
%cmake \
|
2020-01-16 11:02:40 +01:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DTDESKTOP_API_ID=340630 \
|
|
|
|
-DTDESKTOP_API_HASH=98a22f733eac40f1bd187a30d19271de \
|
|
|
|
-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF \
|
2020-01-22 12:30:17 +01:00
|
|
|
-DDESKTOP_APP_USE_PACKAGED=ON \
|
2020-02-12 18:55:33 +01:00
|
|
|
-DDESKTOP_APP_USE_PACKAGED_GSL=OFF \
|
|
|
|
-DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF \
|
2020-01-22 12:30:17 +01:00
|
|
|
-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF \
|
2020-01-30 10:20:05 +01:00
|
|
|
-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \
|
2020-02-12 18:55:33 +01:00
|
|
|
-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF \
|
2020-01-24 23:44:24 +01:00
|
|
|
-DDESKTOP_APP_USE_PACKAGED_FONTS=ON \
|
2020-01-16 11:02:40 +01:00
|
|
|
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \
|
|
|
|
-DTDESKTOP_DISABLE_AUTOUPDATE=ON \
|
2020-01-24 23:44:24 +01:00
|
|
|
-DTDESKTOP_LAUNCHER_BASENAME=%{name} \
|
2020-01-16 11:02:40 +01:00
|
|
|
-DDESKTOP_APP_SPECIAL_TARGET=""
|
|
|
|
|
2020-01-24 23:44:24 +01:00
|
|
|
%cmake_build
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%install
|
2020-01-24 23:44:24 +01:00
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%files
|
2020-01-24 23:44:24 +01:00
|
|
|
%license LICENSE LEGAL
|
|
|
|
%doc README.md changelog.txt
|
2019-07-30 20:14:02 +02:00
|
|
|
%{_bindir}/%{name}
|
2020-01-24 23:44:24 +01:00
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/*.png
|
|
|
|
%{_datadir}/metainfo/*.appdata.xml
|
2017-06-20 19:37:54 +02:00
|
|
|
|
|
|
|
%changelog
|