Репозиторий Sisyphus
Последнее обновление: 22 октября 2020 | Пакетов: 17699 | Посещений: 19461380
en ru br
Репозитории ALT

Группа :: Сети/Мгновенные сообщения
Пакет: telegram-desktop

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# TODO: build external, json11 separately

# other variant: Debug

%define buildmode Release

%define ffmpeg_version 3.4
%def_without ffmpeg_static

Name: telegram-desktop
Version: 2.0.1
Release: alt1

Summary: Telegram Desktop messaging app

License: GPLv3 with OpenSSL exception
Group: Networking/Instant messaging
Url: https://telegram.org/

# Source-url: https://github.com/telegramdesktop/tdesktop/releases/download/v%version/tdesktop-%version-full.tar.gz

Source: %name-%version.tar

# Check https://github.com/EasyCoding/tgbuild for patches

BuildRequires(pre): rpm-macros-qt5 rpm-macros-cmake
#BuildRequires(pre): rpm-macros-kde-common-devel

BuildRequires(pre): rpm-build-compat >= 2.1.5
BuildRequires(pre): rpm-build-intro >= 2.1.5

# use no more than system_memory/3000 build procs (see https://bugzilla.altlinux.org/show_bug.cgi?id=35112)

%_tune_parallel_build_by_procsize 3000

# minimalize memory using

%ifarch %ix86
%define optflags_debug -g0

BuildRequires: gcc-c++ libstdc++-devel python3

# cmake 3.16 as in CMakeLists.txt

BuildRequires: cmake >= 3.16

BuildRequires: qt5-base-devel libqt5-core libqt5-network libqt5-gui qt5-imageformats
# needs for smiles and emojicons
Requires: qt5-imageformats

# run around https://bugzilla.altlinux.org/show_bug.cgi?id=34665

Requires: libqt5-core >= %_qt5_version

# for -lQt5PlatformSupport

BuildRequires: qt5-base-devel-static

BuildRequires: libenchant2-devel
BuildRequires: libhunspell-devel

# for autoupdater (included ever if disabled)

BuildRequires: liblzma-devel

# for SourceFiles/mtproto/connection.cpp

BuildRequires: libzip-devel

BuildRequires: zlib-devel >= 1.2.8
BuildRequires: libxxhash-devel
BuildRequires: liblz4-devel

BuildRequires: libminizip-devel libpcre-devel libexpat-devel libssl-devel bison
#BuildRequires: libxkbcommon-devel libxkbcommon-x11-devel
#BuildRequires: libXi-devel libSM-devel libICE-devel libdbus-devel libXfixes-devel
BuildRequires: libX11-devel

# GTK 3.0 integration

BuildRequires: libgtk+3-devel libappindicator-gtk3-devel
# libdee-devel

BuildRequires: libopenal-devel >= 1.17.2
# libportaudio2-devel libxcb-devel
# used by qt imageformats: libwebp-devel
BuildRequires: libva-devel libdrm-devel

# libs from Telegram project

BuildRequires: libtgvoip-devel >= 2.4.4
BuildRequires: librlottie-devel >= 0.0.1
BuildRequires: libqrcodegen-cpp-devel

# C++ sugar

BuildRequires: libmicrosoft-gsl-devel >= 1:2.1.0
BuildRequires: libvariant-devel
BuildRequires: libexpected-devel
BuildRequires: librange-v3-devel >= 0.10.0

BuildRequires: libdbusmenu-qt5-devel

# FIXME: libva need only for linking, extra deps?

Provides: tdesktop = %version-%release
Obsoletes: tdesktop

%if_with ffmpeg_static
BuildRequires: libffmpeg-devel-static >= %ffmpeg_version
BuildRequires: libavcodec-devel >= %ffmpeg_version
BuildRequires: libavformat-devel >= %ffmpeg_version
BuildRequires: libavutil-devel >= %ffmpeg_version
BuildRequires: libswscale-devel >= %ffmpeg_version
BuildRequires: libswresample-devel >= %ffmpeg_version

Requires: dbus

# instead of internal fonts OpenSans

Requires: fonts-ttf-open-sans

# some problems with t_assert

%add_optflags -fpermissive

# disable some warnings

%add_optflags -Wno-strict-aliasing -Wno-unused-variable -Wno-sign-compare -Wno-switch

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 1000 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.


rm -rf Telegram/ThirdParty/variant \
Telegram/ThirdParty/GSL \
Telegram/ThirdParty/Catch \
Telegram/ThirdParty/xxHash \
Telegram/ThirdParty/lz4 \
Telegram/ThirdParty/libtgvoip \
Telegram/ThirdParty/rlottie \
Telegram/ThirdParty/QR \

%if_with ffmpeg_static
export PKG_CONFIG_PATH=%_libdir/ffmpeg-static/%_lib/pkgconfig/

# due precompiled headers

export CCACHE_SLOPPINESS=pch_defines,time_macros

# AppID for Basealt build

# got from https://core.telegram.org/api/obtaining_api_id
   -DTDESKTOP_API_ID=182015 \
   -DTDESKTOP_API_HASH=bb6c3f8fffd8fe6804fc5131a08e1c44 \
   -DVARIANT_INCLUDE_DIRS=%_includedir/libvariant \


# XDG files
#install -m644 -D lib/xdg/tg.protocol %buildroot%_Kservices/tg.protocol

ln -s %name %buildroot%_bindir/Telegram
ln -s %name %buildroot%_bindir/telegram
ln -s %name %buildroot%_bindir/telegramdesktop

%doc README.md


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin