forked from pool/telegram-desktop
Accepting request 396634 from home:nuklly
I want to maintain telegram-desktop in Factory and would like to use server:messaging as the devel project. OBS-URL: https://build.opensuse.org/request/show/396634 OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=1
This commit is contained in:
commit
2c1dffbf5f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
breakpad-refs-heads-master.tar.gz
Normal file
3
breakpad-refs-heads-master.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8df1d77b479b9d152d81c19ca05bf7ccd8ad76c2f55671737ada2e88441f3930
|
||||
size 5148013
|
3
linux-syscall-support-refs-heads-master.tar.gz
Normal file
3
linux-syscall-support-refs-heads-master.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0935a712c40d5458e82a69812757f7c811ad1ff7367b990f9872a9e025e37864
|
||||
size 28288
|
3
tdesktop-0.9.48.tar.gz
Normal file
3
tdesktop-0.9.48.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:17a393b57bbb0dad04143a05cad310f6254e88ab70e402781863c1af91aa2846
|
||||
size 11412620
|
172
telegram-desktop.spec
Normal file
172
telegram-desktop.spec
Normal file
@ -0,0 +1,172 @@
|
||||
Name: telegram-desktop
|
||||
Summary: A new era of messaging
|
||||
Version: 0.9.48
|
||||
Release: 1
|
||||
License: GPL-3.0
|
||||
URL: https://github.com/telegramdesktop/tdesktop
|
||||
Source: tdesktop-%{version}.tar.gz
|
||||
Source1: breakpad-refs-heads-master.tar.gz
|
||||
Source2: linux-syscall-support-refs-heads-master.tar.gz
|
||||
Source3: unity.h
|
||||
|
||||
ExclusiveArch: x86_64
|
||||
BuildRequires: libtelegram-qt5-devel-static
|
||||
BuildRequires: gcc5-c++
|
||||
BuildRequires: libappindicator-devel
|
||||
BuildRequires: libpng16-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libmng-devel
|
||||
BuildRequires: libwebp-devel
|
||||
BuildRequires: pkgconfig(libwebp)
|
||||
BuildRequires: libopus-devel
|
||||
BuildRequires: xorg-x11-devel
|
||||
BuildRequires: xz
|
||||
BuildRequires: openal-soft-devel
|
||||
BuildRequires: xcb-util-wm-devel
|
||||
BuildRequires: xcb-util-devel
|
||||
BuildRequires: xcb-util-image-devel
|
||||
BuildRequires: xcb-util-renderutil-devel
|
||||
BuildRequires: xcb-util-keysyms-devel
|
||||
BuildRequires: mtdev-devel
|
||||
BuildRequires: tslib-devel
|
||||
BuildRequires: pkgconfig(xkbcommon)
|
||||
BuildRequires: pkgconfig(xkbcommon-x11)
|
||||
BuildRequires: pkgconfig(dee-1.0)
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: libavfilter-devel
|
||||
BuildRequires: libavdevice-devel
|
||||
BuildRequires: pkgconfig(libcrypto)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(gtk+-2.0)
|
||||
BuildRequires: pkgconfig(libva)
|
||||
BuildRequires: pkgconfig(libva-glx)
|
||||
BuildRequires: pkgconfig(libva-x11)
|
||||
BuildRequires: desktop-file-utils
|
||||
|
||||
# Runtime requirements
|
||||
Requires: ffmpeg
|
||||
Requires: openssl
|
||||
Requires: hicolor-icon-theme
|
||||
Requires: icu
|
||||
Requires: jasper
|
||||
|
||||
%description
|
||||
Telegram Desktop app. A new era of messaging.
|
||||
|
||||
%prep
|
||||
%setup -n tdesktop-%{version} &>/dev/null
|
||||
cp %{_sourcedir}/unity.h ./Telegram/SourceFiles/
|
||||
sed -i 's/CUSTOM_API_ID//g' "./Telegram/Telegram.pro"
|
||||
sed -i 's,LIBS += /usr/local/lib/libxkbcommon.a,,g' "./Telegram/Telegram.pro"
|
||||
sed -i 's,LIBS += /usr/local/lib/libz.a,LIBS += -lz,g' "./Telegram/Telegram.pro"
|
||||
sed -i 's,<unity/unity/unity\.h>,"unity.h",g' "./Telegram/SourceFiles/pspecific_linux.cpp"
|
||||
sed -i "s,/usr/local/tdesktop/Qt-5.6.0,%{_builddir}/Libraries/QtStatic,g" "./Telegram/Telegram.pro"
|
||||
sed -i "s,5\.6\.0,5.5.1,g" "./Telegram/Telegram.pro"
|
||||
(
|
||||
echo "DEFINES += TDESKTOP_DISABLE_AUTOUPDATE"
|
||||
echo "DEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
|
||||
echo 'INCLUDEPATH += "/usr/lib64/glib-2.0/include"'
|
||||
echo 'INCLUDEPATH += "/usr/lib64/gtk-2.0/include"'
|
||||
echo 'INCLUDEPATH += "/usr/include/ffmpeg"'
|
||||
echo 'INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4"'
|
||||
echo 'INCLUDEPATH += "/usr/include/opus"'
|
||||
echo 'LIBS += -lcrypto -lssl -lqwebp -lwebp'
|
||||
) >> "./Telegram/Telegram.pro"
|
||||
|
||||
%setup -T -c -n breakpad -b 1
|
||||
%setup -T -c -n breakpad-lss -b 2
|
||||
|
||||
%build
|
||||
# Setup compiler variables
|
||||
export CC="gcc-5"
|
||||
export CXX="g++-5"
|
||||
export AR="gcc-ar-5"
|
||||
mv %{_builddir}/tdesktop-%{version} %{_builddir}/tdesktop
|
||||
mkdir -p %{_builddir}/Libraries
|
||||
|
||||
# Link with patched Qt Static Library
|
||||
cd %{_builddir}/Libraries
|
||||
ln -s /usr/lib64/libtelegram-qt5 ./QtStatic
|
||||
|
||||
# Build breakpad
|
||||
cd %{_builddir}/Libraries
|
||||
ln -s %{_builddir}/breakpad ./breakpad
|
||||
cd breakpad
|
||||
ln -s %{_builddir}/breakpad-lss ./src/third_party/lss
|
||||
./configure
|
||||
make
|
||||
|
||||
export PATH="/usr/lib64/libtelegram-qt5/bin/:$PATH"
|
||||
# Build codegen_style
|
||||
mkdir -p "%{_builddir}/tdesktop/Linux/obj/codegen_style/Debug"
|
||||
cd %{_builddir}/tdesktop/Linux/obj/codegen_style/Debug
|
||||
qmake QMAKE_CXX="g++-5" QMAKE_LINK="g++-5" \
|
||||
CONFIG+=debug ../../../../Telegram/build/qmake/codegen_style/codegen_style.pro
|
||||
make
|
||||
|
||||
# Build codegen_numbers
|
||||
mkdir -p "%{_builddir}/tdesktop/Linux/obj/codegen_numbers/Debug"
|
||||
cd %{_builddir}/tdesktop/Linux/obj/codegen_numbers/Debug
|
||||
qmake QMAKE_CXX="g++-5" QMAKE_LINK="g++-5" \
|
||||
CONFIG+=debug ../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro
|
||||
make
|
||||
|
||||
# Build MetaLang
|
||||
mkdir -p "%{_builddir}/tdesktop/Linux/DebugIntermediateLang"
|
||||
cd %{_builddir}/tdesktop/Linux/DebugIntermediateLang
|
||||
qmake QMAKE_CXX="g++-5" QMAKE_LINK="g++-5" \
|
||||
CONFIG+=debug "../../Telegram/MetaLang.pro"
|
||||
make
|
||||
|
||||
# Build Telegram Desktop
|
||||
mkdir -p "%{_builddir}/tdesktop/Linux/ReleaseIntermediate"
|
||||
cd %{_builddir}/tdesktop/Linux/ReleaseIntermediate
|
||||
./../codegen/Debug/codegen_style "-I./../../Telegram/Resources" "-I./../../Telegram/SourceFiles" "-o./../../Telegram/GeneratedFiles/styles" all_files.style --rebuild
|
||||
./../codegen/Debug/codegen_numbers "-o./../../Telegram/GeneratedFiles" "./../../Telegram/Resources/numbers.txt"
|
||||
./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/langs/lang.strings -lang_out ./../../Telegram/GeneratedFiles/lang_auto
|
||||
|
||||
qmake QMAKE_CXX="g++-5" QMAKE_LINK="g++-5" \
|
||||
CONFIG+=release "../../Telegram/Telegram.pro"
|
||||
make
|
||||
|
||||
%install
|
||||
# Install binary
|
||||
install -dm755 %{buildroot}/usr/bin
|
||||
install -m755 %{_builddir}/tdesktop/Linux/Release/Telegram \
|
||||
%{buildroot}/usr/bin/telegram-desktop
|
||||
|
||||
# Install desktop file
|
||||
install -d %{buildroot}/usr/share/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 -m644 %{_builddir}/tdesktop/lib/xdg/tg.protocol \
|
||||
%{buildroot}/usr/share/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"
|
||||
install -d "${icon_dir}"
|
||||
install -m644 "%{_builddir}/tdesktop/Telegram/Resources/art/icon${icon_size}.png" \
|
||||
"${icon_dir}/telegram-desktop.png"
|
||||
done
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%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-desktop.png
|
Loading…
x
Reference in New Issue
Block a user