forked from flathub/com.qq.QQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
com.qq.QQ.yaml
172 lines (157 loc) · 5.79 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
app-id: com.qq.QQ
runtime: org.gnome.Platform
runtime-version: '46'
sdk: org.gnome.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
command: qq
separate-locales: false
finish-args:
- --share=ipc
- --share=network
- --socket=x11
- --socket=pulseaudio
- --device=all
- --filesystem=xdg-download
- --talk-name=org.gnome.Shell.Screencast
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --system-talk-name=org.freedesktop.login1
- --filesystem=xdg-run/pipewire-0
- --filesystem=/tmp
# 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:
# electron baseapp 23.08 libnotify caused crash, use 22.08 libnotify
- name: libnotify
buildsystem: meson
config-opts:
- -Dtests=false
- -Dintrospection=disabled
- -Dgtk_doc=false
- -Ddocbook_docs=disabled
sources:
- type: archive
url: https://download.gnome.org/sources/libnotify/0.7/libnotify-0.7.8.tar.xz
sha256: 69209e0b663776a00c7b6c0e560302a8dbf66b2551d55616304f240bba66e18c
# 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: llqqnt
buildsystem: simple
build-commands:
- mkdir -p $FLATPAK_DEST/share/loader
- cp -r src package.json LICENSE $FLATPAK_DEST/share/loader
sources:
- type: git
url: https://github.com/LiteLoaderQQNT/LiteLoaderQQNT.git
commit: 745e89ccd4469510c3b96fcfb21dd8026629eec8
- 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 -Dm644 llqqnt.js $FLATPAK_DEST/llqqnt.js
- 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"}
- export LITELOADERQQNT_PROFILE=${LITELOADERQQNT_PROFILE:-"$HOME/.var/app/$FLATPAK_ID/config/LiteLoaderQQNT"}
- test -d "$LITELOADERQQNT_PROFILE" || mkdir -p "$LITELOADERQQNT_PROFILE"
- |
if [[ -e "$XDG_RUNTIME_DIR/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime"
fi
- 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.*
- |
sed -i -e 's@"main":.*@"main": "./app_launcher/llqqnt.js",@g' QQ/resources/app/package.json
- install -Dm644 /app/llqqnt.js QQ/resources/app/app_launcher/llqqnt.js
dest-filename: apply_extra
- type: file
path: llqqnt.js
- 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.15_241210_amd64_01.deb
sha256: 2af70918b6af5fcae252c895e91e316c49ecfa5bbf7dbd8b5e9717b4a5bf1abb
size: 151544302
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.15_241210_arm64_01.deb
sha256: a10de93fff46ed7c7738efff625e3a0cdc47b09d1b0f09f0407aed4dd7d063aa
size: 151663676
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)