70 lines
2.1 KiB
Bash
70 lines
2.1 KiB
Bash
# Copyright 2018 Martin Sekera <sekerama@gmail.com>
|
||
# Distributed under the terms of the GNU General Public License v2
|
||
|
||
# Based on Gentoo's net-im/telegram-desktop-bin, GPL2
|
||
# Copyright 1999-2018 Gentoo Authors
|
||
|
||
SUMMARY="Telegram Desktop messaging app (binary)"
|
||
DESCRIPTION="Telegram is a messaging app with a focus on speed and security, it’s super-fast, simple and free. You can use Telegram on all your devices at the same time — your messages sync seamlessly across any number of your phones, tablets or computers."
|
||
HOMEPAGE="https://desktop.telegram.org/"
|
||
DOWNLOADS="
|
||
https://github.com/telegramdesktop/tdesktop/archive/v${PV}.tar.gz -> tdesktop-${PV}.tar.gz
|
||
platform:amd64? ( https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/tsetup.${PV}.beta.tar.xz )
|
||
platform:x86? ( https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/tsetup32.${PV}.beta.tar.xz )
|
||
"
|
||
UPSTREAM_CHANGELOG="https://telegram.org/blog [[ lang = en ]]"
|
||
UPSTREAM_DOCUMENTATION="
|
||
https://telegram.org/faq [[ lang = en description = [ FAQ ] ]]
|
||
https://core.telegram.org/techfaq [[ lang = en description = [ Technical FAQ ] ]]
|
||
https://core.telegram.org/api [[ lang = en description = [ API description ] ]]
|
||
"
|
||
|
||
LICENCES="GPL-3-with-openssl-exception"
|
||
SLOT="0"
|
||
DEPENDENCIES="
|
||
run:
|
||
dev-libs/glib:2
|
||
gnome-desktop/gobject-introspection
|
||
sys-apps/dbus
|
||
x11-libs/libX11
|
||
x11-libs/libxcb
|
||
media-libs/fontconfig
|
||
"
|
||
MYOPTIONS="
|
||
platform:
|
||
amd64
|
||
x86
|
||
"
|
||
RESTRICT="test" # no tests available
|
||
|
||
WORK="${WORKBASE}"
|
||
|
||
src_install() {
|
||
exeinto /usr/$(exhost --target)/libexec/${PN}
|
||
doexe Telegram/Telegram
|
||
|
||
newbin "${FILES}"/telegram-desktop telegram-desktop
|
||
|
||
for size in 16 32 48 64 128 256 512
|
||
do
|
||
insinto /usr/share/icons/hicolor/${size}x${size}/apps
|
||
newins "${WORK}/tdesktop-${PV}/Telegram/Resources/art/icon${size}.png" telegram.png
|
||
done
|
||
|
||
dodir /etc/${PN}
|
||
insinto /etc/${PN}
|
||
doins "${FILES}"/fonts.conf
|
||
|
||
insinto /usr/share/applications
|
||
doins "${WORK}/tdesktop-${PV}"/lib/xdg/telegramdesktop.desktop
|
||
}
|
||
|
||
pkg_postrm() {
|
||
freedesktop-desktop_pkg_postrm
|
||
gtk-icon-cache_pkg_postrm
|
||
}
|
||
|
||
pkg_postinst() {
|
||
freedesktop-desktop_pkg_postinst
|
||
gtk-icon-cache_pkg_postinst
|
||
}
|