summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cd81ce66d254119fc018a9ace87c51d9d33b4a08 (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
# Maintainer: Kimiblock Moe

pkgname=wechat-bwrap
pkgver=3
pkgrel=1
epoch=1
pkgdesc="Sandboxing for WeChat. 沙盒微信."
arch=('any')
url="https://github.com/Kraftland/portable"
license=('GPL3')
groups=()
options=(!debug !strip)

makedepends+=()

provides+=(wechat-uos-bwrap wechat-uos-qt wechat-universal-bwrap wechat-bwrap wechat-portable wechat-beta-bwrap wechat-sandbox-provider)

depends=("wechat" "portable")

optdepends=()

makedepends+=()

checkdepends=()

source=(
	portable-config
)


md5sums=('d040d6a8dc61703ab42c2cb3a79eb396')

function package() {
	install -Dm644 portable-config \
		"${pkgdir}/usr/lib/wechat/portable-config"
	install -d "${pkgdir}/usr/bin"
	echo '''#!/usr/bin/bash
export _portalConfig=/usr/lib/wechat/portable-config
portable $@
''' >"${pkgdir}/usr/bin/wechat-sandbox-provider"
	chmod 755 "${pkgdir}/usr/bin/wechat-sandbox-provider"
	echo '''[Desktop Entry]
Comment=WeChat
Comment[zh_CN]=微信
Exec=/usr/bin/wechat.sh %u
Icon=wechat
Name=WeChat
Name[zh_CN]=微信
Categories=Utility;Network;InstantMessaging;Chat;
Terminal=false
Type=Application
Keywords=wechat;weixin;we;w;
Keywords[zh_CN]=微;微信;wechat;weixin;we;w;
X-GNOME-SingleWindow=true
SingleMainWindow=true
Actions=nosandbox;opendir;
StartupWMClass=wechat
StartupNotify=true
X-Flatpak-RenamedFrom=wechat.desktop;
X-Flatpak-Tags=proprietary;
X-Flatpak=com.qq.weixin;

[Desktop Action nosandbox]
Name=Toggle Sandbox...
Name[zh_CN]=更改沙盒偏好...
Exec=/usr/bin/wechat.sh --actions f5aaebc6-0014-4d30-beba-72bce57e0650
Icon=security-low-symbolic

[Desktop Action opendir]
Name=Open WeChat Home
Name[zh_CN]=打开数据目录
Exec=/usr/bin/wechat.sh --actions opendir
Icon=insert-image-symbolic''' >"${pkgdir}/usr/lib/wechat/alt.desktop"
}