summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD247
2 files changed, 139 insertions, 133 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bdb664844a5e..18beda2eff5b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = telegram-desktop-git
pkgdesc = Official Telegram Desktop client
- pkgver = 4.11.6.r5.g468d4c5e4
+ pkgver = 4.12.2.r10.g3adbfb1fb
pkgrel = 1
url = https://github.com/telegramdesktop/tdesktop
arch = x86_64
@@ -21,7 +21,6 @@ pkgbase = telegram-desktop-git
depends = ffmpeg
depends = glibmm-2.68
depends = hunspell
- depends = jemalloc
depends = libdispatch
depends = libsigc++-3.0
depends = libvpx
@@ -39,16 +38,9 @@ pkgbase = telegram-desktop-git
depends = xxhash
optdepends = webkit2gtk: embedded browser features
optdepends = xdg-desktop-portal: desktop integration
- provides = telegram-desktop=4.11.6
+ provides = telegram-desktop=4.12.2
conflicts = telegram-desktop
source = telegram-desktop::git+https://github.com/telegramdesktop/tdesktop.git
- source = telegram-tg_owt::git+https://github.com/desktop-app/tg_owt.git
- source = https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/101.patch
- source = tg_owt-fix.patch
- source = abseil.abseil-cpp::git+https://github.com/abseil/abseil-cpp.git
- source = chromiumsrc.libyuv::git+https://gitlab.com/chromiumsrc/libyuv.git
- source = cisco.libsrtp::git+https://github.com/cisco/libsrtp.git
- source = google.crc32c::git+https://github.com/google/crc32c.git
source = apple.swift-corelibs-libdispatch::git+https://github.com/apple/swift-corelibs-libdispatch.git
source = cyan4973.xxhash::git+https://github.com/Cyan4973/xxHash.git
source = desktop-app.cmake_helpers::git+https://github.com/desktop-app/cmake_helpers.git
@@ -75,7 +67,6 @@ pkgbase = telegram-desktop-git
source = hamonikr.nimf::git+https://github.com/hamonikr/nimf.git
source = hime-ime.hime::git+https://github.com/hime-ime/hime.git
source = hunspell::git+https://github.com/hunspell/hunspell.git
- source = jemalloc::git+https://github.com/jemalloc/jemalloc.git
source = kde.kcoreaddons::git+https://github.com/KDE/kcoreaddons.git
source = kde.kimageformats::git+https://github.com/KDE/kimageformats.git
source = kde.plasma-wayland-protocols::git+https://github.com/KDE/plasma-wayland-protocols.git
@@ -89,11 +80,15 @@ pkgbase = telegram-desktop-git
source = mnauw.cppgir::git+https://gitlab.com/mnauw/cppgir.git
source = yugr.implib.so::git+https://github.com/yugr/Implib.so.git
source = martinmoene.expected-lite::git+https://github.com/martinmoene/expected-lite.git
+ source = telegram-tg_owt::git+https://github.com/desktop-app/tg_owt.git
+ source = https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/101.patch
+ source = tg_owt-fix.patch
+ source = abseil.abseil-cpp::git+https://github.com/abseil/abseil-cpp.git
+ source = chromiumsrc.libyuv::git+https://gitlab.com/chromiumsrc/libyuv.git
+ source = cisco.libsrtp::git+https://github.com/cisco/libsrtp.git
+ source = google.crc32c::git+https://github.com/google/crc32c.git
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = f4d26c1048a7fd1ac3419042009c3b52c001458e44309a765d42d7df9f45f1ef
- sha256sums = 8d3a1c4b2e40eef7a4cc8e6f498c416af47a91b878ec3762b51476e89695cb13
- sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -133,6 +128,8 @@ pkgbase = telegram-desktop-git
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = f4d26c1048a7fd1ac3419042009c3b52c001458e44309a765d42d7df9f45f1ef
+ sha256sums = 8d3a1c4b2e40eef7a4cc8e6f498c416af47a91b878ec3762b51476e89695cb13
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 245fa257eb95..7dd4df2c6eab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,86 +2,103 @@
# Contributor: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: hexchain <i@hexchain.org>
+# options
: ${_build_tg_owt:=true}
+: ${_pkgtype:=git}
+
+# basic info
_pkgname="telegram-desktop"
-pkgname="$_pkgname-git"
-pkgver=4.11.6.r5.g468d4c5e4
+pkgname="$_pkgname${_pkgtype:+-$_pkgtype}"
+pkgver=4.12.2.r10.g3adbfb1fb
pkgrel=1
pkgdesc='Official Telegram Desktop client'
url="https://github.com/telegramdesktop/tdesktop"
license=('GPL3')
arch=('x86_64')
-depends+=(
- abseil-cpp
- ffmpeg
- glibmm-2.68
- hunspell
- jemalloc
- libdispatch
- libsigc++-3.0
- libvpx
- minizip
- openal
- openh264
- opus
- protobuf
- qt6-base
- qt6-declarative
- qt6-svg
- qt6-wayland
- rnnoise
- xcb-util-keysyms
- xxhash
-
- ## implicit
- #gcc-libs
- #glib2
- #glibc
- #hicolor-icon-theme
- #libjpeg-turbo
- #libpipewire
- #libx11
- #libxcb
- #libxcomposite
- #libxdamage
- #libxext
- #libxfixes
- #libxrandr
- #libxtst
- #lz4
- #openssl
- #wayland
- #zlib
-)
-makedepends+=(
- 'boost'
- 'cmake'
- 'extra-cmake-modules'
- 'fmt'
- 'git'
- 'gobject-introspection'
- 'ninja'
-)
-optdepends+=(
- 'webkit2gtk: embedded browser features'
- 'xdg-desktop-portal: desktop integration'
-)
-
-if [[ x"${_build_tg_owt::1}" != "xt" ]] ; then
+# main package
+_main_package() {
+ depends+=(
+ abseil-cpp
+ ffmpeg
+ glibmm-2.68
+ hunspell
+ libdispatch
+ libsigc++-3.0
+ libvpx
+ minizip
+ openal
+ openh264
+ opus
+ protobuf
+ qt6-base
+ qt6-declarative
+ qt6-svg
+ qt6-wayland
+ rnnoise
+ xcb-util-keysyms
+ xxhash
+
+ ## implicit
+ #gcc-libs
+ #glib2
+ #glibc
+ #hicolor-icon-theme
+ #libjpeg-turbo
+ #libpipewire
+ #libx11
+ #libxcb
+ #libxcomposite
+ #libxdamage
+ #libxext
+ #libxfixes
+ #libxrandr
+ #libxtst
+ #lz4
+ #openssl
+ #wayland
+ #zlib
+ )
makedepends+=(
- 'libtg_owt-git'
+ 'boost'
+ 'cmake'
+ 'extra-cmake-modules'
+ 'fmt'
+ 'git'
+ 'gobject-introspection'
+ 'ninja'
)
-fi
+ optdepends+=(
+ 'webkit2gtk: embedded browser features'
+ 'xdg-desktop-portal: desktop integration'
+ )
+
+ provides=("$_pkgname=${pkgver%%.r*}")
+ conflicts=("$_pkgname")
+
+ _pkgsrc="$_pkgname"
+ source+=("$_pkgsrc"::"git+$url.git")
+ sha256sums+=('SKIP')
+
+ _source_telegram_desktop
+ _source_ericniebler_range_v3
+ _source_telegramdesktop_libtgvoip
+
+ _source_desktop_app_cmake_helpers
+ _source_mnauw_cppgir
-provides=("$_pkgname=${pkgver%%.r*}")
-conflicts=("$_pkgname")
+ if [[ x"${_build_tg_owt::1}" == "xt" ]] ; then
+ _source_tg_owt
+ else
+ makedepends+=(
+ 'libtg_owt-git'
+ )
+ fi
-_pkgsrc="$_pkgname"
-source+=("$_pkgsrc"::"git+$url.git")
-sha256sums+=('SKIP')
+}
+# submodules
_source_telegram_desktop() {
source+=(
'apple.swift-corelibs-libdispatch'::'git+https://github.com/apple/swift-corelibs-libdispatch.git'
@@ -110,7 +127,6 @@ _source_telegram_desktop() {
'hamonikr.nimf'::'git+https://github.com/hamonikr/nimf.git'
'hime-ime.hime'::'git+https://github.com/hime-ime/hime.git'
'hunspell'::'git+https://github.com/hunspell/hunspell.git'
- 'jemalloc'::'git+https://github.com/jemalloc/jemalloc.git'
'kde.kcoreaddons'::'git+https://github.com/KDE/kcoreaddons.git'
'kde.kimageformats'::'git+https://github.com/KDE/kimageformats.git'
'kde.plasma-wayland-protocols'::'git+https://github.com/KDE/plasma-wayland-protocols.git'
@@ -155,7 +171,6 @@ _source_telegram_desktop() {
'SKIP'
'SKIP'
'SKIP'
- 'SKIP'
)
_prepare_telegram_desktop() (
@@ -187,7 +202,6 @@ _source_telegram_desktop() {
['hamonikr.nimf']='Telegram/ThirdParty/nimf'
['hime-ime.hime']='Telegram/ThirdParty/hime'
['hunspell']='Telegram/ThirdParty/hunspell'
- ['jemalloc']='Telegram/ThirdParty/jemalloc'
['kde.kcoreaddons']='Telegram/ThirdParty/kcoreaddons'
['kde.kimageformats']='Telegram/ThirdParty/kimageformats'
['kde.plasma-wayland-protocols']='Telegram/ThirdParty/plasma-wayland-protocols'
@@ -277,7 +291,8 @@ _source_mnauw_cppgir() {
)
}
-if [[ x"${_build_tg_owt::1}" == "xt" ]] ; then
+# tg_owt
+_source_tg_owt() {
makedepends+=(
pipewire
yasm
@@ -299,60 +314,36 @@ if [[ x"${_build_tg_owt::1}" == "xt" ]] ; then
'8d3a1c4b2e40eef7a4cc8e6f498c416af47a91b878ec3762b51476e89695cb13'
)
- _source_desktop_app_tg_owt() {
- source+=(
- 'abseil.abseil-cpp'::'git+https://github.com/abseil/abseil-cpp.git'
- 'chromiumsrc.libyuv'::'git+https://gitlab.com/chromiumsrc/libyuv.git'
- 'cisco.libsrtp'::'git+https://github.com/cisco/libsrtp.git'
- 'google.crc32c'::'git+https://github.com/google/crc32c.git'
- )
- sha256sums+=(
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- )
-
- _prepare_desktop_app_tg_owt() (
- cd "${srcdir:?}/$_pkgsrc_tgowt"
- local -A _submodules=(
- ['abseil.abseil-cpp']='src/third_party/abseil-cpp'
- ['chromiumsrc.libyuv']='src/third_party/libyuv'
- ['cisco.libsrtp']='src/third_party/libsrtp'
- ['google.crc32c']='src/third_party/crc32c/src'
- )
- _submodule_update
-
- apply-patch "${srcdir:?}/101.patch"
- apply-patch "${srcdir:?}/tg_owt-fix.patch"
- )
- }
+ # submodules - tg_owt
+ source+=(
+ 'abseil.abseil-cpp'::'git+https://github.com/abseil/abseil-cpp.git'
+ 'chromiumsrc.libyuv'::'git+https://gitlab.com/chromiumsrc/libyuv.git'
+ 'cisco.libsrtp'::'git+https://github.com/cisco/libsrtp.git'
+ 'google.crc32c'::'git+https://github.com/google/crc32c.git'
+ )
+ sha256sums+=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ )
- _build_tg_owt() (
- local _cmake_options=(
- -B "build-tg_owt"
- -S "$_pkgsrc_tgowt"
- -G Ninja
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DBUILD_SHARED_LIBS=OFF
- -DTG_OWT_PACKAGED_BUILD=ON
+ _prepare_desktop_app_tg_owt() (
+ cd "${srcdir:?}/$_pkgsrc_tgowt"
+ local -A _submodules=(
+ ['abseil.abseil-cpp']='src/third_party/abseil-cpp'
+ ['chromiumsrc.libyuv']='src/third_party/libyuv'
+ ['cisco.libsrtp']='src/third_party/libsrtp'
+ ['google.crc32c']='src/third_party/crc32c/src'
)
+ _submodule_update
- cmake "${_cmake_options[@]}"
- cmake --build "build-tg_owt"
+ apply-patch "${srcdir:?}/101.patch"
+ apply-patch "${srcdir:?}/tg_owt-fix.patch"
)
+}
- _source_desktop_app_tg_owt
-fi
-
-_source_telegram_desktop
-_source_ericniebler_range_v3
-_source_telegramdesktop_libtgvoip
-
-_source_desktop_app_cmake_helpers
-_source_mnauw_cppgir
-
+# common functions
prepare() {
apply-patch() {
printf '\nApplying patch %s\n' "$1"
@@ -386,6 +377,21 @@ pkgver() {
| sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
+_build_tg_owt() (
+ local _cmake_options=(
+ -B "build-tg_owt"
+ -S "$_pkgsrc_tgowt"
+ -G Ninja
+ -DCMAKE_BUILD_TYPE=Release
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DBUILD_SHARED_LIBS=OFF
+ -DTG_OWT_PACKAGED_BUILD=ON
+ )
+
+ cmake "${_cmake_options[@]}"
+ cmake --build "build-tg_owt"
+)
+
_build_telegram() (
# Turns out we're allowed to use the official API key that telegram uses for their snap builds:
# https://github.com/telegramdesktop/tdesktop/blob/8fab9167beb2407c1153930ed03a4badd0c2b59f/snap/snapcraft.yaml#L87-L88
@@ -424,3 +430,6 @@ build() {
package() {
DESTDIR="${pkgdir:?}" cmake --install build
}
+
+# execute
+_main_package