132 lines
3.3 KiB
Bash
132 lines
3.3 KiB
Bash
# Maintainer: local Nexspence/Gitea builder
|
|
pkgname=ayugram-desktop
|
|
pkgver=7.0.9
|
|
pkgrel=1
|
|
pkgdesc='Desktop Telegram client with good customization and Ghost mode'
|
|
arch=('x86_64')
|
|
url='https://github.com/AyuGram/AyuGramDesktop'
|
|
license=('GPL-3.0-or-later')
|
|
|
|
depends=(
|
|
'abseil-cpp'
|
|
'ada'
|
|
'ffmpeg'
|
|
'glib2'
|
|
'glibc'
|
|
'hicolor-icon-theme'
|
|
'hunspell'
|
|
'kcoreaddons'
|
|
'libavif'
|
|
'libdispatch'
|
|
'libgcc'
|
|
'libheif'
|
|
'libjpeg-turbo'
|
|
'libjxl'
|
|
'libstdc++'
|
|
'libvpx'
|
|
'libx11'
|
|
'libxcb'
|
|
'libxcomposite'
|
|
'libxdamage'
|
|
'libxext'
|
|
'libxfixes'
|
|
'libxkbcommon'
|
|
'libxrandr'
|
|
'libxtst'
|
|
'lz4'
|
|
'minizip'
|
|
'openal'
|
|
'openh264'
|
|
'openssl'
|
|
'pipewire'
|
|
'protobuf'
|
|
'qt6-base'
|
|
'qt6-imageformats'
|
|
'qt6-svg'
|
|
'qt6-wayland'
|
|
'rnnoise'
|
|
'xxhash'
|
|
'zlib'
|
|
)
|
|
|
|
makedepends=(
|
|
'boost'
|
|
'cmake'
|
|
'gobject-introspection'
|
|
'gperf'
|
|
'libtg_owt'
|
|
'microsoft-gsl'
|
|
'ninja'
|
|
'python'
|
|
'range-v3'
|
|
'tl-expected'
|
|
)
|
|
|
|
optdepends=(
|
|
'geoclue: geoinformation support'
|
|
'geocode-glib-2: geocoding support'
|
|
'webkit2gtk-4.1: embedded browser features'
|
|
'webkitgtk-6.0: embedded browser features on Wayland'
|
|
'xdg-desktop-portal: desktop integration'
|
|
)
|
|
|
|
find_program(
|
|
DESKTOP_APP_GDBUSCODEGEN
|
|
gdbus-codegen
|
|
)
|
|
# Updated by scripts/update-pkgbuild.sh for each upstream release.
|
|
_tdlib_commit='51743dfd01dff6179e2d8f7095729caa4e2222e9'
|
|
|
|
source=(
|
|
"AyuGramDesktop-${pkgver}-full.tar.gz::https://github.com/AyuGram/AyuGramDesktop/releases/download/v${pkgver}/AyuGramDesktop-${pkgver}-full.tar.gz"
|
|
"td-${_tdlib_commit}.tar.gz::https://github.com/tdlib/td/archive/${_tdlib_commit}.tar.gz"
|
|
)
|
|
|
|
sha256sums=('SKIP' 'SKIP')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/AyuGramDesktop-${pkgver}-full"
|
|
|
|
# The full release archive is preferred over a recursive checkout because
|
|
# upstream has occasionally had release tags with broken submodule pins.
|
|
#
|
|
# Keep source changes minimal: package against upstream as released.
|
|
}
|
|
|
|
build() {
|
|
cmake -S "${srcdir}/td-${_tdlib_commit}" \
|
|
-B "${srcdir}/td-${_tdlib_commit}/build" \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DCMAKE_INSTALL_PREFIX="${srcdir}/td-${_tdlib_commit}/install" \
|
|
-Wno-dev \
|
|
-DTD_E2E_ONLY=ON
|
|
|
|
cmake --build "${srcdir}/td-${_tdlib_commit}/build" --parallel "${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
|
|
cmake --install "${srcdir}/td-${_tdlib_commit}/build"
|
|
|
|
cmake -S "${srcdir}/AyuGramDesktop-${pkgver}-full" \
|
|
-B "${srcdir}/build" \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DTDESKTOP_API_ID="${MAKEPKG_AYUGRAM_API_ID:-611335}" \
|
|
-DTDESKTOP_API_HASH="${MAKEPKG_AYUGRAM_API_HASH:-d524b414d21f4d37f08684c1df41ac9c}" \
|
|
-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON \
|
|
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \
|
|
-DDESKTOP_APP_USE_PACKAGED=ON \
|
|
-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF \
|
|
-DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=OFF \
|
|
-DDESKTOP_APP_DISABLE_X11_INTEGRATION=OFF \
|
|
-DDESKTOP_APP_DISABLE_QT_PLUGINS=OFF \
|
|
-Dtde2e_DIR="${srcdir}/td-${_tdlib_commit}/install/lib/cmake/tde2e"
|
|
|
|
cmake --build "${srcdir}/build" --parallel "${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="${pkgdir}" cmake --install "${srcdir}/build"
|
|
|
|
# AyuGram upstream installs the executable as /usr/bin/AyuGram.
|
|
# Do not rename it: desktop integration supplied by upstream expects it.
|
|
}
|