summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author7Ji2024-03-11 10:16:45 +0800
committer7Ji2024-03-11 10:29:57 +0800
commit1203946cc3b86b6dbea15e7d0fdcd8e371fed781 (patch)
treefcaaf7de7019f6e109da97b999f3bc678f54f087
parent6c60355a0654e8b4b058b6f25837c8cb2d7a5924 (diff)
downloadaur-1203946cc3b86b6dbea15e7d0fdcd8e371fed781.tar.gz
simplify PKGBUILD, allow non-existing .fontconfig, and add aarch64 support
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD76
-rw-r--r--wechat.sh2
3 files changed, 68 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0225bff79198..83ffcfe191db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,10 @@
pkgbase = wechat-beta-bwrap
pkgdesc = WeChat Testing with bwrap sandbox
pkgver = 1.0.0.145
- pkgrel = 13
+ pkgrel = 14
+ url = https://weixin.qq.com
arch = x86_64
+ arch = aarch64
license = proprietary
depends = nss
depends = xdg-utils
@@ -14,19 +16,25 @@ pkgbase = wechat-beta-bwrap
depends = openssl-1.1
depends = lsb-release
conflicts = wechat-uos
- noextract = wechat-uos_2.1.5_amd64.deb
- noextract = wechat-beta_1.0.0.145_amd64.deb
+ noextract = wechat-uos_2.1.5_x86_64.deb
+ noextract = wechat-beta_1.0.0.145_x86_64.deb
+ noextract = wechat-uos_2.1.5_aarch64.deb
+ noextract = wechat-beta_1.0.0.145_aarch64.deb
source = wechat.sh
source = wechat-beta.desktop
source = wechat-beta.png
source = license.tar.gz
- source = wechat-uos_2.1.5_amd64.deb::https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_amd64.deb
- source = wechat-beta_1.0.0.145_amd64.deb::https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb?attname=wechat-beta_1.0.0.145_amd64.deb
- md5sums = 801cda44cb86f28317977a018fc2256b
+ md5sums = ad1a9fd10d7965b37fa10b120f1dcdf1
md5sums = 4967385a00db424e596263618335411f
md5sums = cf971cb2cb01d8a5fd89d3a3555abfaf
md5sums = 6b159c6e9d21a98925489bc37a9aea43
- md5sums = 27d585e8fc57950ed4f4f3ffc036447f
- md5sums = 1da072bd774d1b5c08b9545b409e3fcb
+ source_x86_64 = wechat-uos_2.1.5_x86_64.deb::https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_amd64.deb
+ source_x86_64 = wechat-beta_1.0.0.145_x86_64.deb::https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb
+ md5sums_x86_64 = 27d585e8fc57950ed4f4f3ffc036447f
+ md5sums_x86_64 = 1da072bd774d1b5c08b9545b409e3fcb
+ source_aarch64 = wechat-uos_2.1.5_aarch64.deb::https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_2.1.5_arm64.deb
+ source_aarch64 = wechat-beta_1.0.0.145_aarch64.deb::https://cdn4.cnxclm.com/uploads/2024/03/05/NKX87bHT_wechat-beta_1.0.0.150_arm64.deb
+ md5sums_aarch64 = 5be8de0d40ad21bcc49ae4bd8041a0bf
+ md5sums_aarch64 = b9d2d3461964da54eb630ef6f07d4ccc
pkgname = wechat-beta-bwrap
diff --git a/PKGBUILD b/PKGBUILD
index 4275a0e90fdc..2bb179292c22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,14 @@
# Maintainer: leaeasy <leaeasy at gmail dot com>
-#
+# Maintainer: 7Ji <pugokushin at gmail dot com>
+
pkgname=wechat-beta-bwrap
pkgver=1.0.0.145
-pkgrel=13
-uosver=2.1.5
-epoch=
+pkgrel=14
pkgdesc="WeChat Testing with bwrap sandbox"
-arch=('x86_64')
-url=""
+arch=('x86_64' 'aarch64')
+url="https://weixin.qq.com"
license=('proprietary')
conflicts=('wechat-uos')
-groups=()
depends=('nss' 'xdg-utils' 'libxss' 'libnotify' 'bubblewrap'
'xdg-user-dirs' 'xdg-desktop-portal' 'openssl-1.1' 'lsb-release')
source=(
@@ -18,40 +16,68 @@ source=(
wechat-beta.desktop
wechat-beta.png
license.tar.gz
- wechat-uos_${uosver}_amd64.deb::"https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_${uosver}_amd64.deb"
- wechat-beta_${pkgver}_amd64.deb::"https://cdn4.cnxclm.com/uploads/2024/03/05/3VDyAc0x_wechat-beta_1.0.0.145_amd64.deb?attname=wechat-beta_${pkgver}_amd64.deb"
)
-noextract=(
- wechat-uos_${uosver}_amd64.deb
- wechat-beta_${pkgver}_amd64.deb
+_uosver=2.1.5
+_uos_deb_url_common=https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.weixin/com.tencent.weixin_
+_beta_deb_url_common=https://cdn4.cnxclm.com/uploads/2024/03/05
+_beta_deb_id_x86_64=3VDyAc0x
+_beta_deb_id_aarch64=NKX87bHT
+
+_uos_deb_stem=wechat-uos_"${_uosver}"
+_beta_deb_stem=wechat-beta_"${pkgver}"
+
+source_x86_64=(
+ "${_uos_deb_stem}_x86_64.deb::${_uos_deb_url_common}${_uosver}_amd64.deb"
+ "${_beta_deb_stem}_x86_64.deb::${_beta_deb_url_common}/${_beta_deb_id_x86_64}_${_beta_deb_stem}_amd64.deb"
+)
+
+source_aarch64=(
+ "${_uos_deb_stem}_aarch64.deb::${_uos_deb_url_common}${_uosver}_arm64.deb"
+ "${_beta_deb_stem}_aarch64.deb::${_beta_deb_url_common}/${_beta_deb_id_aarch64}_wechat-beta_1.0.0.150_arm64.deb" # Upstream provides .150 aarch64 instead of .145
+)
+
+noextract=()
+for _source in "${source_x86_64[@]}" "${source_aarch64[@]}"; do
+ noextract+=("${_source%%::*}")
+done
+
+md5sums=(
+ 'ad1a9fd10d7965b37fa10b120f1dcdf1'
+ '4967385a00db424e596263618335411f'
+ 'cf971cb2cb01d8a5fd89d3a3555abfaf'
+ '6b159c6e9d21a98925489bc37a9aea43'
+)
+
+md5sums_x86_64=(
+ '27d585e8fc57950ed4f4f3ffc036447f'
+ '1da072bd774d1b5c08b9545b409e3fcb'
+)
+
+md5sums_aarch64=(
+ '5be8de0d40ad21bcc49ae4bd8041a0bf'
+ 'b9d2d3461964da54eb630ef6f07d4ccc'
)
-md5sums=('801cda44cb86f28317977a018fc2256b'
- '4967385a00db424e596263618335411f'
- 'cf971cb2cb01d8a5fd89d3a3555abfaf'
- '6b159c6e9d21a98925489bc37a9aea43'
- '27d585e8fc57950ed4f4f3ffc036447f'
- '1da072bd774d1b5c08b9545b409e3fcb')
build() {
echo "Extract wechat-uos deb file"
- mkdir -p ${srcdir}/wechat-uos
- bsdtar -xf ${srcdir}/wechat-uos_${uosver}_amd64.deb -C ${srcdir}/wechat-uos
- bsdtar -xf ${srcdir}/wechat-uos/data.tar.xz -C ${srcdir}/wechat-uos ./usr/lib/license/libuosdevicea.so
+ mkdir wechat-uos
+ bsdtar -xf "${_uos_deb_stem}_${CARCH}.deb" -C wechat-uos
+ bsdtar -xf wechat-uos/data.tar.xz -C wechat-uos ./usr/lib/license/libuosdevicea.so
echo "Extract wechat-beta deb file"
- mkdir -p ${srcdir}/wechat-beta
- bsdtar -xpf wechat-beta_${pkgver}_amd64.deb -C ${srcdir}/wechat-beta
+ mkdir -p wechat-beta
+ bsdtar -xpf "${_beta_deb_stem}_${CARCH}.deb" -C wechat-beta
}
package() {
echo "Extract wechat-beta deb file"
- bsdtar -xpf ${srcdir}/wechat-beta/data.tar.xz -C ${pkgdir}
+ bsdtar -xpf wechat-beta/data.tar.xz -C ${pkgdir}
echo "Fixing licenses"
mkdir -p ${pkgdir}/usr/share/wechat-uos
cp -r license/etc ${pkgdir}/usr/share/wechat-uos
cp -r license/var ${pkgdir}/usr/share/wechat-uos
- install -Dm644 ${srcdir}/wechat-uos/usr/lib/license/libuosdevicea.so ${pkgdir}/usr/lib/license/libuosdevicea.so
+ install -Dm644 wechat-uos/usr/lib/license/libuosdevicea.so ${pkgdir}/usr/lib/license/libuosdevicea.so
echo "Clean unused file"
rm -f "${pkgdir}/usr/share/applications/wechat.desktop"
echo "Installing stuff in place"
diff --git a/wechat.sh b/wechat.sh
index 513ea2968887..af3de31ab7f3 100644
--- a/wechat.sh
+++ b/wechat.sh
@@ -29,7 +29,7 @@ fi
exec bwrap \
--dev-bind / / \
--bind "${WECHAT_HOME_DIR}" "${HOME}" \
- --bind "$HOME/.fontconfig" "${HOME}/.fontconfig" \
+ --ro-bind-try "{$HOME}/.fontconfig" "${HOME}/.fontconfig" \
--ro-bind /usr/share/wechat-uos/var/ /var/ \
--ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \
--ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \