2024-01-05 18:22:22 +01:00
|
|
|
%define qt_ver 5.6.2
|
2024-01-05 18:22:22 +01:00
|
|
|
%define qt_patchver %(echo %qt_ver | tr . _)
|
|
|
|
%define qt_majver %(echo %qt_ver | cut -d. -f1-2)
|
|
|
|
|
|
|
|
Name: telegram
|
2024-01-05 18:22:22 +01:00
|
|
|
Version: 1.1.23
|
2024-01-05 18:22:22 +01:00
|
|
|
Release: 1mamba
|
2024-01-05 18:22:22 +01:00
|
|
|
Summary: The official desktop client for the Telegram messenger
|
|
|
|
Group: Graphical Desktop/Applications/Internet
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://telegram.org/
|
|
|
|
## GITSOURCE https://github.com/telegramdesktop/tdesktop.git v0.9.32
|
|
|
|
Source: https://github.com/telegramdesktop/tdesktop.git/v%{version}/tdesktop-%{version}.tar.bz2
|
|
|
|
Source1: telegramdesktop.desktop
|
|
|
|
Source2: tg.protocol
|
2024-01-05 18:22:22 +01:00
|
|
|
Source3: http://download.qt-project.org/official_releases/qt/%{qt_majver}/%{qt_ver}/submodules/qtbase-opensource-src-%{qt_ver}.tar.xz
|
|
|
|
Source4: http://download.qt-project.org/official_releases/qt/%{qt_majver}/%{qt_ver}/submodules/qtimageformats-opensource-src-%{qt_ver}.tar.xz
|
2024-01-05 18:22:22 +01:00
|
|
|
Source5: http://download.qt-project.org/official_releases/qt/%{qt_majver}/%{qt_ver}/submodules/qtwayland-opensource-src-%{qt_ver}.tar.xz
|
2024-01-05 18:22:22 +01:00
|
|
|
Patch0: telegram-0.10.6-disable-unity.patch
|
2024-01-05 18:22:22 +01:00
|
|
|
Patch1: telegram-1.1.23-fix-build.patch
|
|
|
|
Patch2: telegram-1.1.23-libtgvoip-fixes.patch
|
2024-01-05 18:22:22 +01:00
|
|
|
License: GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libICE-devel
|
|
|
|
BuildRequires: libSM-devel
|
|
|
|
BuildRequires: libX11-devel
|
|
|
|
BuildRequires: libXext-devel
|
|
|
|
BuildRequires: libXi-devel
|
|
|
|
BuildRequires: libavcodec-ffmpeg-devel
|
|
|
|
BuildRequires: libavformat-ffmpeg-devel
|
|
|
|
BuildRequires: libavutil-ffmpeg-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libdbus-devel
|
|
|
|
BuildRequires: libexpat-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libfontconfig-devel
|
|
|
|
BuildRequires: libfreetype-devel
|
|
|
|
BuildRequires: libgcc
|
|
|
|
BuildRequires: libglib-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libharfbuzz-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libicu-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libjpeg-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: liblzma-devel
|
|
|
|
BuildRequires: libopenal-devel
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: libopus-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libpcre-devel
|
|
|
|
BuildRequires: libpng-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libproxy-devel
|
|
|
|
BuildRequires: libswresample-ffmpeg-devel
|
|
|
|
BuildRequires: libswscale-ffmpeg-devel
|
|
|
|
BuildRequires: libva-devel
|
|
|
|
BuildRequires: libwebp-devel
|
|
|
|
BuildRequires: libxcb-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libxcb-image-devel
|
|
|
|
BuildRequires: libxcb-keysyms-devel
|
|
|
|
BuildRequires: libxcb-render-util-devel
|
|
|
|
BuildRequires: libxcb-util-wm-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libxkbcommon-devel
|
|
|
|
BuildRequires: libz-devel
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libbreakpad-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
BuildRequires: libunity-devel
|
2024-01-05 18:22:22 +01:00
|
|
|
Requires: kconfig
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
The official desktop client for the Telegram messenger.
|
|
|
|
|
|
|
|
%debug_package
|
|
|
|
|
|
|
|
%prep
|
2024-01-05 18:22:22 +01:00
|
|
|
%setup -q -c -a0 -a3 -a4 -a5
|
2024-01-05 18:22:22 +01:00
|
|
|
#% setup -q -c -D -T
|
|
|
|
#:<< _EOF
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
git clone https://chromium.googlesource.com/external/gyp gyp
|
2024-01-05 18:22:22 +01:00
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
mkdir -p Libraries/qt%{qt_ver}
|
2024-01-05 18:22:22 +01:00
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
mv qtbase-opensource-src-%{qt_ver} Libraries/qt%{qt_ver}/qtbase
|
|
|
|
mv qtimageformats-opensource-src-%{qt_ver} Libraries/qt%{qt_ver}/qtimageformats
|
2024-01-05 18:22:22 +01:00
|
|
|
mv qtwayland-opensource-src-%{qt_ver} Libraries/qt%{qt_ver}/qtwayland
|
2024-01-05 18:22:22 +01:00
|
|
|
|
|
|
|
cd Libraries/qt%{qt_ver}/qtbase
|
|
|
|
patch -p1 < ../../../tdesktop-%{version}/Telegram/Patches/qtbase_%{qt_patchver}.diff
|
2024-01-05 18:22:22 +01:00
|
|
|
cd ../../..
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
cd gyp
|
|
|
|
git apply ../tdesktop-%{version}/Telegram/Patches/gyp.diff
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
ln -s ../gyp Libraries/gyp
|
|
|
|
|
|
|
|
mkdir -p Libraries/cmake-3.6.2/bin
|
|
|
|
ln -s %{_bindir}/cmake Libraries/cmake-3.6.2/bin/cmake
|
2024-01-05 18:22:22 +01:00
|
|
|
|
|
|
|
cd tdesktop-%{version}
|
2024-01-05 18:22:22 +01:00
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
%patch1 -p1
|
2024-01-05 18:22:22 +01:00
|
|
|
|
|
|
|
cd Telegram/ThirdParty
|
|
|
|
git clone https://github.com/telegramdesktop/libtgvoip.git
|
|
|
|
git clone https://github.com/Microsoft/GSL.git
|
|
|
|
git clone https://github.com/mapbox/variant.git
|
|
|
|
git clone https://github.com/philsquared/Catch.git
|
|
|
|
|
|
|
|
cd libtgvoip
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
cd ../../..
|
2024-01-05 18:22:22 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
# Build patched Qt
|
2024-01-05 18:22:22 +01:00
|
|
|
cd Libraries/qt%{qt_ver}/qtbase
|
2024-01-05 18:22:22 +01:00
|
|
|
./configure \
|
|
|
|
-prefix "%{_builddir}/telegram-%{version}/qt" \
|
|
|
|
-release \
|
|
|
|
-force-debug-info \
|
|
|
|
-opensource \
|
|
|
|
-confirm-license \
|
|
|
|
-system-zlib \
|
|
|
|
-system-libpng \
|
|
|
|
-system-libjpeg \
|
|
|
|
-system-freetype \
|
|
|
|
-system-harfbuzz \
|
|
|
|
-system-pcre \
|
|
|
|
-system-xcb \
|
|
|
|
-system-xkbcommon-x11 \
|
|
|
|
-no-gtkstyle \
|
|
|
|
-static \
|
|
|
|
-nomake examples \
|
|
|
|
-nomake tests
|
|
|
|
#-no-opengl
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
%make
|
|
|
|
#module-qtbase module-qtimageformats
|
|
|
|
make install
|
2024-01-05 18:22:22 +01:00
|
|
|
|
|
|
|
# also add /usr/bin to disable icecc
|
|
|
|
export PATH="%{_builddir}/telegram-%{version}/qt/bin:/usr/bin:$PATH"
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
cd ../qtimageformats
|
|
|
|
qmake .
|
2024-01-05 18:22:22 +01:00
|
|
|
%make
|
2024-01-05 18:22:22 +01:00
|
|
|
make install
|
2024-01-05 18:22:22 +01:00
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
cd ../qtwayland
|
|
|
|
qmake .
|
|
|
|
%make
|
|
|
|
make install
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
cd ../../../tdesktop-%{version}/Telegram
|
|
|
|
gyp/refresh.sh
|
2024-01-05 18:22:22 +01:00
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
# Build Telegram Desktop
|
|
|
|
cd gyp
|
|
|
|
../../../Libraries/gyp/gyp \
|
|
|
|
-Dlinux_path_qt="%{_builddir}/%{name}-%{version}/qt" \
|
|
|
|
-Dlinux_lib_icu="-licuuc -licutu -licui18n" \
|
|
|
|
-Dlinux_lib_ssl='-L%{_libdir}/openssl-1.0.1 -lssl' \
|
|
|
|
-Dlinux_lib_crypto='-L%{_libdir}/openssl-1.0.1 -lcrypto' \
|
|
|
|
-Dlinux_path_opus_include="%{_includedir}/opus" \
|
|
|
|
--depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake
|
|
|
|
|
|
|
|
cd %{_builddir}/%{name}-%{version}/tdesktop-%{version}/out/Release
|
|
|
|
cmake .
|
|
|
|
|
|
|
|
make
|
2024-01-05 18:22:22 +01:00
|
|
|
chrpath --delete Telegram
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
cd tdesktop-%{version}
|
2024-01-05 18:22:22 +01:00
|
|
|
install -D -m755 out/Release/Telegram %{buildroot}%{_bindir}/telegram-desktop
|
2024-01-05 18:22:22 +01:00
|
|
|
install -D -m644 %{SOURCE1} %{buildroot}%{_datadir}/applications/telegram-desktop.desktop
|
|
|
|
install -D -m644 %{SOURCE2} %{buildroot}%{_kde4_servicesdir}/tg.protocol
|
|
|
|
|
|
|
|
for icon_size in 16 32 48 64 128 256 512; do
|
|
|
|
icon_dir="%{buildroot}%{_datadir}/icons/hicolor/${icon_size}x${icon_size}/apps"
|
2024-01-05 18:22:22 +01:00
|
|
|
install -D -m644 Telegram/Resources/art/icon${icon_size}.png $icon_dir/telegram-desktop.png
|
2024-01-05 18:22:22 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_kde4_servicesdir}/tg.protocol
|
|
|
|
%{_bindir}/telegram-desktop
|
|
|
|
%{_datadir}/applications/telegram-desktop.desktop
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/telegram-desktop.png
|
|
|
|
%doc tdesktop-%{version}/LICENSE
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 18:22:22 +01:00
|
|
|
* Fri Oct 27 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.23-1mamba
|
|
|
|
- update to 1.1.23
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
* Tue Sep 13 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.10.6-1mamba
|
|
|
|
- update to 0.10.6
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
* Tue Mar 29 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.33-3mamba
|
|
|
|
- rebuilt (for latest ffmpeg deps on x86_64)
|
|
|
|
|
2024-01-05 18:22:22 +01:00
|
|
|
* Wed Mar 16 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.33-2mamba
|
|
|
|
- fix build tree organization
|
|
|
|
|
|
|
|
* Wed Mar 16 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.33-1mamba
|
|
|
|
- update to 0.9.33
|
|
|
|
|
|
|
|
* Tue Mar 15 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.32-1mamba
|
|
|
|
- package created using the webbuild interface
|