forked from pool/telegram-desktop
Accepting request 411827 from home:badshah400:branches:server:messaging
- Add %post scriptlets to update icon theme cache and desktop database (BuildRequires: hicolor-icon-theme, Requires(post): desktop-file-utils). - Use full URL for source. - Run through spec-cleaner to clean up spec file according to openSUSE guidelines. OBS-URL: https://build.opensuse.org/request/show/411827 OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=4
This commit is contained in:
parent
cb531c1d17
commit
9b7d63374a
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 18 11:54:48 UTC 2016 - badshah400@gmail.com
|
||||
|
||||
- Add %post scriptlets to update icon theme cache and desktop
|
||||
database (BuildRequires: hicolor-icon-theme, Requires(post):
|
||||
desktop-file-utils).
|
||||
- Use full URL for source.
|
||||
- Run through spec-cleaner to clean up spec file according to
|
||||
openSUSE guidelines.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 4 19:36:46 UTC 2016 - i@xuzhao.net
|
||||
|
||||
|
@ -1,68 +1,88 @@
|
||||
Name: telegram-desktop
|
||||
Summary: A new era of messaging
|
||||
Version: 0.9.56
|
||||
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
|
||||
#
|
||||
# spec file for package telegram-desktop
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
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
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: telegram-desktop
|
||||
Version: 0.9.56
|
||||
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-refs-heads-master.tar.gz
|
||||
Source2: linux-syscall-support-refs-heads-master.tar.gz
|
||||
Source3: unity.h
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gcc5-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libappindicator-devel
|
||||
BuildRequires: libavdevice-devel
|
||||
BuildRequires: libavfilter-devel
|
||||
BuildRequires: libmng-devel
|
||||
BuildRequires: libopus-devel
|
||||
BuildRequires: libpng16-devel
|
||||
BuildRequires: libtelegram-qt5-devel-static
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libwebp-devel
|
||||
BuildRequires: mtdev-devel
|
||||
BuildRequires: openal-soft-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: tslib-devel
|
||||
BuildRequires: xcb-util-devel
|
||||
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: pkgconfig(dee-1.0)
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gtk+-2.0)
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(libcrypto)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libva)
|
||||
BuildRequires: pkgconfig(libva-glx)
|
||||
BuildRequires: pkgconfig(libva-x11)
|
||||
BuildRequires: pkgconfig(libwebp)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
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
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
%description
|
||||
Telegram Desktop app. A new era of messaging.
|
||||
|
||||
%prep
|
||||
%setup -n tdesktop-%{version}
|
||||
%setup -q -n tdesktop-%{version}
|
||||
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,LIBS += %{_prefix}/local/lib/libxkbcommon.a,,g' "./Telegram/Telegram.pro"
|
||||
sed -i 's,LIBS += %{_prefix}/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,<unity/unity/unity\.h>,"unity.h",g' "./Telegram/SourceFiles/platform/linux/linux_libs.h"
|
||||
sed -i 's/c++11/c++14/g' "./Telegram/Telegram.pro"
|
||||
@ -72,15 +92,15 @@ sed -i 's/c++11/c++14/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 'INCLUDEPATH += "%{_libdir}/glib-2.0/include"'
|
||||
echo 'INCLUDEPATH += "%{_libdir}/gtk-2.0/include"'
|
||||
echo 'INCLUDEPATH += "%{_includedir}/ffmpeg"'
|
||||
echo 'INCLUDEPATH += "%{_includedir}/libdbusmenu-glib-0.4"'
|
||||
echo 'INCLUDEPATH += "%{_includedir}/opus"'
|
||||
echo 'LIBS += -lcrypto -lssl -lqwebp -lwebp'
|
||||
) >> "./Telegram/Telegram.pro"
|
||||
|
||||
%setup -T -c -n breakpad -b 1
|
||||
%setup -T -c -n breakpad -b 1
|
||||
%setup -T -c -n breakpad-lss -b 2
|
||||
|
||||
%build
|
||||
@ -93,7 +113,7 @@ mkdir -p %{_builddir}/Libraries
|
||||
|
||||
# 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
|
||||
@ -103,7 +123,7 @@ ln -s %{_builddir}/breakpad-lss ./src/third_party/lss
|
||||
./configure
|
||||
make
|
||||
|
||||
export PATH="/usr/lib64/libtelegram-qt5/bin/:$PATH"
|
||||
export PATH="%{_libdir}/libtelegram-qt5/bin/:$PATH"
|
||||
|
||||
# Build codegen_style
|
||||
mkdir -p "%{_builddir}/tdesktop/Linux/obj/codegen_style/Release"
|
||||
@ -147,38 +167,45 @@ make
|
||||
|
||||
%install
|
||||
# Install binary
|
||||
install -dm755 %{buildroot}/usr/bin
|
||||
install -dm755 %{buildroot}%{_prefix}/bin
|
||||
install -m755 %{_builddir}/tdesktop/Linux/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-desktop.png"
|
||||
done
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
%post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
|
||||
%postun
|
||||
%desktop_database_postun
|
||||
%icon_theme_cache_postun
|
||||
|
||||
%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
|
||||
%{_bindir}/telegram-desktop
|
||||
%{_datadir}/applications/telegramdesktop.desktop
|
||||
%dir %{_datadir}/kde4
|
||||
%dir %{_datadir}/kde4/services
|
||||
%{_datadir}/kde4/services/tg.protocol
|
||||
%{_datadir}/icons/hicolor/*/apps/telegram-desktop.png
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user