aboutsummaryrefslogtreecommitdiffstats
path: root/community/telegram-desktop/APKBUILD
blob: 67c59b65e69186f9282f0061b49745e295d661f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=telegram-desktop
pkgver=2.4.11
pkgrel=0
pkgdesc="Telegram Desktop messaging app"
options="!check" # Requires Catch2 to be packaged.
url="https://desktop.telegram.org/"
# x86: textrels in tg_owt
# s390x, mips, mips64: Need support on lib_base
# armhf: qt5-qtwayland missing
arch="all !x86 !s390x !mips !mips64 !armhf"
license="GPL-3.0-or-later WITH OpenSSL"
depends="qt5-qtimageformats ttf-opensans"
makedepends="
	alsa-lib-dev
	cmake
	enchant2-dev
	ffmpeg-dev
	gtk+3.0-dev
	hunspell-dev
	libjpeg-turbo-dev
	libdbusmenu-glib-dev
	libdbusmenu-qt-dev
	libexecinfo-dev
	libexif-dev
	libva-dev
	libvdpau-dev
	libxkbcommon-dev
	lz4-dev
	minizip-dev
	openal-soft-dev
	openssl-dev
	opus-dev
	portaudio-dev
	pulseaudio-dev
	python3
	qtchooser
	qt5-qtbase-dev
	qt5-qtwayland-dev
	range-v3-dev
	samurai
	tg_owt-dev
	tl-expected
	xxhash-dev
	xz-dev
	zlib-dev
	"
source="
	https://github.com/telegramdesktop/tdesktop/releases/download/v$pkgver/tdesktop-$pkgver-full.tar.gz
	remove-glibc.patch
	small-sizes.patch
	"
builddir="$srcdir/tdesktop-$pkgver-full"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \
		-DDESKTOP_APP_DISABLE_SPELLCHECK=OFF \
		-DDESKTOP_APP_LOTTIE_USE_CACHE=ON \
		-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF \
		-DDESKTOP_APP_USE_PACKAGED=ON \
		-DTDESKTOP_API_ID=17349 \
		-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb \
		-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \
		-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF \
		-DTDESKTOP_LAUNCHER_BASENAME=telegram-desktop \
		-DDESKTOP_APP_USE_PACKAGED_GSL=OFF \
		-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF \
		-DDESKTOP_APP_USE_PACKAGED_FONTS=ON \
		$CMAKE_CROSSOPTS .
	ninja -C build
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="b6452c39ea1b1b794c61ec2fc700356c9ee314250d73b895d297ad66602a93676d3cf74d695ac53965719ddb54da9e290f4f638bbf2e0fb21fec8995b6788a1c  tdesktop-2.4.11-full.tar.gz
b276001d1616cb5dbacbcd18510d0bd4b9d9f7b7a895b05fb6329866f5bdb7b69f536f7d7914436c8ea975c4f7951a2bb3efd9209c38df115b1d85e0ed099b04  remove-glibc.patch
3d1b8e6f870fc780f9ae8bc6a67eb676a5c5f686dc79e84cd6d64cb3cfafb1be626d0cc3960ffc67cecca21568764a0137c7303a89045fa59f91ba4eb5d8caed  small-sizes.patch"