diff --git a/libtgvoip.zip b/libtgvoip.zip new file mode 100644 index 0000000..3ab7684 --- /dev/null +++ b/libtgvoip.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4af30139708aa661daf6a9b17a3e790870b6492c156567c83cea1c780b909014 +size 562789 diff --git a/patch-1.0.29.diff b/patch-1.1.7.diff similarity index 72% rename from patch-1.0.29.diff rename to patch-1.1.7.diff index b69cbc0..bcf134c 100644 --- a/patch-1.0.29.diff +++ b/patch-1.1.7.diff @@ -1,24 +1,7 @@ -Index: tdesktop-1.0.29/Telegram/gyp/Telegram.gyp +Index: tdesktop-1.1.7/Telegram/gyp/qt.gypi =================================================================== ---- tdesktop-1.0.29.orig/Telegram/gyp/Telegram.gyp -+++ tdesktop-1.0.29/Telegram/gyp/Telegram.gyp -@@ -82,8 +82,11 @@ - ], - - 'defines': [ -- 'AL_LIBTYPE_STATIC', - ' /dev/null --cflags gtk+-2.0)', ' /dev/null --cflags glib-2.0)', ' /dev/null --cflags dee-1.0)', -+ ' /dev/null --cflags <@(pkgconfig_libs))', ++ '= 5.0 -BuildRequires: libtiff-devel -BuildRequires: libmng-devel -BuildRequires: pcre-devel -BuildRequires: ffmpeg-devel -BuildRequires: libopus-devel -BuildRequires: zlib-devel -BuildRequires: portaudio-devel -BuildRequires: desktop-file-utils -BuildRequires: chrpath -BuildRequires: cmake -BuildRequires: libopus-devel -BuildRequires: xorg-x11-devel -BuildRequires: xz -BuildRequires: unzip -BuildRequires: openal-soft-devel -BuildRequires: xcb-util-wm-devel -BuildRequires: xcb-util-image-devel -BuildRequires: xcb-util-renderutil-devel -BuildRequires: xcb-util-keysyms-devel -BuildRequires: libproxy-devel -BuildRequires: libXfixes-devel -BuildRequires: fontconfig-devel -BuildRequires: libexpat-devel -BuildRequires: freetype-devel -BuildRequires: libjpeg-devel -BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(xcb-util) -BuildRequires: pkgconfig(mtdev) -BuildRequires: pkgconfig(tslib) -BuildRequires: pkgconfig(harfbuzz) -BuildRequires: pkgconfig(libwebp) -BuildRequires: pkgconfig(xkbcommon) -BuildRequires: pkgconfig(xkbcommon-x11) -BuildRequires: pkgconfig(dee-1.0) -BuildRequires: pkgconfig(libavcodec) -BuildRequires: pkgconfig(libavformat) -BuildRequires: pkgconfig(libavutil) -BuildRequires: pkgconfig(liblzma) -BuildRequires: pkgconfig(libavfilter) -BuildRequires: pkgconfig(libavdevice) -BuildRequires: pkgconfig(libcrypto) -BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(libva) -BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(freetype2) -BuildRequires: pkgconfig(libva-glx) -BuildRequires: pkgconfig(libva-x11) +Name: telegram-desktop +Version: 1.1.7 +Release: 0 +Summary: A new era of messaging +License: GPL-3.0 +Url: https://github.com/telegramdesktop/tdesktop +Source: https://github.com/telegramdesktop/tdesktop/archive/v%{version}.tar.gz +Source1: breakpad-master.tar.gz +Source2: linux-syscall-support-refs-heads-master.tar.gz +Source3: gyp-master.tar.gz +Source4: patch-%{version}.diff +Source5: GSL-master.zip +Source6: variant-master.zip +# curl https://github.com/grishka/libtgvoip/archive/public.zip -o libtgvoip.zip +Source7: libtgvoip.zip +BuildRequires: chrpath +BuildRequires: cmake +BuildRequires: desktop-file-utils +BuildRequires: ffmpeg-devel +BuildRequires: fontconfig-devel +BuildRequires: freetype-devel +BuildRequires: gcc-c++ >= 5.0 +BuildRequires: libXfixes-devel +BuildRequires: libexpat-devel +BuildRequires: libjpeg-devel +BuildRequires: libmng-devel +BuildRequires: libopus-devel +BuildRequires: libproxy-devel +BuildRequires: libtelegram-qt5-devel-static +BuildRequires: libtiff-devel +BuildRequires: openal-soft-devel +BuildRequires: opusfile-devel +BuildRequires: pcre-devel +BuildRequires: pkgconfig +BuildRequires: portaudio-devel +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(dee-1.0) +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) # Runtime requirements -Requires: ffmpeg -Requires: openssl -Requires: hicolor-icon-theme -Requires: icu -Requires: jasper - +Requires: ffmpeg +Requires: hicolor-icon-theme +Requires: icu +Requires: jasper +Requires: openssl +ExclusiveArch: x86_64 %description Telegram Desktop app. A new era of messaging. %prep -%setup -n tdesktop-%{version} +%setup -q -n tdesktop-%{version} cp %{_sourcedir}/patch-%{version}.diff . -rm -rf %{_builddir}/tdesktop-%{version}/third_party/* +rm -rf %{_builddir}/tdesktop-%{version}/ThirdParty/* cp %{_sourcedir}/GSL-master.zip . && unzip GSL-master.zip mv GSL-master GSL -mv GSL %{_builddir}/tdesktop-%{version}/third_party/ +mv GSL %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/ cp %{_sourcedir}/variant-master.zip . && unzip variant-master.zip mv variant-master variant -mv variant %{_builddir}/tdesktop-%{version}/third_party/ +mv variant %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/ -%setup -T -c -n breakpad -b 1 -%setup -T -c -n breakpad-lss -b 2 -%setup -T -c -n gyp -b 3 +cp %{_sourcedir}/libtgvoip.zip . && unzip libtgvoip.zip +mv libtgvoip-public libtgvoip +mv libtgvoip %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/ + +%setup -q -T -c -n breakpad -b 1 +%setup -q -T -c -n breakpad-lss -b 2 +%setup -q -T -c -n gyp -b 3 %build @@ -111,20 +137,22 @@ patch -p1 < ./gyp.diff # Link with patched Qt Static Library cd %{_builddir}/Libraries -ln -s /usr/lib64/libtelegram-qt5 ./QtStatic +ln -s %{_libdir}/libtelegram-qt5 ./QtStatic # Build breakpad cd %{_builddir}/Libraries ln -s %{_builddir}/breakpad ./breakpad cd breakpad ln -s %{_builddir}/breakpad-lss ./src/third_party/lss +# FIXME: you should use the %%configure macro ./configure -make +make %{?_smp_mflags} # patch with patch.diff cd %{_builddir}/tdesktop patch -p1 < patch-%{version}.diff +# FIXME: you should use %%cmake macros # use gyp to generate cmake files cd %{_builddir}/tdesktop/Telegram/gyp # patch qt.gypi to change libxkbcommon path @@ -138,31 +166,32 @@ cd %{_builddir}/tdesktop/Telegram/gyp # build Telegram cd %{_builddir}/tdesktop/out/Release -cmake . +# FIXME: you should use %%cmake macros +cmake . make %{?_smp_mflags} chrpath --delete Telegram %install # Install binary -install -dm755 %{buildroot}/usr/bin +install -dm755 %{buildroot}%{_prefix}/bin install -m755 %{_builddir}/tdesktop/out/Release/Telegram \ - %{buildroot}/usr/bin/telegram-desktop + %{buildroot}%{_bindir}/telegram-desktop # Install desktop file -install -d %{buildroot}/usr/share/applications +install -d %{buildroot}%{_datadir}/applications desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ --add-category InstantMessaging \ %{_builddir}/tdesktop/lib/xdg/telegramdesktop.desktop # Install protocol -install -d %{buildroot}/usr/share/kde4/services +install -d %{buildroot}%{_datadir}/kde4/services install -m644 %{_builddir}/tdesktop/lib/xdg/tg.protocol \ - %{buildroot}/usr/share/kde4/services/tg.protocol + %{buildroot}%{_datadir}/kde4/services/tg.protocol # Install icons for icon_size in 16 32 48 64 128 256 512; do - icon_dir="%{buildroot}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" + icon_dir="%{buildroot}%{_datadir}/icons/hicolor/${icon_size}x${icon_size}/apps" install -d "${icon_dir}" install -m644 "%{_builddir}/tdesktop/Telegram/Resources/art/icon${icon_size}.png" \ "${icon_dir}/telegram.png" @@ -170,9 +199,11 @@ done %files %defattr (-, root, root, -) -/usr/bin/telegram-desktop -/usr/share/applications/telegramdesktop.desktop -%dir /usr/share/kde4 -%dir /usr/share/kde4/services -/usr/share/kde4/services/tg.protocol -/usr/share/icons/hicolor/*/apps/telegram.png +%{_bindir}/telegram-desktop +%{_datadir}/applications/telegramdesktop.desktop +%dir %{_datadir}/kde4 +%dir %{_datadir}/kde4/services +%{_datadir}/kde4/services/tg.protocol +%{_datadir}/icons/hicolor/*/apps/telegram.png + +%changelog diff --git a/v1.0.29.tar.gz b/v1.0.29.tar.gz deleted file mode 100644 index 221fadd..0000000 --- a/v1.0.29.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3277246e57e6605ba8d0444d1a218cac7409f3aa2d00e06b6ae6e365f1666bbb -size 16561823 diff --git a/v1.1.7.tar.gz b/v1.1.7.tar.gz new file mode 100644 index 0000000..b650714 --- /dev/null +++ b/v1.1.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:760f9ff4864e1c4cfd3a955ff493644d0e6aff5bb6d1012e12d33ede2314b622 +size 16754793