Thanks @ilya-fedin for the suggestions!
I've implemented those in the package I've just pushed :)
Git Clone URL: | https://aur.archlinux.org/telegram-desktop-bin.git (read-only, click to copy) |
---|---|
Package Base: | telegram-desktop-bin |
Description: | Official desktop version of Telegram messaging app - Static binaries |
Upstream URL: | https://desktop.telegram.org |
Licenses: | |
Conflicts: | |
Provides: | |
Replaces: | |
Submitter: | ItachiSan |
Maintainer: | ItachiSan (silentnoodle) |
Last Packager: | silentnoodle |
Votes: | 667 |
Popularity: | 3.32 |
First Submitted: | 2015-07-08 10:21 |
Last Updated: | 2021-02-25 14:38 |
Thanks @ilya-fedin for the suggestions!
I've implemented those in the package I've just pushed :)
this pre-built binary has no Wayland support. So, for working tray-icon, change the launcher using env GDK_BACKEND=x11 telegram as executable (thanks @nebulon for the suggestion). My suggestion is to copy the launcher inside the package in .local/share/applications and tweak your user copy. If you really want Wayland support, you can use the official package telegram-desktop.
This is not right since January
the executable creates a custom, usually malformed, launcher, which is located at $HOME/.local/share/applications/telegramdesktop.desktop, so, you can either remove it or make it unreadable (kind of) with chattr +a $HOME/.local/share/applications/telegramdesktop.desktop. I personally suggest the second one. (thanks to @DragonX256, @lybin and @evilgnome for pointing this out)
This could be fixed by adding these lines to package():
mkdir -p "$pkgdir/etc/tdesktop"
echo "/usr/bin/telegram-desktop" > "$pkgdir/etc/tdesktop/externalupdater"
thought iI would share the PKGBUILD that I now use, major benefit is that you get the new versions before they are uploaded to github, which sometimes takes them a few days for some reason. This is possible because I'm using updates.telegram.org as the source.
# Maintainer: Giovanni 'ItachiSan' Santini <giovannisantini93 at yahoo dot it>
# Contributor: agnotek <agnostic.sn at gmail dot com>
# Contributor: Ben 'silentnoodle' Lönnqvist <lonnqvistben at gmail dot com>
pkgname=telegram-desktop-bin
pkgver=2.3.2
pkgrel=1
pkgdesc="Official desktop version of Telegram messaging app - Static binaries"
arch=('x86_64' 'i686')
url="https://desktop.telegram.org"
license=('GPL3')
depends=(
desktop-file-utils
glib2
hicolor-icon-theme
libdbus
libx11
)
makedepends=(
chrpath
)
optdepends=(
'libappindicator-gtk2: to hide Telegram in the tray bar in GTK2-based desktop environment'
'libappindicator-gtk3: to hide Telegram in the tray bar in GTK3-based desktop environment'
'xdg-utils: for automatic opening of URLs, files and directories in proper applications'
)
conflicts=('telegram-desktop')
provides=('telegram-desktop')
replaces=('telegram-bin')
# Sources
source=(
"$pkgname.desktop"
tg.protocol
https://github.com/telegramdesktop/tdesktop/raw/master/Telegram/Resources/art/icon{16,32,48,64,128,256,512}.png
)
source_x86_64=(
"https://updates.tdesktop.com/tlinux/tsetup.${pkgver}.tar.xz"
)
source_i686=(
"https://updates.tdesktop.com/tlinux32/tsetup32.${pkgver}.tar.xz"
)
# Checksums
sha256sums=('32d1597d67a7ef519367e499fcc978da4cce104e370b3787853446d93b1533d6'
'd4cdad0d091c7e47811d8a26d55bbee492e7845e968c522e86f120815477e9eb'
'fc052d1e28b68761bfb6c30ff012e54a4bba0311fc3fc470c728d028c33e9d9f'
'8ae874ada23687c95cbcfe7cfa4cbe1c37f097d9c96e5a836c20109d976a86c7'
'57d9c71074a619dbe6c361e49f4bee60b1b8c574d8b223d75e61b3744b660ed1'
'10507a1ddc379b00230c6f6e2bd9f94ea0c7caff9cae05335a66b4d10b7571eb'
'83e3e8eeecadcb3429704626d4ac80ef61ef4e06ba2c6ca2b105a4a436f33032'
'871f2a6d3bd9d657f8379196e51fd3117c1586e0042e9e993ae138f78b2bcd76'
'a9eb77ca5a428b32f6e01f62b859cce788c4c9a170dc2cd080800a9de59faa3d')
sha256sums_x86_64=('2809b226c672e88e8b5a8a4927a3b7fa46189976eaa99ebf21b6899ff14edc28')
sha256sums_i686=('d583769435dbfc59de486943a7e1bc6cd34d017543e187fad452df79d88a4ad9')
# Some installation information
install="$pkgname.install"
package() {
cd "$srcdir/"
# Creating needed directories
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/usr/share/pixmaps/"
install -dm755 "$pkgdir/usr/share/applications/"
# Program
install -Dm755 "$srcdir/Telegram/Telegram" "$pkgdir/usr/bin/telegram-desktop"
# Remove RPATH informations
chrpath --delete "$pkgdir/usr/bin/telegram-desktop"
# Desktop launcher
install -Dm644 "$srcdir/icon256.png" "$pkgdir/usr/share/pixmaps/telegram.png"
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/telegramdesktop.desktop"
# KDE5 & KDE4 protocol file
install -d "$pkgdir/usr/share/kservices5"
install -d "$pkgdir/usr/share/kde4/services"
install -m644 "$srcdir/tg.protocol" "$pkgdir/usr/share/kservices5/tg.protocol"
ln -s "/usr/share/kservices5/tg.protocol" "$pkgdir/usr/share/kde4/services"
# Icons
local icon_size icon_dir
for icon_size in 16 32 48 64 128 256 512; do
icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
install -d "$icon_dir"
install -m644 "$srcdir/icon${icon_size}.png" "$icon_dir/telegram.png"
done
}
Updated PKGBUILD for v2.3.0 (removed 32-bit support temporarily as there is no binary)
# Maintainer: Giovanni 'ItachiSan' Santini <giovannisantini93@yahoo.it>
# Previous maintainer: agnotek <agnostic.sn [at]gmail.com>
# Contributor: agnotek <agnostic.sn [at]gmail.com>
pkgname=telegram-desktop-bin
pkgver=2.3.0
pkgrel=1
pkgdesc="Official desktop version of Telegram messaging app - Static binaries"
arch=('x86_64')
url="https://desktop.telegram.org"
license=('GPL3')
depends=(
desktop-file-utils
glib2
hicolor-icon-theme
libdbus
libx11
)
makedepends=(
chrpath
)
optdepends=(
'libappindicator-gtk2: to hide Telegram in the tray bar in GTK2-based desktop environment'
'libappindicator-gtk3: to hide Telegram in the tray bar in GTK3-based desktop environment'
'xdg-utils: for automatic opening of URLs, files and directories in proper applications'
)
conflicts=('telegram-desktop')
provides=('telegram-desktop')
replaces=('telegram-bin')
# Sources
source=(
"$pkgname.desktop"
tg.protocol
https://github.com/telegramdesktop/tdesktop/raw/master/Telegram/Resources/art/icon{16,32,48,64,128,256,512}.png
)
#source_i686=("https://github.com/telegramdesktop/tdesktop/releases/download/v${pkgver}/tsetup32.${pkgver}.tar.xz")
source_x86_64=("https://github.com/telegramdesktop/tdesktop/releases/download/v${pkgver}/tsetup.${pkgver}.tar.xz")
# Checksums
sha256sums=('32d1597d67a7ef519367e499fcc978da4cce104e370b3787853446d93b1533d6'
'd4cdad0d091c7e47811d8a26d55bbee492e7845e968c522e86f120815477e9eb'
'fc052d1e28b68761bfb6c30ff012e54a4bba0311fc3fc470c728d028c33e9d9f'
'8ae874ada23687c95cbcfe7cfa4cbe1c37f097d9c96e5a836c20109d976a86c7'
'57d9c71074a619dbe6c361e49f4bee60b1b8c574d8b223d75e61b3744b660ed1'
'10507a1ddc379b00230c6f6e2bd9f94ea0c7caff9cae05335a66b4d10b7571eb'
'83e3e8eeecadcb3429704626d4ac80ef61ef4e06ba2c6ca2b105a4a436f33032'
'871f2a6d3bd9d657f8379196e51fd3117c1586e0042e9e993ae138f78b2bcd76'
'a9eb77ca5a428b32f6e01f62b859cce788c4c9a170dc2cd080800a9de59faa3d')
sha256sums_x86_64=('9174304d8910b161c50c11f7395b948ed4ed1550ddaceb6430aef6df82e920bb')
# Some installation information
install="$pkgname.install"
package() {
cd "$srcdir/"
# Creating needed directories
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/usr/share/pixmaps/"
install -dm755 "$pkgdir/usr/share/applications/"
# Program
install -Dm755 "$srcdir/Telegram/Telegram" "$pkgdir/usr/bin/telegram-desktop"
# Remove RPATH informations
chrpath --delete "$pkgdir/usr/bin/telegram-desktop"
# Desktop launcher
install -Dm644 "$srcdir/icon256.png" "$pkgdir/usr/share/pixmaps/telegram.png"
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/telegramdesktop.desktop"
# KDE5 & KDE4 protocol file
install -d "$pkgdir/usr/share/kservices5"
install -d "$pkgdir/usr/share/kde4/services"
install -m644 "$srcdir/tg.protocol" "$pkgdir/usr/share/kservices5/tg.protocol"
ln -s "/usr/share/kservices5/tg.protocol" "$pkgdir/usr/share/kde4/services"
# Icons
local icon_size icon_dir
for icon_size in 16 32 48 64 128 256 512; do
icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
install -d "$icon_dir"
install -m644 "$srcdir/icon${icon_size}.png" "$icon_dir/telegram.png"
done
}
@Cbhihe no worries! This package uses official pre-built binaries and repackage them in Arch-ready packages, while the official package telegram-desktop
and/or telegram-desktop-dev
rebuilt everything from scratch.
Long story short, the source-based packages have smaller size of executables and more up-to-date libraries, but may have some issues, as the Telegram Desktop developers use older libraries.
Hello, maybe a lame question, but what is the difference between this AUR package and community/telegram-desktop 2.1.7-2
?
@everyone there is no Linux binary official build available for 2.1.6, so I removed the out-of-date flag. :)
You can check it here: https://github.com/telegramdesktop/tdesktop/releases/tag/v2.1.6
Stable version in Arch repository is 1.9.8 and here's beta 1.9.5 yet.. switched back to official repo
@ItachiSan If you want, I can be a contribuitor. I know how to update the hashes (did it manually on my desktop so the update telegram button goes away) even though I don't have too much knowledge in PKGBUILD files and in AUR itself (don't know how to write changes here).
@ItachiSan thank you for explanation. So it seems I haven't spotted those differences. So the only downside is that "update telegram" won't work if you use telegram-desktop-bin
Pinned Comments
ItachiSan commented on 2017-02-04 12:58
NOTICE: if one of your comment fall back in one of this entries, I will act without replying here in comment. If you have issues for that, write a comment down here and I might reply you. If the answer to a problem is here, though, don't expect any soon, as I believe you will read this first.
So, a few considerations to sum up most important stuff (FAQ-alike):
sorry to put this on top, but many users flag this package as outdated due to icons checksums. The checksums I do provide are the one of the pictures I downloaded and checked; if icon checksums fail, delete icon files and re-run
makepkg
.This package tracks the stable releases; for the development version, check telegram-desktop-bin-dev. Every time this package will be marked as outdated because of a development release, it will just be unflagged.
The package is updated whenever the built binary is online AND I have time. So, reporting the outdated package HIGHLY helps me (it reminds me to do it), comments asking for updates ASAP... not really.
Feel free to report packaging bugs here in the comments or at my PKGBUILD repository: https://github.com/ItachiSan/linux_packaging/issues If your issue is application-related, please report it upstream: https://github.com/telegramdesktop/tdesktop/issues
I will add useful stuff to this comment when I notice it, with also proper credits.