forked from pool/telegram-desktop
Accepting request 589791 from home:13ilya:branches:server:messaging
- Refresh spec-file via spec-cleaner and manual optimizations. * Add %license and %doc macros. * Remove Leap/SLE support for version < 15. * Change Description and Summary. OBS-URL: https://build.opensuse.org/request/show/589791 OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=35
This commit is contained in:
parent
c6b51daab0
commit
1e18f3d0d8
@ -1,7 +1,7 @@
|
||||
<constraints>
|
||||
<hardware>
|
||||
<physicalmemory>
|
||||
<size unit="M">2048</size>
|
||||
<size unit="G">4</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
</constraints>
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 20 21:31:30 UTC 2018 - ilya@ilya.pp.ua
|
||||
|
||||
- Refresh spec-file via spec-cleaner and manual optimizations.
|
||||
* Add %license and %doc macros.
|
||||
* Remove Leap/SLE support for version < 15.
|
||||
* Change Description and Summary.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 26 22:17:19 UTC 2018 - badshah400@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package telegram-desktop
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,18 +12,17 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org
|
||||
#
|
||||
|
||||
|
||||
Name: telegram-desktop
|
||||
Version: 1.2.6
|
||||
Release: 0
|
||||
Summary: A new era of messaging
|
||||
License: GPL-3.0
|
||||
Summary: Telegram is a messaging app with a focus on speed and security
|
||||
License: GPL-3.0-only
|
||||
Group: Productivity/Networking/Instant Messenger
|
||||
Url: https://github.com/telegramdesktop/tdesktop
|
||||
Source: https://github.com/telegramdesktop/tdesktop/archive/v%{version}.tar.gz
|
||||
URL: https://github.com/telegramdesktop/tdesktop
|
||||
Source0: https://github.com/telegramdesktop/tdesktop/archive/v%{version}.tar.gz
|
||||
# curl https://chromium.googlesource.com/breakpad/breakpad/+archive/refs/heads/master.tar.gz -o breakpad-master.tar.gz
|
||||
Source1: breakpad-master.tar.gz
|
||||
# curl https://chromium.googlesource.com/linux-syscall-support/+archive/master.tar.gz -o linux-syscall-support-refs-heads-master.tar.gz
|
||||
@ -47,28 +46,36 @@ Source10: crl-master.zip
|
||||
Patch0: breakpad-ucontext_t-glibc2_26.patch
|
||||
Patch1: tdesktop.patch
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: ffmpeg-devel
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: gcc-c++ >= 7
|
||||
BuildRequires: python3
|
||||
# python2-base is required for gyp [automatically pulled in for Factory, but added here for Leap:15.0, where it isn't]
|
||||
BuildRequires: python2-base
|
||||
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
|
||||
BuildRequires: libXfixes-devel
|
||||
BuildRequires: libexpat-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libmng-devel
|
||||
BuildRequires: libopus-devel
|
||||
BuildRequires: libproxy-devel
|
||||
BuildRequires: libqt5-qtbase-common-devel
|
||||
BuildRequires: libqt5-qtimageformats-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: minizip-devel
|
||||
BuildRequires: openal-soft-devel
|
||||
BuildRequires: opusfile-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: portaudio-devel
|
||||
# python2-base is required for gyp, Auto pulled in for Tumbleweed, but need for Leap 15.
|
||||
BuildRequires: python2-base
|
||||
BuildRequires: python3
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xcb-util-image-devel
|
||||
BuildRequires: xcb-util-keysyms-devel
|
||||
@ -77,14 +84,6 @@ BuildRequires: xcb-util-wm-devel
|
||||
BuildRequires: xorg-x11-devel
|
||||
BuildRequires: xz
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libqt5-qtbase-common-devel
|
||||
BuildRequires: libqt5-qtimageformats-devel
|
||||
BuildRequires: libQt5Gui-private-headers-devel
|
||||
BuildRequires: libQt5Core-private-headers-devel
|
||||
BuildRequires: libQt5Network-devel
|
||||
BuildRequires: libQt5Widgets-devel
|
||||
BuildRequires: libQt5DBus-devel
|
||||
BuildRequires: minizip-devel
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(appindicator-0.1)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
@ -116,23 +115,24 @@ Requires: ffmpeg
|
||||
Requires: hicolor-icon-theme
|
||||
Requires: icu
|
||||
Requires: jasper
|
||||
Requires: openssl
|
||||
Requires: libqt5-qtimageformats
|
||||
Requires: openssl
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
%description
|
||||
Telegram Desktop app. A new era of messaging.
|
||||
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.
|
||||
|
||||
%prep
|
||||
|
||||
%setup -q -n tdesktop-%{version}
|
||||
cp %{S:8} Telegram/SourceFiles/base/
|
||||
cp %{SOURCE8} Telegram/SourceFiles/base
|
||||
|
||||
# Already included in %{S:8}
|
||||
sed -i "/catch_reporter_compact.hpp/d" Telegram/SourceFiles/base/tests_main.cpp
|
||||
|
||||
rm -rf %{_builddir}/tdesktop-%{version}/ThirdParty/*
|
||||
|
||||
cp %{_sourcedir}/GSL-master.zip . && unzip GSL-master.zip
|
||||
mv GSL-master GSL
|
||||
mv GSL %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
|
||||
@ -165,36 +165,25 @@ cp %{_sourcedir}/catch.hpp ./Telegram/SourceFiles/
|
||||
%setup -q -T -c -n breakpad-lss -a 2
|
||||
%setup -q -T -c -n gyp -a 3
|
||||
|
||||
%if 0%{?suse_version} > 1320
|
||||
pushd %{_builddir}/breakpad/src
|
||||
%patch0 -p1
|
||||
popd
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
# generate patch
|
||||
# git diff --relative-directory=./a a b
|
||||
# Setup compiler variables
|
||||
|
||||
mv %{_builddir}/tdesktop-%{version} %{_builddir}/tdesktop
|
||||
|
||||
# patch gyp
|
||||
cd %{_builddir}/Libraries
|
||||
ln -s %{_builddir}/gyp ./gyp
|
||||
cp %{_builddir}/tdesktop/Telegram/Patches/gyp.diff ./gyp/
|
||||
ln -s %{_builddir}/gyp
|
||||
cp %{_builddir}/tdesktop/Telegram/Patches/gyp.diff gyp
|
||||
cd gyp
|
||||
patch -p1 < ./gyp.diff
|
||||
patch -p1 < gyp.diff
|
||||
|
||||
# Build breakpad
|
||||
cd %{_builddir}/breakpad
|
||||
ln -s %{_builddir}/breakpad-lss ./src/third_party/lss
|
||||
%if 0%{?suse_version} <= 1320
|
||||
export CXX='g++-7'
|
||||
export GCC='gcc-7'
|
||||
%endif
|
||||
ln -s %{_builddir}/breakpad-lss src/third_party/lss
|
||||
# FIXME: you should use the %%configure macro
|
||||
./configure --prefix=`pwd`/../Libraries/breakpad
|
||||
./configure --prefix=%{_builddir}/Libraries/breakpad
|
||||
make %{?_smp_mflags}
|
||||
make install
|
||||
|
||||
@ -202,36 +191,26 @@ make install
|
||||
# use gyp to generate cmake files
|
||||
cd %{_builddir}/tdesktop/Telegram/gyp
|
||||
# patch qt.gypi to change libxkbcommon path
|
||||
../../../Libraries/gyp/gyp \
|
||||
%if 0%{?suse_version} <= 1320
|
||||
-DCMAKE_CXX_COMPILER='g++-7' \
|
||||
%endif
|
||||
%{_builddir}/Libraries/gyp/gyp \
|
||||
-Dlinux_lib_ssl=-lssl \
|
||||
-Dlinux_lib_crypto=-lcrypto \
|
||||
-Dlinux_lib_icu="-licuuc -licutu -licui18n" \
|
||||
-Dlinux_path_opus_include="/usr/include/opus" \
|
||||
-Dlinux_path_breakpad="../../../Libraries/breakpad" \
|
||||
-Dlinux_path_opus_include="%{_includedir}/opus" \
|
||||
-Dlinux_path_breakpad="%{_builddir}/Libraries/breakpad" \
|
||||
-Gconfig=Release \
|
||||
--depth=. --generator-output="../../" -Goutput_dir=out Telegram.gyp --format=cmake
|
||||
--depth=. --generator-output="%{_builddir}/tdesktop" -Goutput_dir=out Telegram.gyp --format=cmake
|
||||
|
||||
# build Telegram
|
||||
cd %{_builddir}/tdesktop/out/Release
|
||||
# FIXME: you should use %%cmake macros
|
||||
%if 0%{?suse_version} <= 1320
|
||||
export CXX='g++-7'
|
||||
export GCC='gcc-7'
|
||||
CC=gcc-7 CXX=g++-7 cmake .
|
||||
%else
|
||||
cmake .
|
||||
%endif
|
||||
make #%%{?_smp_mflags}
|
||||
cmake -LA .
|
||||
make %{?_smp_mflags}
|
||||
chrpath --delete Telegram
|
||||
|
||||
%install
|
||||
# Install binary
|
||||
install -dm755 %{buildroot}%{_prefix}/bin
|
||||
install -m755 %{_builddir}/tdesktop/out/Release/Telegram \
|
||||
%{buildroot}%{_bindir}/telegram-desktop
|
||||
install -dm755 %{buildroot}%{_bindir}
|
||||
install -m755 %{_builddir}/tdesktop/out/Release/Telegram %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
# Install desktop file
|
||||
install -d %{buildroot}%{_datadir}/applications
|
||||
@ -262,8 +241,10 @@ done
|
||||
%desktop_database_postun
|
||||
|
||||
%files
|
||||
%defattr (-, root, root, -)
|
||||
%{_bindir}/telegram-desktop
|
||||
%defattr(0664,root,root,-)
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%attr(0755,root,root) %{_bindir}/%{name}
|
||||
%{_datadir}/applications/telegramdesktop.desktop
|
||||
%dir %{_datadir}/kde4
|
||||
%dir %{_datadir}/kde4/services
|
||||
|
Loading…
x
Reference in New Issue
Block a user