mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
38 lines
1.0 KiB
Ruby
38 lines
1.0 KiB
Ruby
require 'package'
|
|
|
|
class Telegram < Package
|
|
description "Telegram is a messaging app with a focus on speed and security, it's super-fast, simple and free."
|
|
homepage 'https://telegram.org/'
|
|
version '5.1.2'
|
|
license 'BSD, LGPL-2+ and GPL-3-with-openssl-exception'
|
|
compatibility 'x86_64'
|
|
min_glibc '2.29'
|
|
source_url 'https://updates.tdesktop.com/tlinux/tsetup.5.1.2.tar.xz'
|
|
source_sha256 'fc1126f4faebe50dd6fe5c296069c16097e6f7a917f7f39571324e158326be51'
|
|
|
|
depends_on 'mesa'
|
|
|
|
no_compile_needed
|
|
no_shrink
|
|
|
|
def self.build
|
|
File.write 'telegram', <<~EOF
|
|
#!/bin/bash
|
|
DISPLAY=
|
|
GDK_BACKEND=wayland
|
|
WAYLAND_DISPLAY=wayland-0
|
|
QT_QPA_PLATFORM=wayland-egl
|
|
Telegram "$@"
|
|
EOF
|
|
end
|
|
|
|
def self.install
|
|
FileUtils.install 'Telegram', "#{CREW_DEST_PREFIX}/bin/Telegram", mode: 0o755
|
|
FileUtils.install 'telegram', "#{CREW_DEST_PREFIX}/bin/telegram", mode: 0o755
|
|
end
|
|
|
|
def self.postinstall
|
|
ExitMessage.add "\nType 'telegram' to get started.\n".lightblue
|
|
end
|
|
end
|