2017-06-20 19:37:54 +02:00
|
|
|
#
|
|
|
|
# spec file for package telegram-desktop
|
|
|
|
#
|
2018-03-21 18:20:35 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
2018-03-21 18:20:35 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org
|
2017-06-20 19:37:54 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
Name: telegram-desktop
|
2018-09-04 00:13:43 +02:00
|
|
|
Version: 1.3.15
|
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
|
|
|
|
Source0: https://github.com/telegramdesktop/tdesktop/archive/v%{version}.tar.gz
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://chromium.googlesource.com/breakpad/breakpad/+archive/refs/heads/master.tar.gz -o breakpad-master.tar.gz
|
2017-06-20 19:37:54 +02:00
|
|
|
Source1: breakpad-master.tar.gz
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://chromium.googlesource.com/linux-syscall-support/+archive/master.tar.gz -o linux-syscall-support-refs-heads-master.tar.gz
|
2017-06-20 19:37:54 +02:00
|
|
|
Source2: linux-syscall-support-refs-heads-master.tar.gz
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://chromium.googlesource.com/external/gyp/+archive/master.tar.gz -o gyp-master.tar.gz
|
2017-06-20 19:37:54 +02:00
|
|
|
Source3: gyp-master.tar.gz
|
2017-12-11 01:14:03 +01:00
|
|
|
Source4: patch.py
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://codeload.github.com/Microsoft/GSL/zip/master -o GSL-master.zip
|
2017-06-20 19:37:54 +02:00
|
|
|
Source5: GSL-master.zip
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://codeload.github.com/mapbox/variant/zip/master -o variant-master.zip
|
2017-06-20 19:37:54 +02:00
|
|
|
Source6: variant-master.zip
|
2017-07-24 17:51:21 +02:00
|
|
|
# curl https://codeload.github.com/grishka/libtgvoip/zip/public -o libtgvoip.zip
|
2017-06-20 19:37:54 +02:00
|
|
|
Source7: libtgvoip.zip
|
2017-09-11 15:11:23 +02:00
|
|
|
# curl https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp -o catch.hpp
|
|
|
|
Source8: catch.hpp
|
2018-03-21 18:20:35 +01:00
|
|
|
# curl https://codeload.github.com/ericniebler/range-v3/zip/master -o range-v3-master.zip
|
2017-12-31 22:04:54 +01:00
|
|
|
Source9: range-v3-master.zip
|
|
|
|
# curl https://codeload.github.com/telegramdesktop/crl/zip/master -o crl-master.zip
|
|
|
|
Source10: crl-master.zip
|
2018-09-04 00:13:43 +02:00
|
|
|
# curl https://codeload.github.com/Cyan4973/xxHash/zip/master -o crl-master.zip
|
|
|
|
Source11: xxHash-master.zip
|
|
|
|
|
2018-05-25 09:00:24 +02:00
|
|
|
Patch0: tdesktop.patch
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: chrpath
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: cmake
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: ffmpeg-devel
|
|
|
|
BuildRequires: fontconfig-devel
|
|
|
|
BuildRequires: freetype-devel
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libQt5Core-private-headers-devel
|
|
|
|
BuildRequires: libQt5DBus-devel
|
|
|
|
BuildRequires: libQt5Gui-private-headers-devel
|
|
|
|
BuildRequires: libQt5Network-devel
|
|
|
|
BuildRequires: libQt5Widgets-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: libXfixes-devel
|
|
|
|
BuildRequires: libexpat-devel
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
BuildRequires: libmng-devel
|
|
|
|
BuildRequires: libopus-devel
|
|
|
|
BuildRequires: libproxy-devel
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: libqt5-qtbase-common-devel
|
|
|
|
BuildRequires: libqt5-qtimageformats-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: libtiff-devel
|
2018-03-21 18:20:35 +01:00
|
|
|
BuildRequires: minizip-devel
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: openal-soft-devel
|
|
|
|
BuildRequires: opusfile-devel
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: portaudio-devel
|
2018-03-21 18:20:35 +01:00
|
|
|
# python2-base is required for gyp, Auto pulled in for Tumbleweed, but need for Leap 15.
|
|
|
|
BuildRequires: python2-base
|
|
|
|
BuildRequires: python3
|
2017-06-20 19:37:54 +02:00
|
|
|
BuildRequires: unzip
|
|
|
|
BuildRequires: xcb-util-image-devel
|
|
|
|
BuildRequires: xcb-util-keysyms-devel
|
|
|
|
BuildRequires: xcb-util-renderutil-devel
|
|
|
|
BuildRequires: xcb-util-wm-devel
|
|
|
|
BuildRequires: xorg-x11-devel
|
|
|
|
BuildRequires: xz
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRequires: pkgconfig(alsa)
|
|
|
|
BuildRequires: pkgconfig(appindicator-0.1)
|
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
|
|
BuildRequires: pkgconfig(freetype2)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(gtk+-2.0)
|
|
|
|
BuildRequires: pkgconfig(harfbuzz)
|
|
|
|
BuildRequires: pkgconfig(libavcodec)
|
|
|
|
BuildRequires: pkgconfig(libavdevice)
|
|
|
|
BuildRequires: pkgconfig(libavfilter)
|
|
|
|
BuildRequires: pkgconfig(libavformat)
|
|
|
|
BuildRequires: pkgconfig(libavutil)
|
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
|
|
BuildRequires: pkgconfig(liblzma)
|
|
|
|
BuildRequires: pkgconfig(libpng)
|
|
|
|
BuildRequires: pkgconfig(libpulse)
|
|
|
|
BuildRequires: pkgconfig(libva)
|
|
|
|
BuildRequires: pkgconfig(libva-glx)
|
|
|
|
BuildRequires: pkgconfig(libva-x11)
|
|
|
|
BuildRequires: pkgconfig(libwebp)
|
|
|
|
BuildRequires: pkgconfig(mtdev)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(tslib)
|
|
|
|
BuildRequires: pkgconfig(xcb-util)
|
|
|
|
BuildRequires: pkgconfig(xkbcommon)
|
|
|
|
BuildRequires: pkgconfig(xkbcommon-x11)
|
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
|
|
|
|
Requires: jasper
|
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
|
2017-06-20 19:37:54 +02:00
|
|
|
%setup -q -n tdesktop-%{version}
|
2018-03-21 18:20:35 +01:00
|
|
|
cp %{SOURCE8} Telegram/SourceFiles/base
|
2017-09-11 15:11:23 +02:00
|
|
|
|
|
|
|
# Already included in %{S:8}
|
|
|
|
sed -i "/catch_reporter_compact.hpp/d" Telegram/SourceFiles/base/tests_main.cpp
|
2016-11-13 03:07:38 +01:00
|
|
|
|
2017-03-20 20:53:42 +01:00
|
|
|
cp %{_sourcedir}/GSL-master.zip . && unzip GSL-master.zip
|
|
|
|
mv GSL-master GSL
|
2017-06-20 19:37:54 +02:00
|
|
|
mv GSL %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
2017-03-20 20:53:42 +01:00
|
|
|
|
|
|
|
cp %{_sourcedir}/variant-master.zip . && unzip variant-master.zip
|
|
|
|
mv variant-master variant
|
2017-06-20 19:37:54 +02:00
|
|
|
mv variant %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
2017-03-20 20:53:42 +01:00
|
|
|
|
2017-06-20 19:37:54 +02:00
|
|
|
cp %{_sourcedir}/libtgvoip.zip . && unzip libtgvoip.zip
|
|
|
|
mv libtgvoip-public libtgvoip
|
|
|
|
mv libtgvoip %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
|
|
|
|
2017-12-11 01:14:03 +01:00
|
|
|
cp %{_sourcedir}/range-v3-master.zip . && unzip range-v3-master.zip
|
|
|
|
mv range-v3-master range-v3
|
|
|
|
mkdir -p %{_builddir}/Libraries
|
|
|
|
mv range-v3 %{_builddir}/Libraries/
|
|
|
|
|
2017-12-31 22:04:54 +01:00
|
|
|
cp %{_sourcedir}/crl-master.zip . && unzip crl-master.zip
|
|
|
|
mv crl-master crl
|
|
|
|
mv crl %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
|
|
|
|
2018-09-04 00:13:43 +02:00
|
|
|
cp %{_sourcedir}/xxHash-master.zip . && unzip xxHash-master.zip
|
|
|
|
mv xxHash-master xxHash
|
|
|
|
mv xxHash %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
|
|
|
|
2017-12-31 15:42:33 +01:00
|
|
|
cp %{_sourcedir}/tdesktop.patch %{_builddir}/tdesktop-%{version}
|
|
|
|
cd %{_builddir}/tdesktop-%{version}
|
2018-05-25 09:00:24 +02:00
|
|
|
%patch0 -p1
|
2017-12-31 15:42:33 +01:00
|
|
|
|
2017-12-11 01:14:03 +01:00
|
|
|
cp %{_sourcedir}/patch.py . && python3 ./patch.py
|
|
|
|
cp %{_sourcedir}/catch.hpp ./Telegram/SourceFiles/
|
|
|
|
|
2018-02-27 14:26:07 +01:00
|
|
|
%setup -q -T -c -n breakpad -a 1
|
|
|
|
%setup -q -T -c -n breakpad-lss -a 2
|
|
|
|
%setup -q -T -c -n gyp -a 3
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
mv %{_builddir}/tdesktop-%{version} %{_builddir}/tdesktop
|
|
|
|
|
2016-11-13 03:07:38 +01:00
|
|
|
# patch gyp
|
|
|
|
cd %{_builddir}/Libraries
|
2018-03-21 18:20:35 +01:00
|
|
|
ln -s %{_builddir}/gyp
|
|
|
|
cp %{_builddir}/tdesktop/Telegram/Patches/gyp.diff gyp
|
2016-11-13 03:07:38 +01:00
|
|
|
cd gyp
|
2018-03-21 18:20:35 +01:00
|
|
|
patch -p1 < gyp.diff
|
2016-11-13 03:07:38 +01:00
|
|
|
|
2016-06-05 02:26:41 +02:00
|
|
|
# Build breakpad
|
2017-12-11 01:14:03 +01:00
|
|
|
cd %{_builddir}/breakpad
|
2018-03-21 18:20:35 +01:00
|
|
|
ln -s %{_builddir}/breakpad-lss src/third_party/lss
|
2018-05-25 09:00:24 +02:00
|
|
|
%configure
|
|
|
|
%make_build
|
|
|
|
make install DESTDIR=%{_builddir}/Libraries/breakpad
|
2016-11-13 03:07:38 +01:00
|
|
|
|
|
|
|
cd %{_builddir}/tdesktop/Telegram/gyp
|
|
|
|
# patch qt.gypi to change libxkbcommon path
|
2018-03-21 18:20:35 +01:00
|
|
|
%{_builddir}/Libraries/gyp/gyp \
|
2016-11-13 03:07:38 +01:00
|
|
|
-Dlinux_lib_ssl=-lssl \
|
|
|
|
-Dlinux_lib_crypto=-lcrypto \
|
|
|
|
-Dlinux_lib_icu="-licuuc -licutu -licui18n" \
|
2018-03-21 18:20:35 +01:00
|
|
|
-Dlinux_path_opus_include="%{_includedir}/opus" \
|
2018-05-25 09:00:24 +02:00
|
|
|
-Dlinux_path_breakpad="%{_builddir}/Libraries/breakpad%{_prefix}" \
|
2017-12-31 15:42:33 +01:00
|
|
|
-Gconfig=Release \
|
2018-03-21 18:20:35 +01:00
|
|
|
--depth=. --generator-output="%{_builddir}/tdesktop" -Goutput_dir=out Telegram.gyp --format=cmake
|
2016-11-13 03:07:38 +01:00
|
|
|
|
|
|
|
# build Telegram
|
|
|
|
cd %{_builddir}/tdesktop/out/Release
|
2018-05-25 09:00:24 +02:00
|
|
|
%cmake ..
|
|
|
|
sed -i 's,breakpad/usr/lib,breakpad%{_libdir},' ./CMakeFiles/Telegram.dir/link.txt
|
2018-03-21 18:20:35 +01:00
|
|
|
make %{?_smp_mflags}
|
2016-11-13 03:07:38 +01:00
|
|
|
chrpath --delete Telegram
|
2016-06-05 02:26:41 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
# Install binary
|
2018-03-21 18:20:35 +01:00
|
|
|
install -dm755 %{buildroot}%{_bindir}
|
2018-05-25 09:00:24 +02:00
|
|
|
install -m755 %{_builddir}/tdesktop/out/Release/build/Telegram %{buildroot}%{_bindir}/%{name}
|
2016-06-05 02:26:41 +02:00
|
|
|
|
2016-11-13 05:46:56 +01:00
|
|
|
# Install desktop file
|
2017-06-20 19:37:54 +02:00
|
|
|
install -d %{buildroot}%{_datadir}/applications
|
2016-06-05 02:26:41 +02:00
|
|
|
desktop-file-install \
|
|
|
|
--dir %{buildroot}%{_datadir}/applications \
|
|
|
|
--add-category InstantMessaging \
|
|
|
|
%{_builddir}/tdesktop/lib/xdg/telegramdesktop.desktop
|
|
|
|
|
2016-11-13 05:46:56 +01:00
|
|
|
# Install protocol
|
2018-09-04 00:13:43 +02:00
|
|
|
install -d %{buildroot}%{_datadir}/kservices5
|
2016-06-05 02:26:41 +02:00
|
|
|
install -m644 %{_builddir}/tdesktop/lib/xdg/tg.protocol \
|
2018-09-04 00:13:43 +02:00
|
|
|
%{buildroot}%{_datadir}/kservices5/tg.protocol
|
2016-06-05 02:26:41 +02:00
|
|
|
|
2016-11-13 05:46:56 +01:00
|
|
|
# Install icons
|
2016-06-05 02:26:41 +02:00
|
|
|
for icon_size in 16 32 48 64 128 256 512; do
|
2017-06-20 19:37:54 +02:00
|
|
|
icon_dir="%{buildroot}%{_datadir}/icons/hicolor/${icon_size}x${icon_size}/apps"
|
2016-06-05 02:26:41 +02:00
|
|
|
install -d "${icon_dir}"
|
|
|
|
install -m644 "%{_builddir}/tdesktop/Telegram/Resources/art/icon${icon_size}.png" \
|
2017-05-01 04:29:24 +02:00
|
|
|
"${icon_dir}/telegram.png"
|
2016-06-05 02:26:41 +02:00
|
|
|
done
|
|
|
|
|
2017-07-11 18:39:54 +02:00
|
|
|
%post
|
|
|
|
%icon_theme_cache_post
|
|
|
|
%desktop_database_post
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%icon_theme_cache_postun
|
|
|
|
%desktop_database_postun
|
|
|
|
|
2016-06-05 02:26:41 +02:00
|
|
|
%files
|
2018-03-21 18:20:35 +01:00
|
|
|
%defattr(0664,root,root,-)
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}
|
2017-06-20 19:37:54 +02:00
|
|
|
%{_datadir}/applications/telegramdesktop.desktop
|
2018-09-04 00:13:43 +02:00
|
|
|
%dir %{_datadir}/kservices5
|
|
|
|
%{_datadir}/kservices5/tg.protocol
|
2017-06-20 19:37:54 +02:00
|
|
|
%{_datadir}/icons/hicolor/*/apps/telegram.png
|
|
|
|
|
|
|
|
%changelog
|