mirror of
https://github.com/Cheviiot/Nivora.git
synced 2026-08-03 15:51:12 +00:00
The /usr/bin wrapper only stops the shadow .desktop/.service self-install when Telegram is actually launched through it. A stale GNOME Shell app-grid entry (or anything else invoking /opt/telegram-desktop/Telegram directly) still bypasses it and lets InstallLauncher() recreate the shadow files, which was still reproducing after the previous fix. Ship a systemd environment.d drop-in setting DESKTOPINTEGRATION=1 for the whole graphical session, so the guard applies regardless of which launcher or cached desktop entry starts the binary. Requires a full logout/login (or reboot) to take effect, same as the desktop-shell cache refresh this bug already needs on Wayland.
103 lines
5.2 KiB
Plaintext
103 lines
5.2 KiB
Plaintext
name='telegram-desktop'
|
|
version='7.0.5'
|
|
release=5
|
|
summary='Official Telegram messaging client'
|
|
summary_ru='Официальный клиент мессенджера Telegram'
|
|
group='Networking/Instant messaging'
|
|
desc='Telegram Desktop is the official Telegram messaging client with cloud-synced chats, voice and video calls, and no limits on file size or media history.'
|
|
desc_ru='Telegram Desktop — официальный клиент мессенджера Telegram с облачной синхронизацией чатов, голосовыми и видеозвонками и без ограничений на размер файлов и историю медиа.'
|
|
homepage='https://desktop.telegram.org/'
|
|
maintainer='Telegram Messenger LLP <https://github.com/telegramdesktop/tdesktop>'
|
|
|
|
architectures=('amd64')
|
|
|
|
license=('GPL-3.0-only')
|
|
|
|
provides=()
|
|
replaces=('telegram-desktop')
|
|
conflicts=()
|
|
|
|
auto_reqprov_method="dirty"
|
|
auto_req=0
|
|
auto_prov=0
|
|
|
|
deps=()
|
|
deps_debian=('libc6' 'libglib2.0-0t64 | libglib2.0-0' 'libfontconfig1' 'libfreetype6' 'libharfbuzz0b' 'libpng16-16' 'libpcre2-8-0' 'libbrotli1' 'libbz2-1.0' 'libblkid1' 'libmount1' 'libselinux1' 'libffi8' 'libexpat1' 'libgraphite2-3' 'zlib1g' 'libx11-6' 'hicolor-icon-theme')
|
|
deps_ubuntu=("${deps_debian[@]}")
|
|
deps_fedora=('glibc' 'glib2' 'fontconfig' 'freetype' 'harfbuzz' 'libpng' 'pcre2' 'brotli' 'bzip2-libs' 'libblkid' 'libmount' 'libselinux' 'libffi' 'expat' 'graphite2' 'zlib' 'libX11' 'hicolor-icon-theme')
|
|
deps_arch=('glibc' 'glib2' 'fontconfig' 'freetype2' 'harfbuzz' 'libpng' 'pcre2' 'brotli' 'bzip2' 'util-linux-libs' 'libselinux' 'libffi' 'expat' 'graphite' 'zlib' 'libx11' 'hicolor-icon-theme')
|
|
deps_opensuse=('glibc' 'libglib-2_0-0' 'libfontconfig1' 'libfreetype6' 'libharfbuzz0' 'libpng16-16' 'libpcre2-8-0' 'libbrotli1' 'libbz2-1' 'libblkid1' 'libmount1' 'libselinux1' 'libffi8' 'libexpat1' 'libgraphite2-3' 'libz1' 'libX11-6' 'hicolor-icon-theme')
|
|
deps_altlinux=('glibc' 'glib2' 'libfontconfig1' 'libfreetype' 'libharfbuzz' 'libpng16' 'libpcre2' 'libbrotlicommon' 'libbrotlidec' 'bzlib' 'libblkid' 'libmount' 'libselinux' 'libffi8' 'libexpat' 'libgraphite2' 'zlib' 'libX11' 'icon-theme-hicolor')
|
|
|
|
opt_deps=()
|
|
opt_deps_debian=('xdg-utils' 'libayatana-appindicator3-1 | libappindicator3-1' 'ca-certificates' 'libasound2t64 | libasound2 | pulseaudio' 'libgl1' 'xdg-desktop-portal' 'xdg-desktop-portal-gtk | xdg-desktop-portal-gnome | xdg-desktop-portal-kde' 'pipewire')
|
|
opt_deps_ubuntu=("${opt_deps_debian[@]}")
|
|
opt_deps_fedora=('xdg-utils' 'libappindicator-gtk3' 'ca-certificates' 'alsa-lib' 'pulseaudio-libs' 'mesa-libGL' 'xdg-desktop-portal' 'xdg-desktop-portal-gtk' 'pipewire')
|
|
opt_deps_arch=('xdg-utils' 'libappindicator-gtk3' 'ca-certificates' 'alsa-lib' 'pulseaudio' 'libglvnd' 'xdg-desktop-portal' 'xdg-desktop-portal-gtk' 'pipewire')
|
|
opt_deps_opensuse=('xdg-utils' 'libappindicator3-1' 'ca-certificates' 'libasound2' 'libpulse0' 'Mesa-libGL1' 'xdg-desktop-portal' 'xdg-desktop-portal-gtk' 'pipewire')
|
|
opt_deps_altlinux=('xdg-utils' 'libappindicator-gtk3' 'ca-certificates' 'libalsa' 'libGL' 'xdg-desktop-portal' 'xdg-desktop-portal-gtk' 'pipewire')
|
|
|
|
sources=(
|
|
"https://td.telegram.org/tlinux/tsetup.${version}.tar.xz?~archive=false&~name=tsetup.tar.xz"
|
|
'local:///org.telegram.desktop.desktop'
|
|
'local:///telegram-desktop.png'
|
|
'local:///LICENSE'
|
|
)
|
|
|
|
checksums=(
|
|
'sha256:37e23ce08333340504623042120b826f7a2a5650c831187219ab9c520740eb42'
|
|
'sha256:8ceb3f6aea1003f84f1b5757cd857f8237b294bb18456e5e0e54d96e6fff04ba'
|
|
'sha256:3fb1400c7dc9bbc3b5cb3ffedcbf4a9b09c53e28b57a7ff33a8a6b9048864090'
|
|
'sha256:f3ad1b5ecdc1c9e5ab3719a0b084a3e0b4fc87ad424fbf81043df9637be3d1f5'
|
|
)
|
|
|
|
scripts=(
|
|
['postinstall']='postinstall.sh'
|
|
['postremove']='postremove.sh'
|
|
)
|
|
|
|
package() {
|
|
cd "${srcdir}"
|
|
|
|
tar --no-same-owner --no-same-permissions -xJf tsetup.tar.xz
|
|
|
|
install -dm755 "${pkgdir}/opt/telegram-desktop"
|
|
install -Dm755 "Telegram/Telegram" "${pkgdir}/opt/telegram-desktop/Telegram"
|
|
|
|
install -Dm755 /dev/stdin "${pkgdir}/usr/bin/telegram-desktop" <<'EOF'
|
|
#!/bin/sh
|
|
# Telegram self-installs a shadow ~/.local/share/applications/*.desktop (and
|
|
# a D-Bus service file) on every launch unless this env var is set; see
|
|
# InstallLauncher() in Telegram/SourceFiles/platform/linux/specific_linux.cpp.
|
|
export DESKTOPINTEGRATION=1
|
|
exec /opt/telegram-desktop/Telegram "$@"
|
|
EOF
|
|
|
|
install-desktop org.telegram.desktop.desktop
|
|
install -Dm644 telegram-desktop.png \
|
|
"${pkgdir}/usr/share/icons/hicolor/256x256/apps/org.telegram.desktop.png"
|
|
|
|
# Belt-and-braces on top of the /usr/bin wrapper: the wrapper only helps
|
|
# when something actually launches via that path. A stale desktop-shell
|
|
# app cache (or any other launcher) can still exec the raw binary
|
|
# directly, so also export DESKTOPINTEGRATION for the whole graphical
|
|
# session via environment.d — this covers every launch path regardless
|
|
# of how the binary was invoked.
|
|
install -Dm644 /dev/stdin \
|
|
"${pkgdir}/etc/environment.d/50-telegram-desktop-nivora.conf" <<'EOF'
|
|
DESKTOPINTEGRATION=1
|
|
EOF
|
|
|
|
install-license LICENSE "telegram-desktop/LICENSE.nivora"
|
|
}
|
|
|
|
files() {
|
|
files-find-binary
|
|
files-find-desktop
|
|
files-find-license
|
|
files-find \
|
|
"/etc/environment.d/50-telegram-desktop-nivora.conf" \
|
|
"/opt/telegram-desktop/**/*" \
|
|
"/usr/share/icons/hicolor/256x256/apps/org.telegram.desktop.png"
|
|
}
|