forked from flathub/com.qq.QQ
-
Notifications
You must be signed in to change notification settings - Fork 1
/
com.qq.QQ.yaml
180 lines (165 loc) · 6.22 KB
/
com.qq.QQ.yaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
app-id: com.qq.QQ
branch: liteloader
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
command: qq
separate-locales: false
finish-args:
- --share=ipc
- --share=network
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
#- --device=usb # Requires flatpak 1.15.11
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --system-talk-name=org.freedesktop.login1
# required to fix cursor scaling on wayland
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
cleanup:
- /include
- /lib/pkgconfig
- /share/gtk-doc
- '*.la'
modules:
# runtime cups is built aginst openssl
# need cups with gnutls for qq to load gnutls func
- name: cups
config-opts:
- --with-components=all
- --with-dbusdir=/etc/dbus-1
- --with-systemd
- --with-tls=gnutls
- --with-cups-group=lp
- --with-system-groups=wheel
- --with-rundir=/run/cups
- localedir=/usr/share/locale
no-make-install: true
post-install:
- install -Dm755 cups/libcups.so $FLATPAK_DEST/lib/libcups.so.2
sources:
- type: git
url: https://github.com/OpenPrinting/cups.git
tag: v2.4.11
commit: 7d535f73e407a72dfb5c5e83549a5ba27219dfcd
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- name: librename
buildsystem: simple
build-commands:
- mkdir -p $FLATPAK_DEST/etc/preload
- g++ -shared -fPIC -o rename.so rename.cpp -ldl
- install -Dm755 ./rename.so -t $FLATPAK_DEST/etc/preload/
sources:
- type: file
path: patch/rename.cpp
- name: fontconfig
buildsystem: simple
build-commands:
- install -pDm644 "local.conf" -t "/app/etc/fonts/";
- install -pDm644 "70-noto-cjk.conf" -t "/app/etc/fonts/conf.d/";
# `||:` return a successful exit status
- fc-cache -fsv ||:;
sources:
- type: file
url: https://gitlab.archlinux.org/archlinux/packaging/packages/noto-fonts-cjk/-/raw/5fd3534bf7a6e26c7506dc8f40dcd89f37d35627/70-noto-cjk.conf
sha256: 2417ac0e6720fe8da55ee59f16e36cfe96737bc21432460a322bb0f395e3a521
- type: file
path: patch/local.conf
- name: qq
buildsystem: simple
build-commands:
- install apply_extra $FLATPAK_DEST/bin
- install -Dm755 qq.sh $FLATPAK_DEST/bin/qq
- install -Dm644 com.qq.QQ.metainfo.xml -t $FLATPAK_DEST/share/metainfo
- install -Dm644 com.qq.QQ.png -t $FLATPAK_DEST/share/icons/hicolor/512x512/apps
- install -Dm644 com.qq.QQ.desktop -t $FLATPAK_DEST/share/applications
sources:
- type: script
commands:
- export ZYPAK_LD_PRELOAD="/app/etc/preload/rename.so"
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
- |
if [[ -e "$XDG_RUNTIME_DIR/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime"
fi
- export LITELOADERQQNT_PROFILE="${LITELOADERQQNT_PROFILE:-$XDG_CONFIG_HOME/LiteLoaderQQNT}"
- exec zypak-wrapper /app/extra/QQ/qq $FLAGS "$@"
dest-filename: qq.sh
- type: script
commands:
- bsdtar --to-stdout -xf qq.deb data.* | bsdtar -xf -
- mv opt/QQ .
- rm -rf qq.deb usr opt data.*
- patch_qq
dest-filename: apply_extra
- type: file
path: com.qq.QQ.metainfo.xml
- type: file
path: com.qq.QQ.png
- type: file
path: com.qq.QQ.desktop
- type: extra-data
filename: qq.deb
only-arches: [x86_64]
url: https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.13_241121_amd64_01.deb
sha256: 012496de4f5e1aba8c7ceca2ef72db4203c660ec07ed41453ec20ea130e65c75
size: 151024692
x-checker-data:
type: html
url: https://im.qq.com/rainbow/linuxQQDownload
pattern: (https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_([\d\.\_]+)_amd64[^/d]*.deb)
is-main-source: true
- type: extra-data
filename: qq.deb
only-arches: [aarch64]
url: https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.13_241121_arm64_01.deb
sha256: 4964755dd37645d6d2aae7e9cca1e52f4ecfebf06d70e779156640df4f29f88f
size: 151243368
x-checker-data:
type: html
url: https://im.qq.com/rainbow/linuxQQDownload
pattern: (https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_([\d\.\_]+)_arm64[^/d]*.deb)
- name: kerberos
subdir: src
sources:
- type: archive
url: https://kerberos.org/dist/krb5/1.21/krb5-1.21.2.tar.gz
sha256: 9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491
x-checker-data:
type: html
url: https://kerberos.org/dist/
version-pattern: Kerberos V5 Release ([\d\.\-]+) - current release
url-template: https://kerberos.org/dist/krb5/$major.$minor/krb5-$version.tar.gz
is-important: true
- name: liteloader
buildsystem: simple
build-commands:
- install -Dm644 package.json $FLATPAK_DEST/lib/LiteLoaderQQNT/package.json
- install -Dm644 LICENSE $FLATPAK_DEST/lib/LiteLoaderQQNT/LICENSE
- install -Dm644 README.md $FLATPAK_DEST/lib/LiteLoaderQQNT/README.md
- cp -r src $FLATPAK_DEST/lib/LiteLoaderQQNT/src
- install -Dm755 patch_qq $FLATPAK_DEST/bin/patch_qq
sources:
- type: git
url: https://github.com/LiteLoaderQQNT/LiteLoaderQQNT.git
commit: 745e89ccd4469510c3b96fcfb21dd8026629eec8
tag: 1.2.3
x-checker-data:
type: git
tag-pattern: "^([\\d.]+)$"
is-important: true
- type: script
commands:
- echo Applying modifications to QQ...
- entrypoint=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c10)
- echo 'require("/app/lib/LiteLoaderQQNT");' > QQ/resources/app/app_launcher/$entrypoint.js
- sed -i "s|\"main\":\ \".*\",|\"main\":\ \"./app_launcher/$entrypoint.js\",|" QQ/resources/app/package.json
dest-filename: patch_qq