Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop-bin/
Date: Fri, 26 Oct 2018 13:06:54
Message-Id: 1540559044.e8d2d24e879b8e34c719edeb333872338985d205.mgorny@gentoo
1 commit: e8d2d24e879b8e34c719edeb333872338985d205
2 Author: Henning Schild <henning <AT> hennsch <DOT> de>
3 AuthorDate: Wed Oct 24 10:49:14 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 26 13:04:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8d2d24e
7
8 net-im/telegram-desktop-bin: fix Icon in .desktop file
9
10 Closes: https://bugs.gentoo.org/667784
11 Signed-off-by: Henning Schild <henning <AT> hennsch.de>
12 Closes: https://github.com/gentoo/gentoo/pull/10212
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 .../telegram-desktop-bin-1.4.3-r1.ebuild | 80 ++++++++++++++++++++++
16 1 file changed, 80 insertions(+)
17
18 diff --git a/net-im/telegram-desktop-bin/telegram-desktop-bin-1.4.3-r1.ebuild b/net-im/telegram-desktop-bin/telegram-desktop-bin-1.4.3-r1.ebuild
19 new file mode 100644
20 index 00000000000..a035e7e7871
21 --- /dev/null
22 +++ b/net-im/telegram-desktop-bin/telegram-desktop-bin-1.4.3-r1.ebuild
23 @@ -0,0 +1,80 @@
24 +# Copyright 1999-2018 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +
29 +inherit desktop gnome2-utils xdg
30 +
31 +DESCRIPTION="Official desktop client for Telegram (binary package)"
32 +HOMEPAGE="https://desktop.telegram.org"
33 +SRC_URI="
34 + https://github.com/telegramdesktop/tdesktop/archive/v${PV}.tar.gz -> tdesktop-${PV}.tar.gz
35 + amd64? ( https://updates.tdesktop.com/tlinux/tsetup.${PV}.tar.xz )
36 + x86? ( https://updates.tdesktop.com/tlinux32/tsetup32.${PV}.tar.xz )
37 +"
38 +
39 +LICENSE="telegram"
40 +SLOT="0"
41 +KEYWORDS="-* ~amd64 ~x86"
42 +
43 +QA_PREBUILT="usr/lib/${PN}/Telegram"
44 +
45 +RDEPEND="
46 + dev-libs/glib:2
47 + dev-libs/gobject-introspection
48 + >=sys-apps/dbus-1.4.20
49 + x11-libs/libX11
50 + >=x11-libs/libxcb-1.10[xkb]
51 + >=media-libs/fontconfig-2.13
52 +"
53 +
54 +S="${WORKDIR}/Telegram"
55 +
56 +src_prepare() {
57 + sed -i -e 's/^Icon=telegram$/Icon=telegram-desktop/' "${WORKDIR}/tdesktop-${PV}"/lib/xdg/telegramdesktop.desktop || die
58 + eapply_user
59 +}
60 +
61 +src_install() {
62 + exeinto /usr/lib/${PN}
63 + doexe "Telegram"
64 + newbin "${FILESDIR}"/${PN}-r2 "telegram-desktop"
65 +
66 + local icon_size
67 + for icon_size in 16 32 48 64 128 256 512; do
68 + newicon -s "${icon_size}" \
69 + "${WORKDIR}/tdesktop-${PV}/Telegram/Resources/art/icon${icon_size}.png" \
70 + telegram-desktop.png
71 + done
72 +
73 + dodir /etc/${PN}
74 + insinto /etc/${PN}/
75 + doins "${FILESDIR}"/fonts.conf
76 +
77 + domenu "${WORKDIR}/tdesktop-${PV}"/lib/xdg/telegramdesktop.desktop
78 +}
79 +
80 +pkg_preinst() {
81 + xdg_pkg_preinst
82 +}
83 +
84 +pkg_postinst() {
85 + xdg_pkg_postinst
86 + gnome2_icon_cache_update
87 + einfo
88 + einfo "Previous versions of ${PN} have created "
89 + einfo "\"~/.local/share/applications/telegram.desktop\". These files"
90 + einfo "conflict with the one shipped by portage and should be removed"
91 + einfo "from all homedirs. (https://bugs.gentoo.org/618662)"
92 + einfo
93 + einfo "This versions fixes fontconfig issues that have been reported"
94 + einfo "by several users. However, the fix might have side-effects on"
95 + einfo "non-latin fonts. If you have font issues with this version just"
96 + einfo "delete \"/etc/${PN}/fonts.conf\" and leave a comment here"
97 + einfo "https://bugs.gentoo.org/664872"
98 +}
99 +
100 +pkg_postrm() {
101 + xdg_pkg_postrm
102 + gnome2_icon_cache_update
103 +}