telegram/telegram.spec

189 lines
5.7 KiB
RPMSpec
Raw Permalink Normal View History

Name: telegram
Version: 4.0.2
Release: 1mamba
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/
Source: https://github.com/telegramdesktop/tdesktop/releases/download/v%{version}/tdesktop-%{version}-full.tar.gz
Source1: telegramdesktop.desktop
Source2: tg.protocol
Patch0: telegram-1.5.15-tdesktop.patch
Patch1: telegram-1.5.15-no-gtk2.patch
Patch2: telegram-1.5.15-libtgvoip.patch
Patch3: telegram-2.7.4-fix-webview-includes.patch
Patch4: telegram-2.7.4-add_missing_include_optional.patch
Patch5: telegram-4.0.2-fix-tgcalls-cstdint.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libXcomposite-devel
BuildRequires: libXdamage-devel
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
BuildRequires: libXrandr-devel
BuildRequires: libXtst-devel
BuildRequires: libabseil-cpp-devel
BuildRequires: libavcodec-ffmpeg-devel
BuildRequires: libavformat-ffmpeg-devel
BuildRequires: libavutil-ffmpeg-devel
BuildRequires: libgcc
BuildRequires: libglib-devel
BuildRequires: libglibmm24-devel
BuildRequires: libhunspell-devel
BuildRequires: libjemalloc-devel
BuildRequires: libjpeg-devel
BuildRequires: liblz4-devel
BuildRequires: libminizip1-devel
BuildRequires: libopenal-devel
BuildRequires: libopenssl-devel
BuildRequires: libopus-devel
BuildRequires: libpipewire-devel
BuildRequires: librnnoise-devel
BuildRequires: libsigc++2-devel
BuildRequires: libstdc++6-devel
BuildRequires: libswresample-ffmpeg-devel
BuildRequires: libswscale-ffmpeg-devel
BuildRequires: libvpx-devel
BuildRequires: libwayland-devel
BuildRequires: libxcb-devel
BuildRequires: libxcb-keysyms-devel
BuildRequires: libxxhash-devel
BuildRequires: libz-devel
BuildRequires: qt6-qt5compat-devel
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qtwayland-devel
## AUTOBUILDREQ-END
#BuildRequires: libbreakpad-devel
BuildRequires: range-v3-devel
BuildRequires: range-v3-devel >= 0.11.0
BuildRequires: libtg_owt-devel >= 0.1.20220508git.10d5f4b
BuildRequires: libmicrosoft-gsl-devel
BuildRequires: tl-expected-devel
BuildRequires: librnnoise-devel
Requires: kconfig
Requires: qt6-qtimageformats
%description
The official desktop client for the Telegram messenger.
%ifnarch aarch64 %{ix86}
%debug_package
%endif
%prep
%setup -q -n tdesktop-%{version}-full
#-D -T
#:<< _EOF
#%patch4 -p1
#cd Telegram/lib_webview
#%patch3 -p1
#rm -rf Telegram/ThirdParty/libtgvoip/webrtc_dsp/absl
cd Telegram/ThirdParty/tgcalls
%patch5 -p1
cd ../../..
%build
#:<< __EOF
#export PKG_CONFIG_PATH='%{_libdir}/ffmpeg4/pkgconfig'
%cmake -d build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DTDESKTOP_API_ID=17349 \
-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb \
-DTDESKTOP_LAUNCHER_BASENAME="telegramdesktop" \
-DDESKTOP_APP_SPECIAL_TARGET="" \
%ifarch aarch64 %{ix86}
-DCMAKE_CXX_FLAGS="%{optflags} -Os -s -Wl,--gc-sections -Wl,--no-keep-memory -fPIC"
%endif
ninja -j2
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
DESTDIR=%{buildroot} ninja -C build install
install -D -m644 %{SOURCE2} %{buildroot}%{_kde5_servicesdir}/tg.protocol
# FIXME:
rm -rf %{buildroot}%{_builddir}/tdesktop*
%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/telegramdesktop.desktop
%{_datadir}/metainfo/telegramdesktop.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/telegram.png
%doc LICENSE LEGAL
%changelog
* Sun Jul 24 2022 Automatic Build System <autodist@mambasoft.it> 4.0.2-1mamba
- automatic version update by autodist
* Sat Jun 04 2022 Automatic Build System <autodist@mambasoft.it> 3.7.3-1mamba
- automatic version update by autodist
* Fri Jan 21 2022 Automatic Build System <autodist@mambasoft.it> 3.4.8-1mamba
- automatic version update by autodist
* Tue Jan 04 2022 Automatic Build System <autodist@mambasoft.it> 3.4.3-1mamba
- automatic version update by autodist
* Sun Jan 02 2022 Automatic Build System <autodist@mambasoft.it> 3.4.2-1mamba
- automatic version update by autodist
* Sat Feb 27 2021 Automatic Build System <autodist@mambasoft.it> 2.6.1-1mamba
- automatic version update by autodist
* Thu Jan 28 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.7-1mamba
- update to 2.5.7
* Wed Dec 23 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.1-1mamba
- update to 2.5.1
* Mon Mar 18 2019 Automatic Build System <autodist@mambasoft.it> 1.5.15-1mamba
- automatic version update by autodist
* Fri Oct 27 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.23-1mamba
- update to 1.1.23
* Tue Sep 13 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.10.6-1mamba
- update to 0.10.6
* Tue Mar 29 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.33-3mamba
- rebuilt (for latest ffmpeg deps on x86_64)
* 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
%{_kde5_servicesdir}/tg.protocol