summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClansty2024-03-30 20:02:39 +0800
committerClansty2024-03-30 20:02:39 +0800
commit55f66d367a7406a128f654f2396561050696f309 (patch)
treea92b37f0aa81494f5eb9c1993acad2cf459b4652
parenta3cf8db03833fdee24ee3196cee3d74e0f7044bb (diff)
downloadaur-0wgram.tar.gz
Sat Mar 30 08:02:39 PM CST 2024
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD46
-rw-r--r--block-sponsored_messages.patch13
-rw-r--r--fix-lzma-link.patch116
-rw-r--r--io.github.tdesktop_x64.TDesktop.desktop21
5 files changed, 86 insertions, 130 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b441f308efa..a7cc30a69b2e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
-pkgbase = 64gram-desktop
+pkgbase = 0wgram
pkgdesc = Unofficial desktop version of Telegram messaging app
- pkgver = 1.1.14
+ pkgver = 1.2.4
pkgrel = 1
epoch = 1
- url = https://github.com/TDesktop-x64/tdesktop
+ url = https://github.com/clansty/tdesktop
arch = x86_64
+ arch = aarch64
license = GPL3
makedepends = cmake
makedepends = git
@@ -52,14 +53,9 @@ pkgbase = 64gram-desktop
depends = libvpx
optdepends = webkit2gtk: embedded browser features
optdepends = xdg-desktop-portal: desktop integration
- noextract = 64Gram-1.1.14-full.tar.gz
- source = https://github.com/TDesktop-x64/tdesktop/releases/download/v1.1.14/64Gram-1.1.14-full.tar.gz
- source = block-sponsored_messages.patch
+ source = git+https://github.com/clansty/tdesktop.git#commit=f3928f7ae8eee05b6a2e9f9e7e5a4fdd4f414382
source = fix-lzma-link.patch
- source = io.github.tdesktop_x64.TDesktop.desktop
- sha512sums = 4482abe93f0873bc7ced8b1a391caf5db9f757206b40e1ead4aa4a1dd8a2a3c098bca828aa572cf0aaf8853766afea7ae32aa8d544a00cd15e0585dde16391b4
- sha512sums = c662524ca4f4a8df021ee94696d84896ed9a271df321933942806dda4544ea25f51a650ec8b4fc72f9a2219ea54cbfaf37b9604124f7263c86f74f1d647587ae
- sha512sums = d813a5ac6ff2208b693ecf494d7bf036087e223662f9f34aaaeafea0afe0fe798e867b9610f7221ea80319865502c20b61310d5a31634b888793873d63322463
- sha512sums = ea027bc2d40c74507adf32380444207210a8c31cdba57f3f468d23d8e9c7376647cc8c713f188660f9b1dacd9041227aafd5a27c7889f47ea3985712b6b74b8b
+ sha512sums = SKIP
+ sha512sums = e15cdc8513793f17e4b6ca2dfab5b4bbf22d0934c1e88038957b9004865edb4101a3133482708aab6844de3c1dfdac9c98970de684c1508634180d90c84345f7
-pkgname = 64gram-desktop
+pkgname = 0wgram
diff --git a/PKGBUILD b/PKGBUILD
index 80e0fe1357e1..19147526c612 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,13 @@
# Contributor: solopasha <daron439 at gmail dot com>
# Contributor: KspLite <ksplite@outlook.com>
# Contributor: Daniil Kovalev <daniil@kovalev.website>
-pkgname=64gram-desktop
-_pkgname=64Gram
-pkgver=1.1.14
+pkgname=0wgram
+pkgver=1.2.4
pkgrel=1
epoch=1
pkgdesc='Unofficial desktop version of Telegram messaging app'
-arch=('x86_64')
-url="https://github.com/TDesktop-x64/tdesktop"
+arch=('x86_64' 'aarch64')
+url="https://github.com/clansty/tdesktop"
license=('GPL3')
depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'ttf-opensans'
'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'xxhash'
@@ -21,22 +20,16 @@ makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-
optdepends=('webkit2gtk: embedded browser features'
'xdg-desktop-portal: desktop integration')
-source=("https://github.com/TDesktop-x64/tdesktop/releases/download/v${pkgver}/${_pkgname}-${pkgver}-full.tar.gz"
- "block-sponsored_messages.patch"
- "fix-lzma-link.patch"
- "io.github.tdesktop_x64.TDesktop.desktop")
+commit="f3928f7ae8eee05b6a2e9f9e7e5a4fdd4f414382"
+source=("git+${url}.git#commit=${commit}"
+ "fix-lzma-link.patch")
-noextract=("${_pkgname}-${pkgver}-full.tar.gz")
-
-sha512sums=('4482abe93f0873bc7ced8b1a391caf5db9f757206b40e1ead4aa4a1dd8a2a3c098bca828aa572cf0aaf8853766afea7ae32aa8d544a00cd15e0585dde16391b4'
- 'c662524ca4f4a8df021ee94696d84896ed9a271df321933942806dda4544ea25f51a650ec8b4fc72f9a2219ea54cbfaf37b9604124f7263c86f74f1d647587ae'
- 'd813a5ac6ff2208b693ecf494d7bf036087e223662f9f34aaaeafea0afe0fe798e867b9610f7221ea80319865502c20b61310d5a31634b888793873d63322463'
- 'ea027bc2d40c74507adf32380444207210a8c31cdba57f3f468d23d8e9c7376647cc8c713f188660f9b1dacd9041227aafd5a27c7889f47ea3985712b6b74b8b')
+sha512sums=('SKIP'
+ 'e15cdc8513793f17e4b6ca2dfab5b4bbf22d0934c1e88038957b9004865edb4101a3133482708aab6844de3c1dfdac9c98970de684c1508634180d90c84345f7')
prepare() {
- LANG=C.UTF-8 bsdtar -xf ${_pkgname}-${pkgver}-full.tar.gz
- cd $_pkgname-$pkgver-full
- patch -Np1 --binary -i ../block-sponsored_messages.patch
+ cd tdesktop
+ git submodule update --init --recursive
patch -p1 --binary < ../fix-lzma-link.patch
}
@@ -45,22 +38,23 @@ build() {
cmake \
-B build \
- -S $_pkgname-$pkgver-full \
+ -S tdesktop \
-G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_BUILD_TYPE=Release \
-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON \
- -DTDESKTOP_API_TEST=ON
+ -DTDESKTOP_API_ID=16138177 \
+ -DTDESKTOP_API_HASH=f14e4d935dcd9f002e44b2698aeb2466
+ # -DTDESKTOP_API_TEST=ON
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
- mv "$pkgdir/usr/bin/telegram-desktop" "$pkgdir/usr/bin/64gram-desktop"
- install -Dm644 "$srcdir/io.github.tdesktop_x64.TDesktop.desktop" -t "$pkgdir/usr/share/applications"
- find "$pkgdir" -type f -name "telegram.png" -exec rename telegram.png 64gram.png {} \;
- mv "$pkgdir/usr/share/icons/hicolor/symbolic/apps/telegram-symbolic.svg" "$pkgdir/usr/share/icons/hicolor/symbolic/apps/64gram-symbolic.svg"
- mkdir -p "$pkgdir/usr/share/64Gram/externalupdater.d"
- echo "/usr/bin/64gram-desktop" >"$pkgdir/usr/share/64Gram/externalupdater.d/telegram-desktop.conf"
+ mv "$pkgdir/usr/bin/telegram-desktop" "$pkgdir/usr/bin/${pkgname}"
+ find "$pkgdir" -type f -name "telegram.png" -exec rename telegram.png ${pkgname}.png {} \;
+ mv "$pkgdir/usr/share/icons/hicolor/symbolic/apps/telegram-symbolic.svg" "$pkgdir/usr/share/icons/hicolor/symbolic/apps/${pkgname}-symbolic.svg"
+ mkdir -p "$pkgdir/usr/share/${pkgname}/externalupdater.d"
+ echo "/usr/bin/${pkgname}" > "$pkgdir/usr/share/${pkgname}/externalupdater.d/telegram-desktop.conf"
}
diff --git a/block-sponsored_messages.patch b/block-sponsored_messages.patch
deleted file mode 100644
index 8452a9a0cccd..000000000000
--- a/block-sponsored_messages.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Telegram/SourceFiles/data/data_sponsored_messages.cpp b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
-index c90dd3c53..f8e0a096d 100644
---- a/Telegram/SourceFiles/data/data_sponsored_messages.cpp
-+++ b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
-@@ -82,7 +82,7 @@ bool SponsoredMessages::append(not_null<History*> history) {
- }
-
- bool SponsoredMessages::canHaveFor(not_null<History*> history) const {
-- return history->peer->isChannel();
-+ return false;
- }
-
- void SponsoredMessages::request(not_null<History*> history) {
diff --git a/fix-lzma-link.patch b/fix-lzma-link.patch
index 0910685cb26b..20db3e1e6a67 100644
--- a/fix-lzma-link.patch
+++ b/fix-lzma-link.patch
@@ -1,58 +1,58 @@
-c573b65a Fix linking with LZMA when auto update is disabled
-diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
-index 24c5909e..cb3ba61c 100644
---- a/Telegram/CMakeLists.txt
-+++ b/Telegram/CMakeLists.txt
-@@ -85,6 +85,7 @@ PRIVATE
- desktop-app::external_qr_code_generator
- desktop-app::external_crash_reports
- desktop-app::external_auto_updates
-+ desktop-app::external_lzma
- desktop-app::external_openssl
- desktop-app::external_openal
- desktop-app::external_xxhash
-@@ -1710,6 +1711,7 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT
- desktop-app::external_qt
- desktop-app::external_zlib
- desktop-app::external_auto_updates
-+ desktop-app::external_lzma
- desktop-app::external_openssl
- )
-
-diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
-index 9be0e5a2..ed0b9aed 100644
---- a/cmake/external/CMakeLists.txt
-+++ b/cmake/external/CMakeLists.txt
-@@ -47,6 +47,7 @@ add_checked_subdirectory(jpeg)
- add_checked_subdirectory(kcoreaddons)
- add_checked_subdirectory(kimageformats)
- add_checked_subdirectory(lz4)
-+add_checked_subdirectory(lzma)
- add_checked_subdirectory(minizip)
- if (LINUX)
- add_checked_subdirectory(nimf_qt5)
-diff --git a/cmake/external/lzma/CMakeLists.txt b/cmake/external/lzma/CMakeLists.txt
-new file mode 100644
-index 00000000..8e75394d
---- /dev/null
-+++ b/cmake/external/lzma/CMakeLists.txt
-@@ -0,0 +1,19 @@
-+# This file is inspired by Desktop App Toolkit,
-+# a set of libraries for developing nice desktop applications.
-+#
-+# For license and copyright information please follow this link:
-+# https://github.com/desktop-app/legal/blob/master/LEGAL
-+
-+if (DESKTOP_APP_USE_PACKAGED)
-+ if (DESKTOP_APP_DISABLE_AUTOUPDATE)
-+ add_library(external_lzma INTERFACE IMPORTED GLOBAL)
-+ add_library(desktop-app::external_lzma ALIAS external_lzma)
-+ find_package(PkgConfig REQUIRED)
-+ pkg_check_modules(LZMA REQUIRED IMPORTED_TARGET liblzma)
-+ target_link_libraries(external_lzma INTERFACE PkgConfig::LZMA)
-+ return()
-+ else()
-+ # See auto_update directory contents
-+ endif()
-+ message(FATAL_ERROR "DEKSTOP_APP_USE_PACKAGED expected to be TRUE")
-+endif()
+c573b65a Fix linking with LZMA when auto update is disabled
+diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
+index 24c5909e..cb3ba61c 100644
+--- a/Telegram/CMakeLists.txt
++++ b/Telegram/CMakeLists.txt
+@@ -85,6 +85,7 @@ PRIVATE
+ desktop-app::external_qr_code_generator
+ desktop-app::external_crash_reports
+ desktop-app::external_auto_updates
++ desktop-app::external_lzma
+ desktop-app::external_openssl
+ desktop-app::external_openal
+ desktop-app::external_xxhash
+@@ -1710,6 +1711,7 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT
+ desktop-app::external_qt
+ desktop-app::external_zlib
+ desktop-app::external_auto_updates
++ desktop-app::external_lzma
+ desktop-app::external_openssl
+ )
+
+diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
+index 9be0e5a2..ed0b9aed 100644
+--- a/cmake/external/CMakeLists.txt
++++ b/cmake/external/CMakeLists.txt
+@@ -47,6 +47,7 @@ add_checked_subdirectory(jpeg)
+ add_checked_subdirectory(kcoreaddons)
+ add_checked_subdirectory(kimageformats)
+ add_checked_subdirectory(lz4)
++add_checked_subdirectory(lzma)
+ add_checked_subdirectory(minizip)
+ if (LINUX)
+ add_checked_subdirectory(nimf_qt5)
+diff --git a/cmake/external/lzma/CMakeLists.txt b/cmake/external/lzma/CMakeLists.txt
+new file mode 100644
+index 00000000..8e75394d
+--- /dev/null
++++ b/cmake/external/lzma/CMakeLists.txt
+@@ -0,0 +1,19 @@
++# This file is inspired by Desktop App Toolkit,
++# a set of libraries for developing nice desktop applications.
++#
++# For license and copyright information please follow this link:
++# https://github.com/desktop-app/legal/blob/master/LEGAL
++
++if (DESKTOP_APP_USE_PACKAGED)
++ if (DESKTOP_APP_DISABLE_AUTOUPDATE)
++ add_library(external_lzma INTERFACE IMPORTED GLOBAL)
++ add_library(desktop-app::external_lzma ALIAS external_lzma)
++ find_package(PkgConfig REQUIRED)
++ pkg_check_modules(LZMA REQUIRED IMPORTED_TARGET liblzma)
++ target_link_libraries(external_lzma INTERFACE PkgConfig::LZMA)
++ return()
++ else()
++ # See auto_update directory contents
++ endif()
++ message(FATAL_ERROR "DEKSTOP_APP_USE_PACKAGED expected to be TRUE")
++endif()
diff --git a/io.github.tdesktop_x64.TDesktop.desktop b/io.github.tdesktop_x64.TDesktop.desktop
deleted file mode 100644
index 3f81357944e4..000000000000
--- a/io.github.tdesktop_x64.TDesktop.desktop
+++ /dev/null
@@ -1,21 +0,0 @@
-[Desktop Entry]
-Name=64Gram Desktop
-Comment=Unofficial desktop version of Telegram messaging app
-TryExec=64gram-desktop
-Exec=64gram-desktop -- %u
-Icon=64gram
-Terminal=false
-StartupWMClass=64Gram
-Type=Application
-Categories=Chat;Network;InstantMessaging;Qt;
-MimeType=x-scheme-handler/tg;
-Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;64gram;
-Actions=quit;
-SingleMainWindow=true
-X-GNOME-UsesNotifications=true
-X-GNOME-SingleWindow=true
-
-[Desktop Action quit]
-Exec=64gram-desktop -quit
-Name=Quit Telegram
-Icon=application-exit