summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c8fedc64895d3fd54c62b29131a3ae6bf59fed4d (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Maintainer: Kimiblock Moe
# Contributor: wszqkzqk

pkgname=wechat-bin
pkgver=4.0.1.11
pkgrel=2
epoch=
pkgdesc="微信是一种生活方式. This is a repackage of WeChat."
arch=('x86_64' 'aarch64' 'loong64')
url="https://weixin.qq.com/"
license=('LicenseRef-proprietary')
groups=()
options=(!debug !strip)

makedepends+=()

replaces+=()

depends=(
	"nss"
	"xcb-util-renderutil"
	"xcb-util-keysyms"
	"xcb-util-image"
	"xcb-util-wm"
	"libxkbcommon-x11"
	"libxkbcommon"
	"libxcb"
	"gcc-libs"
	"nspr"
	"glibc"
	"zlib"
	"libxcomposite"
	"glib2"
	"libxrender"
	"libxext"
	"alsa-lib"
	"dbus"
	"libxrandr"
	"fontconfig"
	"pango"
	"freetype2"
	"libxfixes"
	"cairo"
	"libx11"
	"expat"
	"libvlc"
	"libxdamage"
	"libdrm"
	"mesa"
	"libglvnd"
	"libpulse"
	"hicolor-icon-theme"
)

optdepends=(
	"wechat: Sandbox support and enhancements"
	'ttf-twemoji: An emoji font that will work with WeChat'
	'libjack.so: libjack_plugin.so'
	'at-spi2-core: Accessibility in the browser part'
)

makedepends+=(
	"libarchive"
)

checkdepends=()

source=()

# The official site does not have versioned download, so checksums are skipped

source_x86_64=(
	wechat-x86-${pkgver}.deb::"https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb"
)

source_aarch64=(
	wechat-arm-${pkgver}.deb::"https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.deb"
)

source_loong64=(
	wechat-loong64-${pkgver}.deb::"https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_LoongArch.deb"
)


md5sums=()
md5sums_x86_64=('SKIP')
md5sums_aarch64=('SKIP')
md5sums_loong64=('SKIP')

function pkgver() {
	tar -xf control.tar.xz ./control
	cat control | grep 'Version: ' | cut -c '10-'
}

function package() {
	tar -xf data.tar.xz ./opt
	cp -r opt \
		"${pkgdir}/"
	tar -xf data.tar.xz ./usr
	cp -r usr \
		"${pkgdir}/"
	install -d "${pkgdir}/usr/share/licenses/${pkgname}"
	echo "https://www.wechat.com/us/service_terms.html" \
		>"${pkgdir}/usr/share/licenses/${pkgname}/ToS.txt"
	sed -i 's|/usr/bin/wechat|/opt/wechat/wechat|g' \
		"${pkgdir}/usr/share/applications"/*.desktop
}