diff --git a/telegram.spec b/telegram.spec index 91e26b8..59b3b53 100644 --- a/telegram.spec +++ b/telegram.spec @@ -3,7 +3,7 @@ %define qt_majver %(echo %qt_ver | cut -d. -f1-2) Name: telegram -Version: 1.5.15 +Version: 2.5.1 Release: 1mamba Summary: The official desktop client for the Telegram messenger Group: Graphical Desktop/Applications/Internet @@ -11,42 +11,62 @@ Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco 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 +Source: https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/tdesktop-%{version}-full.tar.gz +#Source: https://github.com/telegramdesktop/tdesktop.git/v%{version}/tdesktop-%{version}.tar.bz2 Source1: telegramdesktop.desktop Source2: tg.protocol -Source3: https://github.com/telegramdesktop/libtgvoip.git/tdesktop/libtgvoip-%{version}.tar.bz2 -Source4: https://github.com/mapbox/variant.git/master/variant-%{version}.tar.bz2 -Source5: https://github.com/philsquared/Catch.git/master/Catch-%{version}.tar.bz2 -Source6: https://github.com/Microsoft/GSL.git/master/GSL-%{version}.tar.bz2 -Source7: https://github.com/telegramdesktop/crl.git/master/crl-%{version}.tar.bz2 -Source8: https://github.com/Cyan4973/xxHash.git/master/xxHash-%{version}.tar.bz2 +#Source3: https://github.com/telegramdesktop/libtgvoip.git/tdesktop/libtgvoip-%{version}.tar.bz2 +#Source4: https://github.com/mapbox/variant.git/master/variant-%{version}.tar.bz2 +#Source5: https://github.com/philsquared/Catch.git/master/Catch-%{version}.tar.bz2 +#Source6: https://github.com/Microsoft/GSL.git/master/GSL-%{version}.tar.bz2 +#Source7: https://github.com/telegramdesktop/crl.git/master/crl-%{version}.tar.bz2 +#Source8: https://github.com/Cyan4973/xxHash.git/master/xxHash-%{version}.tar.bz2 Patch0: telegram-1.5.15-tdesktop.patch Patch1: telegram-1.5.15-no-gtk2.patch Patch2: telegram-1.5.15-libtgvoip.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel +BuildRequires: ldconfig +BuildRequires: libGL-devel BuildRequires: libX11-devel +BuildRequires: libatk-devel +BuildRequires: libatomic-devel BuildRequires: libavcodec-ffmpeg-devel BuildRequires: libavformat-ffmpeg-devel BuildRequires: libavutil-ffmpeg-devel +BuildRequires: libcairo-devel +BuildRequires: libdbusmenu-qt5-devel BuildRequires: libgcc +BuildRequires: libgdk-pixbuf-devel BuildRequires: libglib-devel +BuildRequires: libgtk-devel +BuildRequires: libharfbuzz-devel +BuildRequires: libhunspell-devel +BuildRequires: libjpeg-devel +BuildRequires: liblz4-devel BuildRequires: liblzma-devel -BuildRequires: libminizip-devel +BuildRequires: libminizip1-devel BuildRequires: libopenal-devel BuildRequires: libopenssl-devel BuildRequires: libopus-devel +BuildRequires: libpango-devel BuildRequires: libqt5-devel BuildRequires: libstdc++6-devel BuildRequires: libswresample-ffmpeg-devel BuildRequires: libswscale-ffmpeg-devel +BuildRequires: libxcb-devel +BuildRequires: libxcb-keysyms-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libxxhash-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END -BuildRequires: libbreakpad-devel -BuildRequires: libunity-devel -BuildRequires: range-v3-devel +#BuildRequires: libbreakpad-devel +#BuildRequires: libunity-devel +BuildRequires: range-v3-devel >= 0.11.0 +BuildRequires: libtg_owt-devel +BuildRequires: libmicrosoft-gsl-devel +BuildRequires: tl-expected-devel Requires: kconfig BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -56,106 +76,57 @@ The official desktop client for the Telegram messenger. %debug_package %prep -#% setup -q -c -a0 -a3 -a4 -a5 -a6 -a7 -a8 -%setup -q -c -D -T -:<< _EOF - -mv tdesktop-%{version} tdesktop -cd tdesktop/Telegram/ThirdParty -#for f in "libtgvoip" "variant" "GSL" "Catch" "crl" "xxHash"; do -# rm -rf $f -# ln -s ../../../$f-%{version} $f -#done -cd ../.. -%patch0 -p1 -%patch1 -p1 -cd Telegram/ThirdParty/libtgvoip -%patch2 -p1 - -cd ../../.. - -sed -i "s|include/qt/Qt|include/qt5/Qt|g" Telegram/gyp/qt.gypi -sed -i "s|appindicator3|appindicator|" Telegram/gyp/telegram_linux.gypi - -cd .. -git clone https://chromium.googlesource.com/external/gyp gyp - -cd gyp -git apply ../tdesktop/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 - +%setup -q -n tdesktop-%{version}-full +#-D -T %build -cd tdesktop +#:<< _EOF +%cmake -d build \ + -G Ninja \ + -DTDESKTOP_API_ID=17349 \ + -DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb \ + -DTDESKTOP_LAUNCHER_BASENAME="telegramdesktop" \ + -DDESKTOP_APP_SPECIAL_TARGET="" -export LANG=en_US.UTF-8 -export GYP_DEFINES="TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME,TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION" -export EXTRA_FLAGS="-Winvalid-pch" -export CPPFLAGS="%{optflags}" -export CXXFLAGS="%{optflags} -I%{_includedir}/qt5" - -../gyp/gyp \ - -Dapi_id=17349 \ - -Dapi_hash=344583e45741c457fe1862106095a5eb \ - -Dbuild_defines=${GYP_DEFINES} \ - -Gconfig=Release \ - --depth=Telegram/gyp \ - --generator-output=../.. \ - -Goutput_dir=out Telegram/gyp/Telegram.gyp \ - --format=cmake - -## 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 out/Release -sed -i "s|/usr/bin/moc |/usr/bin/moc-qt5 |" CMakeLists.txt -sed -i "s|/usr/lib/qt/|%{_libdir}/qt5/|g" CMakeLists.txt - -cmake . \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS="%{optflags} -I%{_includedir}/qt5 -I%{_includedir}/qt5/mkspecs/linux-g++" - -%make - -#chrpath --delete Telegram +ninja %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -cd tdesktop -install -D -m755 out/Release/Telegram %{buildroot}%{_bindir}/telegram-desktop -install -D -m644 %{SOURCE1} %{buildroot}%{_datadir}/applications/telegram-desktop.desktop -install -D -m644 %{SOURCE2} %{buildroot}%{_kde5_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" - install -D -m644 Telegram/Resources/art/icon${icon_size}.png $icon_dir/telegram-desktop.png -done +DESTDIR=%{buildroot} ninja -C build install + +install -D -m644 %{SOURCE2} %{buildroot}%{_kde5_servicesdir}/tg.protocol %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%post +touch --no-create %{_datadir}/icons/hicolor +if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor; +fi +: + +%postun +touch --no-create %{_datadir}/icons/hicolor +if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor; +fi +: + %files %defattr(-,root,root) %{_bindir}/telegram-desktop %{_kde5_servicesdir}/tg.protocol -%{_datadir}/applications/telegram-desktop.desktop -%{_datadir}/icons/hicolor/*/apps/telegram-desktop.png -%doc tdesktop/LICENSE +%{_datadir}/applications/telegramdesktop.desktop +%{_datadir}/metainfo/telegramdesktop.appdata.xml +%{_datadir}/icons/hicolor/*/apps/telegram.png +%doc LICENSE LEGAL %changelog +* Wed Dec 23 2020 Silvan Calarco 2.5.1-1mamba +- update to 2.5.1 + * Mon Mar 18 2019 Automatic Build System 1.5.15-1mamba - automatic version update by autodist