-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD.proto
47 lines (41 loc) · 1.28 KB
/
PKGBUILD.proto
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
# Maintainer: Mufanc <[email protected]>
pkgname=qwrapper
pkgver='$PKGVER'
pkgrel=1
pkgdesc='为 Linux QQ 提供基本的存储隔离,同时集成一些其它小功能'
arch=('x86_64')
url='https://github.com/Mufanc/QWrapper'
license=('custom')
depends=(
# 沙盒
'bubblewrap'
# 默认依赖
'gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-core' 'util-linux-libs' 'libsecret'
# 移除问题库后补的依赖
'libvips' 'libunwind' 'libssh2'
)
makedepends=('rust')
optdepends=('libappindicator-gtk3')
conflicts=('linuxqq')
source=('$SOURCE' 'launcher.sh')
sha256sums=()
build() {
cd "$PKGROOT/daemon"
cargo build --release
}
package() {
# 解包
tar -x --xz -f data.tar.xz --directory="$pkgdir"
# 替换入口
mv "$pkgdir/opt/QQ/qq" "$pkgdir/opt/QQ/main"
cp "$srcdir/launcher.sh" "$pkgdir/opt/QQ/launcher.sh"
cp "$PKGROOT/daemon/target/release/daemon" "$pkgdir/opt/QQ/qq"
cp "$PKGROOT/daemon/target/release/libinject.so" "$pkgdir/opt/QQ/libinject.so"
# 处理 crash
res="$pkgdir/opt/QQ/resources/app"
rm "$res"/libssh*
rm "$res"/libunwind*
rm "$res"/sharp-lib/*
# 替换 desktop 名称
sed -i -E "s#(Name=.*)#Name=QQ*#" "$pkgdir/usr/share/applications/qq.desktop"
}